mirror of
https://github.com/n-e-y-s/G27_Pedals_and_Shifter.git
synced 2024-08-30 18:22:10 +00:00
Added an option to invert the brake axis.
This commit is contained in:
parent
06f899ac62
commit
dfe1f6fe4c
@ -21,8 +21,11 @@
|
||||
// red for brake, green for gas, blue for clutch
|
||||
//#define PEDAL_COLORS true
|
||||
|
||||
// for load-cell users and Australians
|
||||
//#define INVERT_BRAKE true
|
||||
|
||||
// use static thresholds rather than on-the-fly calibration
|
||||
#define STATIC_THRESHOLDS true
|
||||
//#define STATIC_THRESHOLDS true
|
||||
|
||||
// LED PINS
|
||||
#define RED_PIN 3
|
||||
@ -395,6 +398,11 @@ void loop() {
|
||||
processPedal(brakePedal);
|
||||
processPedal(clutchPedal);
|
||||
|
||||
#if defined(INVERT_BRAKE)
|
||||
Pedal* brake = (Pedal*)brakePedal;
|
||||
brake->axis = map(brake->axis, 0, MAX_AXIS, MAX_AXIS, 0);
|
||||
#endif
|
||||
|
||||
#if defined(DEBUG_PEDALS)
|
||||
describePedal("GAS", "X", gasPedal);
|
||||
describePedal("BRAKE", "Y", brakePedal);
|
||||
|
Loading…
Reference in New Issue
Block a user