Browse Source

Rover: balance bot stands in acro with no position estimate

apm_2208
Randy Mackay 3 years ago
parent
commit
a79ad5489c
  1. 6
      Rover/mode_acro.cpp

6
Rover/mode_acro.cpp

@ -9,6 +9,12 @@ void ModeAcro::update() @@ -9,6 +9,12 @@ void ModeAcro::update()
float desired_throttle;
// convert pilot stick input into desired steering and throttle
get_pilot_desired_steering_and_throttle(desired_steering, desired_throttle);
// if vehicle is balance bot, calculate actual throttle required for balancing
if (rover.is_balancebot()) {
rover.balancebot_pitch_control(desired_throttle);
}
// no valid speed, just use the provided throttle
g2.motors.set_throttle(desired_throttle);
} else {

Loading…
Cancel
Save