Skip to content

Commit 3f2b925

Browse files
TheRogueZetaCalcProgrammer1
authored andcommitted
Update remaining controlers
1 parent 0cab595 commit 3f2b925

9 files changed

Lines changed: 40 additions & 27 deletions

Controllers/LogitechController/LogitechG203Controller.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ void LogitechG203Controller::SendMouseMode
5151
usb_buf[0x07] = green;
5252
usb_buf[0x08] = blue;
5353

54-
speed = 1000 + 4750 * (LOGITECH_G203_SPEED_FASTEST - speed);
54+
speed = 100 * speed;
5555
if(mode == LOGITECH_G203_MODE_CYCLE)
5656
{
5757
usb_buf[0x0B] = speed >> 8;

Controllers/LogitechController/LogitechG203Controller.h

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,15 @@ enum
2222
LOGITECH_G203_MODE_BREATHING = 0x03,
2323
};
2424

25+
/*---------------------------------------------------------------------------------------------*\
26+
| Speed is 1000 for fast and 20000 for slow. |
27+
| Values are mutipled by 100 later to give lots of GUI steps. |
28+
\*---------------------------------------------------------------------------------------------*/
2529
enum
2630
{
27-
LOGITECH_G203_SPEED_SLOWEST = 0x00, /* Slowest speed */
28-
LOGITECH_G203_SPEED_SLOW = 0x01, /* Slow speed */
29-
LOGITECH_G203_SPEED_NORMAL = 0x02, /* Normal speed */
30-
LOGITECH_G203_SPEED_FAST = 0x03, /* Fast speed */
31-
LOGITECH_G203_SPEED_FASTEST = 0x04, /* Fastest speed */
31+
LOGITECH_G203_SPEED_SLOWEST = 0xC8, /* Slowest speed */
32+
LOGITECH_G203_SPEED_NORMAL = 0x32, /* Normal speed */
33+
LOGITECH_G203_SPEED_FASTEST = 0x0A, /* Fastest speed */
3234
};
3335

3436
class LogitechG203Controller

Controllers/LogitechController/LogitechG403Controller.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ void LogitechG403Controller::SendMouseMode
5353
usb_buf[0x07] = green;
5454
usb_buf[0x08] = blue;
5555

56-
speed = 1000 + 4750 * (LOGITECH_G403_SPEED_FASTEST - speed);
56+
speed = 100 * speed;
5757
if(mode == LOGITECH_G403_MODE_CYCLE)
5858
{
5959
usb_buf[0x0B] = speed >> 8;

Controllers/LogitechController/LogitechG403Controller.h

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,15 @@ enum
2222
LOGITECH_G403_MODE_BREATHING = 0x03,
2323
};
2424

25+
/*---------------------------------------------------------------------------------------------*\
26+
| Speed is 1000 for fast and 20000 for slow. |
27+
| Values are mutipled by 100 later to give lots of GUI steps. |
28+
\*---------------------------------------------------------------------------------------------*/
2529
enum
2630
{
27-
LOGITECH_G403_SPEED_SLOWEST = 0x00, /* Slowest speed */
28-
LOGITECH_G403_SPEED_SLOW = 0x01, /* Slow speed */
29-
LOGITECH_G403_SPEED_NORMAL = 0x02, /* Normal speed */
30-
LOGITECH_G403_SPEED_FAST = 0x03, /* Fast speed */
31-
LOGITECH_G403_SPEED_FASTEST = 0x04, /* Fastest speed */
31+
LOGITECH_G403_SPEED_SLOWEST = 0xC8, /* Slowest speed */
32+
LOGITECH_G403_SPEED_NORMAL = 0x32, /* Normal speed */
33+
LOGITECH_G403_SPEED_FASTEST = 0x0A, /* Fastest speed */
3234
};
3335

3436
class LogitechG403Controller

Controllers/LogitechController/LogitechG502PSController.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ void LogitechG502PSController::SendMouseMode
5353
usb_buf[0x07] = green;
5454
usb_buf[0x08] = blue;
5555

56-
speed = 1000 + 4750 * (LOGITECH_G502_PS_SPEED_FASTEST - speed);
56+
speed = 100 * speed;
5757
if(mode == LOGITECH_G502_PS_MODE_CYCLE)
5858
{
5959
usb_buf[0x0B] = speed >> 8;

Controllers/LogitechController/LogitechG502PSController.h

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,15 @@ enum
2323
LOGITECH_G502_PS_MODE_BREATHING = 0x02
2424
};
2525

26+
/*---------------------------------------------------------------------------------------------*\
27+
| Speed is 1000 for fast and 20000 for slow. |
28+
| Values are mutipled by 100 later to give lots of GUI steps. |
29+
\*---------------------------------------------------------------------------------------------*/
2630
enum
2731
{
28-
LOGITECH_G502_PS_SPEED_SLOWEST = 0x00, /* Slowest speed */
29-
LOGITECH_G502_PS_SPEED_SLOW = 0x01, /* Slow speed */
30-
LOGITECH_G502_PS_SPEED_NORMAL = 0x02, /* Normal speed */
31-
LOGITECH_G502_PS_SPEED_FAST = 0x03, /* Fast speed */
32-
LOGITECH_G502_PS_SPEED_FASTEST = 0x04, /* Fastest speed */
32+
LOGITECH_G502_PS_SPEED_SLOWEST = 0xC8, /* Slowest speed */
33+
LOGITECH_G502_PS_SPEED_NORMAL = 0x32, /* Normal speed */
34+
LOGITECH_G502_PS_SPEED_FASTEST = 0x0A, /* Fastest speed */
3335
};
3436

3537
class LogitechG502PSController

Controllers/LogitechController/LogitechGPowerPlayController.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ void LogitechGPowerPlayController::SendMouseMatMode
5454
usb_buf[0x07] = green;
5555
usb_buf[0x08] = blue;
5656

57-
speed = 1000 * (LOGITECH_G_POWERPLAY_SPEED_FASTEST - speed);
57+
speed = 100 * speed;
5858
if(mode == LOGITECH_G_POWERPLAY_MODE_STATIC)
5959
{
6060
usb_buf[0x09] = 0x02;

Controllers/LogitechController/LogitechGPowerPlayController.h

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,15 @@ enum
2222
LOGITECH_G_POWERPLAY_MODE_BREATHING = 0x03,
2323
};
2424

25+
/*---------------------------------------------------------------------------------------------*\
26+
| Speed is 1000 for fast and 20000 for slow. |
27+
| Values are mutipled by 100 later to give lots of GUI steps. |
28+
\*---------------------------------------------------------------------------------------------*/
2529
enum
2630
{
27-
LOGITECH_G_POWERPLAY_SPEED_SLOWEST = 0x01, /* Slowest speed */
28-
LOGITECH_G_POWERPLAY_SPEED_NORMAL = 0x32, /* Normal speed */
29-
LOGITECH_G_POWERPLAY_SPEED_FASTEST = 0xC8, /* Fastest speed */
31+
LOGITECH_G_POWERPLAY_SPEED_SLOWEST = 0xC8, /* Slowest speed */
32+
LOGITECH_G_POWERPLAY_SPEED_NORMAL = 0x32, /* Normal speed */
33+
LOGITECH_G_POWERPLAY_SPEED_FASTEST = 0x0A, /* Fastest speed */
3034
};
3135

3236
class LogitechGPowerPlayController

Controllers/LogitechController/LogitechGProWirelessController.h

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,15 @@ enum
2222
LOGITECH_G_PRO_WIRELESS_MODE_BREATHING = 0x03,
2323
};
2424

25+
/*---------------------------------------------------------------------------------------------*\
26+
| Speed is 1000 for fast and 20000 for slow. |
27+
| Values are mutipled by 100 later to give lots of GUI steps. |
28+
\*---------------------------------------------------------------------------------------------*/
2529
enum
26-
{ // Speed is 1000 for fast and 20000 for slow.
27-
// Values are mutipled by 100 later to give lots of GUI steps.
28-
LOGITECH_G_PRO_WIRELESS_SPEED_SLOWEST = 0xC8, /* Slowest speed */
29-
LOGITECH_G_PRO_WIRELESS_SPEED_NORMAL = 0x32, /* Normal speed */
30-
LOGITECH_G_PRO_WIRELESS_SPEED_FASTEST = 0x0A, /* Fastest speed */
30+
{
31+
LOGITECH_G_PRO_WIRELESS_SPEED_SLOWEST = 0xC8, /* Slowest speed */
32+
LOGITECH_G_PRO_WIRELESS_SPEED_NORMAL = 0x32, /* Normal speed */
33+
LOGITECH_G_PRO_WIRELESS_SPEED_FASTEST = 0x0A, /* Fastest speed */
3134
};
3235

3336
class LogitechGProWirelessController

0 commit comments

Comments
 (0)