diff --git a/Controllers/LogitechController/LogitechG203Controller.cpp b/Controllers/LogitechController/LogitechG203Controller.cpp index 5a3d87c2..c97618bc 100644 --- a/Controllers/LogitechController/LogitechG203Controller.cpp +++ b/Controllers/LogitechController/LogitechG203Controller.cpp @@ -51,7 +51,7 @@ void LogitechG203Controller::SendMouseMode usb_buf[0x07] = green; usb_buf[0x08] = blue; - speed = 1000 + 4750 * (LOGITECH_G203_SPEED_FASTEST - speed); + speed = 100 * speed; if(mode == LOGITECH_G203_MODE_CYCLE) { usb_buf[0x0B] = speed >> 8; diff --git a/Controllers/LogitechController/LogitechG203Controller.h b/Controllers/LogitechController/LogitechG203Controller.h index 883c8a0b..ea1d5ffb 100644 --- a/Controllers/LogitechController/LogitechG203Controller.h +++ b/Controllers/LogitechController/LogitechG203Controller.h @@ -22,13 +22,15 @@ enum LOGITECH_G203_MODE_BREATHING = 0x03, }; +/*---------------------------------------------------------------------------------------------*\ +| Speed is 1000 for fast and 20000 for slow. | +| Values are mutipled by 100 later to give lots of GUI steps. | +\*---------------------------------------------------------------------------------------------*/ enum { - LOGITECH_G203_SPEED_SLOWEST = 0x00, /* Slowest speed */ - LOGITECH_G203_SPEED_SLOW = 0x01, /* Slow speed */ - LOGITECH_G203_SPEED_NORMAL = 0x02, /* Normal speed */ - LOGITECH_G203_SPEED_FAST = 0x03, /* Fast speed */ - LOGITECH_G203_SPEED_FASTEST = 0x04, /* Fastest speed */ + LOGITECH_G203_SPEED_SLOWEST = 0xC8, /* Slowest speed */ + LOGITECH_G203_SPEED_NORMAL = 0x32, /* Normal speed */ + LOGITECH_G203_SPEED_FASTEST = 0x0A, /* Fastest speed */ }; class LogitechG203Controller diff --git a/Controllers/LogitechController/LogitechG403Controller.cpp b/Controllers/LogitechController/LogitechG403Controller.cpp index 730bbdf1..5384bb69 100644 --- a/Controllers/LogitechController/LogitechG403Controller.cpp +++ b/Controllers/LogitechController/LogitechG403Controller.cpp @@ -53,7 +53,7 @@ void LogitechG403Controller::SendMouseMode usb_buf[0x07] = green; usb_buf[0x08] = blue; - speed = 1000 + 4750 * (LOGITECH_G403_SPEED_FASTEST - speed); + speed = 100 * speed; if(mode == LOGITECH_G403_MODE_CYCLE) { usb_buf[0x0B] = speed >> 8; diff --git a/Controllers/LogitechController/LogitechG403Controller.h b/Controllers/LogitechController/LogitechG403Controller.h index df492f62..c0bb0ef0 100644 --- a/Controllers/LogitechController/LogitechG403Controller.h +++ b/Controllers/LogitechController/LogitechG403Controller.h @@ -22,13 +22,15 @@ enum LOGITECH_G403_MODE_BREATHING = 0x03, }; +/*---------------------------------------------------------------------------------------------*\ +| Speed is 1000 for fast and 20000 for slow. | +| Values are mutipled by 100 later to give lots of GUI steps. | +\*---------------------------------------------------------------------------------------------*/ enum { - LOGITECH_G403_SPEED_SLOWEST = 0x00, /* Slowest speed */ - LOGITECH_G403_SPEED_SLOW = 0x01, /* Slow speed */ - LOGITECH_G403_SPEED_NORMAL = 0x02, /* Normal speed */ - LOGITECH_G403_SPEED_FAST = 0x03, /* Fast speed */ - LOGITECH_G403_SPEED_FASTEST = 0x04, /* Fastest speed */ + LOGITECH_G403_SPEED_SLOWEST = 0xC8, /* Slowest speed */ + LOGITECH_G403_SPEED_NORMAL = 0x32, /* Normal speed */ + LOGITECH_G403_SPEED_FASTEST = 0x0A, /* Fastest speed */ }; class LogitechG403Controller diff --git a/Controllers/LogitechController/LogitechG502PSController.cpp b/Controllers/LogitechController/LogitechG502PSController.cpp index 7c646da2..053a342b 100644 --- a/Controllers/LogitechController/LogitechG502PSController.cpp +++ b/Controllers/LogitechController/LogitechG502PSController.cpp @@ -53,7 +53,7 @@ void LogitechG502PSController::SendMouseMode usb_buf[0x07] = green; usb_buf[0x08] = blue; - speed = 1000 + 4750 * (LOGITECH_G502_PS_SPEED_FASTEST - speed); + speed = 100 * speed; if(mode == LOGITECH_G502_PS_MODE_CYCLE) { usb_buf[0x0B] = speed >> 8; diff --git a/Controllers/LogitechController/LogitechG502PSController.h b/Controllers/LogitechController/LogitechG502PSController.h index a5a760c0..ec187034 100644 --- a/Controllers/LogitechController/LogitechG502PSController.h +++ b/Controllers/LogitechController/LogitechG502PSController.h @@ -23,13 +23,15 @@ enum LOGITECH_G502_PS_MODE_BREATHING = 0x02 }; +/*---------------------------------------------------------------------------------------------*\ +| Speed is 1000 for fast and 20000 for slow. | +| Values are mutipled by 100 later to give lots of GUI steps. | +\*---------------------------------------------------------------------------------------------*/ enum { - LOGITECH_G502_PS_SPEED_SLOWEST = 0x00, /* Slowest speed */ - LOGITECH_G502_PS_SPEED_SLOW = 0x01, /* Slow speed */ - LOGITECH_G502_PS_SPEED_NORMAL = 0x02, /* Normal speed */ - LOGITECH_G502_PS_SPEED_FAST = 0x03, /* Fast speed */ - LOGITECH_G502_PS_SPEED_FASTEST = 0x04, /* Fastest speed */ + LOGITECH_G502_PS_SPEED_SLOWEST = 0xC8, /* Slowest speed */ + LOGITECH_G502_PS_SPEED_NORMAL = 0x32, /* Normal speed */ + LOGITECH_G502_PS_SPEED_FASTEST = 0x0A, /* Fastest speed */ }; class LogitechG502PSController diff --git a/Controllers/LogitechController/LogitechGPowerPlayController.cpp b/Controllers/LogitechController/LogitechGPowerPlayController.cpp index 0b6f76b9..5f977188 100644 --- a/Controllers/LogitechController/LogitechGPowerPlayController.cpp +++ b/Controllers/LogitechController/LogitechGPowerPlayController.cpp @@ -54,7 +54,7 @@ void LogitechGPowerPlayController::SendMouseMatMode usb_buf[0x07] = green; usb_buf[0x08] = blue; - speed = 1000 * (LOGITECH_G_POWERPLAY_SPEED_FASTEST - speed); + speed = 100 * speed; if(mode == LOGITECH_G_POWERPLAY_MODE_STATIC) { usb_buf[0x09] = 0x02; diff --git a/Controllers/LogitechController/LogitechGPowerPlayController.h b/Controllers/LogitechController/LogitechGPowerPlayController.h index c267f471..8cf2f261 100644 --- a/Controllers/LogitechController/LogitechGPowerPlayController.h +++ b/Controllers/LogitechController/LogitechGPowerPlayController.h @@ -22,11 +22,15 @@ enum LOGITECH_G_POWERPLAY_MODE_BREATHING = 0x03, }; +/*---------------------------------------------------------------------------------------------*\ +| Speed is 1000 for fast and 20000 for slow. | +| Values are mutipled by 100 later to give lots of GUI steps. | +\*---------------------------------------------------------------------------------------------*/ enum { - LOGITECH_G_POWERPLAY_SPEED_SLOWEST = 0x01, /* Slowest speed */ - LOGITECH_G_POWERPLAY_SPEED_NORMAL = 0x32, /* Normal speed */ - LOGITECH_G_POWERPLAY_SPEED_FASTEST = 0xC8, /* Fastest speed */ + LOGITECH_G_POWERPLAY_SPEED_SLOWEST = 0xC8, /* Slowest speed */ + LOGITECH_G_POWERPLAY_SPEED_NORMAL = 0x32, /* Normal speed */ + LOGITECH_G_POWERPLAY_SPEED_FASTEST = 0x0A, /* Fastest speed */ }; class LogitechGPowerPlayController diff --git a/Controllers/LogitechController/LogitechGProWirelessController.h b/Controllers/LogitechController/LogitechGProWirelessController.h index d68a30b1..b6f7cc89 100644 --- a/Controllers/LogitechController/LogitechGProWirelessController.h +++ b/Controllers/LogitechController/LogitechGProWirelessController.h @@ -22,12 +22,15 @@ enum LOGITECH_G_PRO_WIRELESS_MODE_BREATHING = 0x03, }; +/*---------------------------------------------------------------------------------------------*\ +| Speed is 1000 for fast and 20000 for slow. | +| Values are mutipled by 100 later to give lots of GUI steps. | +\*---------------------------------------------------------------------------------------------*/ enum -{ // Speed is 1000 for fast and 20000 for slow. - // Values are mutipled by 100 later to give lots of GUI steps. - LOGITECH_G_PRO_WIRELESS_SPEED_SLOWEST = 0xC8, /* Slowest speed */ - LOGITECH_G_PRO_WIRELESS_SPEED_NORMAL = 0x32, /* Normal speed */ - LOGITECH_G_PRO_WIRELESS_SPEED_FASTEST = 0x0A, /* Fastest speed */ +{ + LOGITECH_G_PRO_WIRELESS_SPEED_SLOWEST = 0xC8, /* Slowest speed */ + LOGITECH_G_PRO_WIRELESS_SPEED_NORMAL = 0x32, /* Normal speed */ + LOGITECH_G_PRO_WIRELESS_SPEED_FASTEST = 0x0A, /* Fastest speed */ }; class LogitechGProWirelessController