ardupilot/APMrover2/mode_manual.cpp

16 lines
483 B
C++
Raw Normal View History

2017-07-18 23:17:45 -03:00
#include "mode.h"
#include "Rover.h"
void ModeManual::update()
{
float desired_steering, desired_throttle;
get_pilot_desired_steering_and_throttle(desired_steering, desired_throttle);
// copy RC scaled inputs to outputs
g2.motors.set_throttle(desired_throttle);
g2.motors.set_steering(desired_steering, false);
// mark us as in_reverse when using a negative throttle to stop AHRS getting off
2017-07-18 23:17:45 -03:00
rover.set_reverse(is_negative(g2.motors.get_throttle()));
}