2015-04-17 21:45:26 -03:00
|
|
|
// -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*-
|
|
|
|
|
2015-06-01 02:04:25 -03:00
|
|
|
#include "Tracker.h"
|
|
|
|
|
2015-04-17 21:45:26 -03:00
|
|
|
/*
|
|
|
|
* control_manual.pde - manual control mode
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* update_manual - runs the manual controller
|
|
|
|
* called at 50hz while control_mode is 'MANUAL'
|
|
|
|
*/
|
2015-06-01 02:04:25 -03:00
|
|
|
void Tracker::update_manual(void)
|
2015-04-17 21:45:26 -03:00
|
|
|
{
|
|
|
|
// copy yaw and pitch input to output
|
|
|
|
channel_yaw.radio_out = constrain_int16(channel_yaw.radio_in, channel_yaw.radio_min, channel_yaw.radio_max);
|
|
|
|
channel_pitch.radio_out = constrain_int16(channel_pitch.radio_in, channel_pitch.radio_min, channel_pitch.radio_max);
|
|
|
|
|
|
|
|
// send output to servos
|
|
|
|
channel_yaw.output();
|
|
|
|
channel_pitch.output();
|
|
|
|
}
|