diff --git a/controller_teensy/src/main.cpp b/controller_teensy/src/main.cpp index 275c94b..695752f 100644 --- a/controller_teensy/src/main.cpp +++ b/controller_teensy/src/main.cpp @@ -563,10 +563,10 @@ void calculateSetSpeed(unsigned long timediff){ - if (control_buttonA && !control_buttonB && !reverse_enabled && throttle_pos<=0) { //Right button (A) only. and throttle touched + if (control_buttonA && !control_buttonB && !reverse_enabled && throttle_pos>0) { //Right button (A) only. and throttle touched tanksteering_differential+=tanksteering_rate_increase*(timediff/1000.0); tanksteering_differential=constrain(tanksteering_differential,-1.0,1.0); //constrain between 0 and 1 - }else if(control_buttonB && !control_buttonA && !reverse_enabled && throttle_pos<=0) { //Left button (B) only. and throttle touched + }else if(control_buttonB && !control_buttonA && !reverse_enabled && throttle_pos>0) { //Left button (B) only. and throttle touched tanksteering_differential-=tanksteering_rate_increase*(timediff/1000.0); tanksteering_differential=constrain(tanksteering_differential,-1.0,1.0); //constrain between 0 and 1 }else{ //buttons released