示例#1
0
// 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();
}
示例#2
0
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);

}
示例#3
0
void Plane::reset_control_switch()
{
    oldSwitchPosition = 254;
    read_control_switch();
}
示例#4
0
void Rover::reset_control_switch()
{
    oldSwitchPosition = 254;
    read_control_switch();
}
示例#5
0
void Copter::reset_control_switch()
{
    control_switch_state.last_switch_position = control_switch_state.debounced_switch_position = -1;
    read_control_switch();
}