From 72a93dbae55209ae3b64651936e94c86546d5b81 Mon Sep 17 00:00:00 2001 From: James Cotton Date: Fri, 2 Mar 2012 11:11:36 -0600 Subject: [PATCH] Fix from PT for OSX/Windows F4 USB HID to send the full report size even if not all used. --- flight/PiOS/STM32F4xx/pios_usb_hid.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/flight/PiOS/STM32F4xx/pios_usb_hid.c b/flight/PiOS/STM32F4xx/pios_usb_hid.c index 730e0f285..f380ad39a 100644 --- a/flight/PiOS/STM32F4xx/pios_usb_hid.c +++ b/flight/PiOS/STM32F4xx/pios_usb_hid.c @@ -198,12 +198,12 @@ static bool PIOS_USB_HID_SendReport(struct pios_usb_hid_dev * usb_hid_dev) #ifdef PIOS_USB_BOARD_BL_HID_HAS_NO_LENGTH_BYTE PIOS_USBHOOK_EndpointTx(usb_hid_dev->cfg->data_tx_ep, usb_hid_dev->tx_packet_buffer, - bytes_to_tx + 1); + sizeof(usb_hid_dev->tx_packet_buffer)); #else usb_hid_dev->tx_packet_buffer[1] = bytes_to_tx; PIOS_USBHOOK_EndpointTx(usb_hid_dev->cfg->data_tx_ep, usb_hid_dev->tx_packet_buffer, - bytes_to_tx + 2); + sizeof(usb_hid_dev->tx_packet_buffer)); #endif #if defined(PIOS_INCLUDE_FREERTOS)