Skip to content

Commit

Permalink
Fix min/max
Browse files Browse the repository at this point in the history
  • Loading branch information
lemmingDev authored Feb 24, 2024
1 parent 10f422c commit e7773ed
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions examples/DrivingControllerTest/DrivingControllerTest.ino
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,9 @@ void setup()
bleGamepadConfig.setWhichSimulationControls(enableRudder, enableThrottle, enableAccelerator, enableBrake, enableSteering); // Can also be done per-control individually. All are false by default
bleGamepadConfig.setHatSwitchCount(numOfHatSwitches); // 1 by default
// Some non-Windows operating systems and web based gamepad testers don't like min axis set below 0, so 0 is set by default
bleGamepadConfig.setAxesMin(0x8001); // -32767 --> int16_t - 16 bit signed integer - Can be in decimal or hexadecimal
bleGamepadConfig.setAxesMax(0x7FFF); // 32767 --> int16_t - 16 bit signed integer - Can be in decimal or hexadecimal

bleGamepad.begin(&bleGamepadConfig);
bleGamepadConfig.setSimulationMin(0x8001); // -32767 --> int16_t - 16 bit signed integer - Can be in decimal or hexadecimal
bleGamepadConfig.setSimulationMax(0x7FFF); //32767 --> int16_t - 16 bit signed integer - Can be in decimal or hexadecimal
bleGamepad.begin(&bleGamepadConfig);
// changing bleGamepadConfig after the begin function has no effect, unless you call the begin function again

// Set accelerator and brake to min
Expand Down

0 comments on commit e7773ed

Please sign in to comment.