fix(sensors): Handle positive or negative ticks, not just 1/-1.
This commit is contained in:
parent
d7bd81e5c4
commit
bd4a6ab095
1 changed files with 4 additions and 7 deletions
|
@ -34,15 +34,12 @@ static int on_sensor_binding_triggered(struct zmk_behavior_binding *binding,
|
|||
return err;
|
||||
}
|
||||
|
||||
switch (value.val1) {
|
||||
case 1:
|
||||
if (value.val1 > 0) {
|
||||
keycode = binding->param1;
|
||||
break;
|
||||
case -1:
|
||||
} else if (value.val1 < 0) {
|
||||
keycode = binding->param2;
|
||||
break;
|
||||
default:
|
||||
return -ENOTSUP;
|
||||
} else {
|
||||
return ZMK_BEHAVIOR_OPAQUE;
|
||||
}
|
||||
|
||||
LOG_DBG("SEND %d", keycode);
|
||||
|
|
Loading…
Add table
Reference in a new issue