ArduPilot飞行前检查——PreArm解析

ArduPilot飞行前检查 主要包括两个部分:
1. 初始化中遥控器输入检查;
2. 1Hz解锁前检查。
附: 显示地面站信息
参考文章:Ardupilot Pre-Arm安全检查程序分析

1. 初始化中遥控器输入检查

在这里插入图片描述
直接跳转进去查看函数为;

bool AP_Arming_Copter::rc_calibration_checks(bool display_failure)
{
   
    const RC_Channel *channels[] = {
   
        copter.channel_roll,
        copter.channel_pitch,
        copter.channel_throttle,
        copter.channel_yaw
    };

    copter.ap.pre_arm_rc_check = rc_checks_copter_sub(display_failure, channels)
        & AP_Arming::rc_calibration_checks(display_failure);

    return copter.ap.pre_arm_rc_check;
}
// Copter and sub share the same RC input limits
// Copter checks that min and max have been configured by default, Sub does not
bool AP_Arming::rc_checks_copter_sub(const bool display_failure, const RC_Channel *channels[4]) const
{
   
    // set rc-checks to success if RC checks are disabled
    if ((checks_to_perform != ARMING_CHECK_ALL) && !(checks_to_perform & ARMING_CHECK_RC)) {
   
        return true;
    }

    bool ret = true;

    const char *channel_names[] = {
    "Roll", "Pitch", "Throttle", "Yaw" };

    for (
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值