Add true 10- and 16-bit joystick modes (#2276)
Fixes #2275 Adds `Joystick.use10bit` and `Joystick.use16bit` methods. 10-bit is unsigned from 0...1023 while 16-bit is signed -32767..32767. Defines a new HID descriptor to support the increased resolution.
This commit was merged in pull request #2276.
This commit is contained in:
@@ -68,10 +68,10 @@ void KeyboardBLE_::sendReport(KeyReport* keys) {
|
||||
memcpy(data.keycode, keys->keys, sizeof(data.keycode));
|
||||
|
||||
//stitch in report id
|
||||
static uint8_t report[sizeof(hid_keyboard_report_t) +1];
|
||||
static uint8_t report[sizeof(hid_keyboard_report_t) + 1];
|
||||
report[0] = __BLEGetKeyboardReportID();
|
||||
memcpy(&report[1], (uint8_t*)&data, sizeof(hid_keyboard_report_t));
|
||||
PicoBluetoothBLEHID.send(&report, sizeof(hid_keyboard_report_t) +1);
|
||||
PicoBluetoothBLEHID.send(&report, sizeof(hid_keyboard_report_t) + 1);
|
||||
}
|
||||
|
||||
void KeyboardBLE_::sendConsumerReport(uint16_t key) {
|
||||
|
||||
Reference in New Issue
Block a user