2017-07-18 23:17:45 -03:00
|
|
|
#include "mode.h"
|
|
|
|
#include "Rover.h"
|
|
|
|
|
|
|
|
void ModeManual::update()
|
|
|
|
{
|
2017-11-29 03:12:13 -04:00
|
|
|
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);
|
2017-07-18 04:29:05 -03:00
|
|
|
|
|
|
|
// 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()));
|
|
|
|
}
|