// rc_loops - reads user input from transmitter/receiver // called at 100hz void Copter::rc_loop() { // Read radio and 3-position switch on radio // ----------------------------------------- read_radio(); read_control_switch(); }
void Copter::rc_loop() { // Read radio and 3-position switch on radio // ----------------------------------------- read_radio(); read_control_switch(); /******************************************* * 添加者:程志强 * 描述:首先向两个舵机发送指令,然后接受数据,并向日志中书写数据 * 修改日期:2016/5/5,2016/6/24 * 频率提高到400Hz ******************************************* */ /******************************************* * 添加者:程志强 * 描述:首先向两个舵机发送指令,然后接受数据,并向日志中书写数据 * 修改日期:2016/6/24 ******************************************* */ chuart.send_token(); chuart.readUart(); DataFlash.Log_Write_Act(chuart.sd[0],0); DataFlash.Log_Write_Act(chuart.sd[1],1); }
void Plane::reset_control_switch() { oldSwitchPosition = 254; read_control_switch(); }
void Rover::reset_control_switch() { oldSwitchPosition = 254; read_control_switch(); }
void Copter::reset_control_switch() { control_switch_state.last_switch_position = control_switch_state.debounced_switch_position = -1; read_control_switch(); }