A hold-tap timer event would be triggered too soon if the hold-tap
was delayed for longer than its tapping-term. This may cause
accidental hold behavior when the correct behavior would be tap.
By queuing the timer event instead of executing it immediately,
other delayed events get a chance to be processed properly.
The current combo completion check only makes sure the last key in the
combo is set. This works when the combo is typed correctly initially, or
when reraising events in a combo of length two. However, it fails for
longer combos since the last event in pressed_keys might be set, but the
first (or subsequent) event in pressed_keys can be NULL thanks to
release_pressed_keys.
Also added a regression test.
This test doesn't test a long combo that completes, but rather one
that's incomplete (so the combo doesn't trigger). Renaming to avoid
confusion when we add more long combo tests.
This commits adds a delay of 20ms on initializing the external
power control driver. Previously, OLED's i2c driver is failing to
initialize the display. This commit fixes that issue.
Signed-off-by: Anthony Amanse <ghieamanse@gmail.com>
This commit fixes the pin definition for BlueMicro840. Based on the
schematics, the blue led is at pin 1.10.
Signed-off-by: Anthony Amanse <ghieamanse@gmail.com>
By setting CONFIG_DEBUG, the native_posix builds will not be optimized
which makes debugging them much nicer.
By setting CONFIG_SYS_CLOCK_TICKS_PER_SEC to 1000, debug prints have a
higher resolution and not always show up as multiples of 10ms.
With newlib_libc enabled, a warning was printed for this sprintf.
The settings_name may expand to 17 characters instead of the available
15.
Fixes#808.
Full warning:
[49/272] Building C object CMakeFiles/app.dir/src/ble.c.obj
In file included from /home/okke/.local/zephyr-sdk-0.11.2/arm-zephyr-eabi/arm-zephyr-eabi/sys-include/stdio.h:800,
from ../../src/ble.c:12:
../../src/ble.c: In function 'set_profile_address':
../../src/ble.c:118:27: warning: '%d' directive writing between 1 and 3 bytes into a region of size 2 [-Wformat-overflow=]
118 | sprintf(setting_name, "ble/profiles/%d", index);
| ^~~~~~~~~~~~~~~~~
../../src/ble.c:118:41: note: format string is defined here
118 | sprintf(setting_name, "ble/profiles/%d", index);
| ^~
In file included from /home/okke/.local/zephyr-sdk-0.11.2/arm-zephyr-eabi/arm-zephyr-eabi/sys-include/stdio.h:800,
from ../../src/ble.c:12:
../../src/ble.c:118:27: note: directive argument in the range [0, 255]
118 | sprintf(setting_name, "ble/profiles/%d", index);
| ^~~~~~~~~~~~~~~~~
../../src/ble.c:118:5: note: '__builtin___sprintf_chk' output between 15 and 17 bytes into a destination of size 15
118 | sprintf(setting_name, "ble/profiles/%d", index);
| ^~~~~~~
With newlib_libc enabled, a warning was printed for this memcpy.
uuid is a `bt_uuid_128`, while BT_UUID_GATT_CCC is only `bt_uuid_16`.
Fixes#808.
Full warning:
[53/272] Building C object CMakeFiles/app.dir/src/split/bluetooth/central.c.obj
In file included from /home/okke/.local/zephyr-sdk-0.11.2/arm-zephyr-eabi/arm-zephyr-eabi/sys-include/string.h:180,
from /home/okke/dev/zmk/zephyr/include/bluetooth/bluetooth.h:21,
from ../../src/split/bluetooth/central.c:9:
../../src/split/bluetooth/central.c: In function 'split_central_discovery_func':
../../src/split/bluetooth/central.c:130:9: warning: '__builtin_memcpy' forming offset [5, 17] is out of the bounds [0, 4] of object '({anonymous})' with type 'struct bt_uuid_16[1]' [-Warray-bounds]
130 | memcpy(&uuid, BT_UUID_GATT_CCC, sizeof(uuid));
| ^~~~~~
/home/okke/dev/zmk/zephyr/include/bluetooth/uuid.h:72:45: note: '({anonymous})' declared here
72 | ((struct bt_uuid *) ((struct bt_uuid_16[]) {BT_UUID_INIT_16(value)}))
| ^
/home/okke/dev/zmk/zephyr/include/bluetooth/uuid.h:372:2: note: in expansion of macro 'BT_UUID_DECLARE_16'
372 | BT_UUID_DECLARE_16(BT_UUID_GATT_CCC_VAL)
| ^~~~~~~~~~~~~~~~~~
../../src/split/bluetooth/central.c:130:23: note: in expansion of macro 'BT_UUID_GATT_CCC'
130 | memcpy(&uuid, BT_UUID_GATT_CCC, sizeof(uuid));
Quick release for sticky keys failed for non-layer keys. The sticky key
was released just before the key that was supposed to be modified was
handled.
The issue was caused by an error in the sticky key logic, which released
the sticky key before handling the key up event.
Fixes#696.