diff --git a/drivers/sensors/spacemouse_module.h b/drivers/sensors/spacemouse_module.h index 367f52ba07a..205818851d5 100644 --- a/drivers/sensors/spacemouse_module.h +++ b/drivers/sensors/spacemouse_module.h @@ -24,12 +24,12 @@ #define SPACEMOUSE_LENGTH_PACKET (SPACEMOUSE_LENGTH_HEADER + SPACEMOUSE_LENGTH_DATA + SPACEMOUSE_LENGTH_CHECKSUM + SPACEMOUSE_LENGTH_FOOTER) enum spacemouse_commands { - SPACEMOUSE_CMD_REQUEST_DATA = 0xAC, - SPACEMOUSE_CMD_SET_ZERO_POSITION = 0xAD, - SPACEMOUSE_CMD_AUTO_DATA_ON = 0xAE, - SPACEMOUSE_CMD_AUTO_DATA_OFF = 0xAF, - SPACEMOUSE_CMD_END = 0x8D, - SPACEMOUSE_DATA_REQUEST_START = 0x96, + SPACEMOUSE_CMD_REQUEST_DATA = 0xAC, + SPACEMOUSE_CMD_SET_ZERO_POSITION = 0xAD, + SPACEMOUSE_CMD_AUTO_DATA_ON = 0xAE, + SPACEMOUSE_CMD_AUTO_DATA_OFF = 0xAF, + SPACEMOUSE_CMD_END = 0x8D, + SPACEMOUSE_DATA_REQUEST_START = 0x96, }; typedef struct { @@ -41,6 +41,6 @@ typedef struct { int16_t tilt_y; } spacemouse_data_t; -bool spacemouse_send_command(uint8_t cmd); -bool spacemouse_init(void); +bool spacemouse_send_command(uint8_t cmd); +bool spacemouse_init(void); spacemouse_data_t spacemouse_get_data(void); diff --git a/quantum/pointing_device/pointing_device_drivers.c b/quantum/pointing_device/pointing_device_drivers.c index d82a12a2ae8..4fc599f7d01 100644 --- a/quantum/pointing_device/pointing_device_drivers.c +++ b/quantum/pointing_device/pointing_device_drivers.c @@ -264,7 +264,7 @@ report_mouse_t cirque_pinnacle_get_report(report_mouse_t mouse_report) { static uint16_t x = 0, y = 0, last_scale = 0; # if defined(CIRQUE_PINNACLE_TAP_ENABLE) - mouse_report.buttons = pointing_device_handle_buttons(mouse_report.buttons, false, POINTING_DEVICE_BUTTON1); + mouse_report.buttons = pointing_device_handle_buttons(mouse_report.buttons, false, POINTING_DEVICE_BUTTON1); # endif # ifdef POINTING_DEVICE_GESTURES_CURSOR_GLIDE_ENABLE cursor_glide_t glide_report = {0}; @@ -496,14 +496,14 @@ const pointing_device_driver_t pointing_device_driver = { static bool spacemouse_present = false; -__attribute__((weak)) void spacemouse_module_handle_axises(spacemouse_data_t *spacemouse_data, report_mouse_t* mouse_report) { -#ifdef SPACEMOUSE_USE_TILT_AXIS +__attribute__((weak)) void spacemouse_module_handle_axises(spacemouse_data_t* spacemouse_data, report_mouse_t* mouse_report) { +# ifdef SPACEMOUSE_USE_TILT_AXIS mouse_report->x = CONSTRAIN_HID_XY(spacemouse_data->tilt_x); mouse_report->y = CONSTRAIN_HID_XY(spacemouse_data->tilt_y); -#else +# else mouse_report->x = CONSTRAIN_HID_XY(spacemouse_data->x); mouse_report->y = CONSTRAIN_HID_XY(spacemouse_data->y); -#endif +# endif } static report_mouse_t spacemouse_get_report(report_mouse_t mouse_report) {