Rover: balancing function call moved to manual mode update()
This commit is contained in:
parent
6c2f18cc2f
commit
c65405541e
@ -241,10 +241,6 @@ void AP_MotorsUGV::output(bool armed, float ground_speed, float dt)
|
||||
// slew limit throttle
|
||||
slew_limit_throttle(dt);
|
||||
|
||||
if (rover.is_BalanceBot()) {
|
||||
rover.balance_pitch(_throttle, armed);
|
||||
}
|
||||
|
||||
// output for regular steering/throttle style frames
|
||||
output_regular(armed, ground_speed, _steering, _throttle);
|
||||
|
||||
|
@ -13,6 +13,11 @@ void ModeManual::update()
|
||||
get_pilot_desired_steering_and_throttle(desired_steering, desired_throttle);
|
||||
get_pilot_desired_lateral(desired_lateral);
|
||||
|
||||
// if vehicle is balance bot, calculate actual throttle required for balancing
|
||||
if (rover.is_BalanceBot()) {
|
||||
rover.balance_pitch(desired_throttle, rover.arming.is_armed());
|
||||
}
|
||||
|
||||
// copy RC scaled inputs to outputs
|
||||
g2.motors.set_throttle(desired_throttle);
|
||||
g2.motors.set_steering(desired_steering, false);
|
||||
|
Loading…
Reference in New Issue
Block a user