updated mouse event scroll wheel handling

This commit is contained in:
dekunukem
2022-01-24 13:34:32 +00:00
parent fa6ba94407
commit 087eefe618
71 changed files with 1173 additions and 1105 deletions

View File

@@ -67,7 +67,7 @@ UART_HandleTypeDef huart3;
const uint8_t board_id = 1;
const uint8_t version_major = 0;
const uint8_t version_minor = 1;
const uint8_t version_patch = 1;
const uint8_t version_patch = 2;
uint8_t hw_revision;
uint8_t spi_transmit_buf[SPI_BUF_SIZE];
@@ -229,7 +229,7 @@ void HAL_SPI_TxRxCpltCallback(SPI_HandleTypeDef *hspi)
{
latest_mouse_event.movement_x = byte_to_int16_t(backup_spi1_recv_buf[4], backup_spi1_recv_buf[5]);
latest_mouse_event.movement_y = -1 * byte_to_int16_t(backup_spi1_recv_buf[6], backup_spi1_recv_buf[7]);
latest_mouse_event.scroll_vertical = -1 * byte_to_int16_t(backup_spi1_recv_buf[8], backup_spi1_recv_buf[9]);
latest_mouse_event.scroll_vertical = -1 * backup_spi1_recv_buf[8];
latest_mouse_event.button_left = backup_spi1_recv_buf[13];
latest_mouse_event.button_right = backup_spi1_recv_buf[14];
latest_mouse_event.button_middle = backup_spi1_recv_buf[15];