diff --git a/build_uf2/Pico_Game_Controller.uf2 b/build_uf2/Pico_Game_Controller.uf2 index 9bd3c7e..1a8b142 100644 Binary files a/build_uf2/Pico_Game_Controller.uf2 and b/build_uf2/Pico_Game_Controller.uf2 differ diff --git a/src/pico_game_controller.c b/src/pico_game_controller.c index 11ecebf..c961fd6 100644 --- a/src/pico_game_controller.c +++ b/src/pico_game_controller.c @@ -91,6 +91,7 @@ void update_lights() { struct report { uint16_t buttons; uint8_t joy0; + uint8_t joy1; } report; /** @@ -109,6 +110,7 @@ void joy_mode() { } report.joy0 = ((double)cur_enc_val[0] / ENC_PULSE) * (UINT8_MAX + 1); + report.joy1 = 127; tud_hid_n_report(0x00, REPORT_ID_JOYSTICK, &report, sizeof(report)); } diff --git a/src/usb_descriptors.h b/src/usb_descriptors.h index fc3761a..6674cf7 100644 --- a/src/usb_descriptors.h +++ b/src/usb_descriptors.h @@ -35,7 +35,7 @@ enum { HID_USAGE_PAGE(HID_USAGE_PAGE_DESKTOP), HID_LOGICAL_MIN(0x00), \ HID_LOGICAL_MAX_N(0x00ff, 2), \ HID_USAGE(HID_USAGE_DESKTOP_X), /*Joystick*/ \ - HID_REPORT_COUNT(2), HID_REPORT_SIZE(8), \ + HID_USAGE(HID_USAGE_DESKTOP_Y), HID_REPORT_COUNT(2), HID_REPORT_SIZE(8), \ HID_INPUT(HID_DATA | HID_VARIABLE | HID_ABSOLUTE), HID_COLLECTION_END // Light Map @@ -62,4 +62,4 @@ enum { HID_USAGE_PAGE(HID_USAGE_PAGE_KEYBOARD), HID_USAGE_MIN(0), \ HID_USAGE_MAX(31 * 8 - 1), HID_INPUT(HID_VARIABLE), HID_COLLECTION_END -#endif /* USB_DESCRIPTORS_H_ */ \ No newline at end of file +#endif /* USB_DESCRIPTORS_H_ */