1
0
Fork 0

chuniio: fixed individual IR notes

This commit is contained in:
Dniel97 2023-12-25 15:12:25 +01:00
parent b38dea23ac
commit f5f275c8e9
Signed by untrusted user: Dniel97
GPG Key ID: 6180B3C768FB2E08
1 changed files with 6 additions and 6 deletions

View File

@ -91,12 +91,12 @@ void chuni_io_jvs_poll(uint8_t *opbtn, uint8_t *beams)
} }
} else { } else {
// Use actual AIR // Use actual AIR
// IR format is beams[5:0] = {b5,b6,b3,b4,b1,b2}; for (i = 0; i < 6; i++) {
for (i = 0 ; i < 3 ; i++) { if(GetAsyncKeyState(chuni_io_cfg.vk_ir[i]) & 0x8000) {
if (GetAsyncKeyState(chuni_io_cfg.vk_ir[i*2]) & 0x8000) *beams |= (1 << i);
*beams |= (1 << (i*2+1)); } else {
if (GetAsyncKeyState(chuni_io_cfg.vk_ir[i*2+1]) & 0x8000) *beams &= ~(1 << i);
*beams |= (1 << (i*2)); }
} }
} }
} }