chunihook/jvs.c: Fix active-low beam trigger

This commit is contained in:
Tau 2019-06-09 15:40:16 -04:00
parent 67c1fcedea
commit 6d06429217
1 changed files with 2 additions and 1 deletions

View File

@ -73,7 +73,8 @@ static void chunithm_jvs_read_switches(void *ctx, struct io3_switch_state *out)
}
for (i = 0 ; i < 6 ; i++) {
if (beams & (1 << i)) {
/* Beam "press" is active-low hence the ~ */
if (~beams & (1 << i)) {
out->p1 |= chunithm_jvs_ir_masks[i].p1;
out->p2 |= chunithm_jvs_ir_masks[i].p2;
}