mirror of
https://github.com/whowechina/iidx_pico.git
synced 2025-02-20 04:21:01 +01:00
Fix not reporting button bug
This commit is contained in:
parent
da52cd22d8
commit
69a1aac232
Binary file not shown.
@ -70,15 +70,14 @@ void mode_check()
|
||||
}
|
||||
|
||||
static mutex_t core1_io_lock;
|
||||
static uint8_t latest_angle;
|
||||
static void core1_loop()
|
||||
{
|
||||
while (true) {
|
||||
uint32_t angle = turntable_raw();
|
||||
rgb_set_angle(angle);
|
||||
|
||||
uint8_t angle8 = turntable_read();
|
||||
hid_report.joy[0] = angle8;
|
||||
hid_report.joy[1] = 255 - angle8;
|
||||
latest_angle = turntable_read();
|
||||
|
||||
if (mutex_try_enter(&core1_io_lock, NULL)) {
|
||||
rgb_update();
|
||||
@ -117,7 +116,11 @@ static void core0_loop()
|
||||
rgb_set_button_light(buttons);
|
||||
}
|
||||
|
||||
hid_report.buttons = 0;
|
||||
if (!ov_tt && !ov_btn) {
|
||||
hid_report.buttons = buttons;
|
||||
hid_report.joy[0] = latest_angle;
|
||||
hid_report.joy[1] = 255 - latest_angle;
|
||||
save_loop();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user