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(combos): Properly report combos len with emply block #2739

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions app/include/zmk/combos.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@

#include <zephyr/devicetree.h>

#define ZMK_COMBOS_UTIL_ONE(n) 1
#define ZMK_COMBOS_UTIL_ONE(n) +1

#define ZMK_COMBOS_LEN \
COND_CODE_1( \
DT_HAS_COMPAT_STATUS_OKAY(zmk_combos), \
(DT_FOREACH_CHILD_STATUS_OKAY_SEP(DT_INST(0, zmk_combos), ZMK_COMBOS_UTIL_ONE, (+))), (0))
COND_CODE_1(DT_HAS_COMPAT_STATUS_OKAY(zmk_combos), \
(0 DT_FOREACH_CHILD_STATUS_OKAY(DT_INST(0, zmk_combos), ZMK_COMBOS_UTIL_ONE)), \
(0))
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
};

/ {
combos {
compatible = "zmk,combos";
};

keymap {
compatible = "zmk,keymap";
label ="Default keymap";
Expand Down
Loading