Rover: add arming check for windvane if sailing enabled

This commit is contained in:
Iampete1 2020-07-28 12:35:22 +01:00 committed by Randy Mackay
parent 1c789c66c3
commit 47caf886b1
1 changed files with 10 additions and 5 deletions

View File

@ -82,12 +82,17 @@ bool AP_Arming_Rover::pre_arm_checks(bool report)
return false;
}
if (rover.g2.sailboat.sail_enabled() && !rover.g2.windvane.enabled()) {
check_failed(report, "Sailing enabled with no WindVane");
return false;
}
return (AP_Arming::pre_arm_checks(report)
& rover.g2.motors.pre_arm_check(report)
& fence_checks(report)
& oa_check(report)
& parameter_checks(report)
& mode_checks(report));
&& rover.g2.motors.pre_arm_check(report)
&& fence_checks(report)
&& oa_check(report)
&& parameter_checks(report)
&& mode_checks(report));
}
bool AP_Arming_Rover::arm_checks(AP_Arming::Method method)