ardupilot/APMrover2/mode_hold.cpp
Randy Mackay a5e28f0729 Rover: balancebot_pitch_control method removes unused armed arg
Also remove constraint on throttle output (this is handle in the AP_MotorsUGV library
Also move balance bot declarations to alphabetical order within Rover.h
2018-08-27 16:44:33 +09:00

17 lines
394 B
C++

#include "mode.h"
#include "Rover.h"
void ModeHold::update()
{
float throttle = 0.0f;
// if vehicle is balance bot, calculate actual throttle required for balancing
if (rover.is_balancebot()) {
rover.balancebot_pitch_control(throttle);
}
// hold position - stop motors and center steering
g2.motors.set_throttle(throttle);
g2.motors.set_steering(0.0f);
}