ardupilot/Rover/mode_hold.cpp

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
430 B
C++
Raw Normal View History

2017-07-18 23:17:45 -03:00
#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);
}
2018-09-25 10:09:47 -03:00
// relax mainsail
g2.sailboat.relax_sails();
2018-09-25 10:09:47 -03:00
2017-07-18 23:17:45 -03:00
// hold position - stop motors and center steering
g2.motors.set_throttle(throttle);
2017-07-18 23:17:45 -03:00
g2.motors.set_steering(0.0f);
}