Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix dir/shield order #24

Merged

Conversation

Percentnineteen
Copy link

this is basically PR #12 updated to the file supported in zephyr 3.2 (the old one was 3.0 based, I believe). The edits look messy but that's just due to inverting of logic. There is nothing new here, just reorganization.

Without this PR, a shield in zmk-config cannot use the nice!view shield (or any other shields) defined in the main zmk dir.

Right now, the logic basically goes:
foreach location (zmk, zmk-config)
foreach shield
if shield exists, append it to the list

This results in a board list like "my_keyboard_shield nice_view" being inverted -> "nice_view my_keyboard_shield".

This PR just inverts the logic and does:
foreach shield
foreach location (zmk, zmk-config)
if shield exists, append it to the list

This still allows any shield defined in zmk-config to overwrite any shield also defined in zmk/apps/boards/shields, but also does not re-order the shields according to where they were found

Copy link

@petejohanson petejohanson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks for the fix. Local testing here and the build seems sane.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants