2015-05-13 00:16:45 -03:00
|
|
|
#include "Rover.h"
|
|
|
|
|
2012-04-30 04:17:14 -03:00
|
|
|
/*****************************************
|
2015-11-04 23:34:24 -04:00
|
|
|
Set the flight control servos based on the current calculated values
|
2012-04-30 04:17:14 -03:00
|
|
|
*****************************************/
|
2017-07-19 05:00:13 -03:00
|
|
|
void Rover::set_servos(void)
|
|
|
|
{
|
2017-07-06 00:06:20 -03:00
|
|
|
// send output signals to motors
|
2017-07-14 23:59:28 -03:00
|
|
|
if (motor_test) {
|
|
|
|
motor_test_output();
|
|
|
|
} else {
|
2018-05-03 05:56:37 -03:00
|
|
|
// get ground speed
|
2024-05-11 05:38:39 -03:00
|
|
|
float speed = 0.0f;
|
|
|
|
g2.attitude_control.get_forward_speed(speed);
|
2018-05-03 05:56:37 -03:00
|
|
|
|
|
|
|
g2.motors.output(arming.is_armed(), speed, G_Dt);
|
2017-07-14 23:59:28 -03:00
|
|
|
}
|
2017-06-20 03:17:24 -03:00
|
|
|
}
|