mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-25 17:43:34 +08:00
commander: add wind or flight time limit exceeded mode requirement
This prevents switching into any of these modes once the condition is set.
This commit is contained in:
@@ -147,6 +147,12 @@ void ModeChecks::checkAndReport(const Context &context, Report &reporter)
|
||||
// Here we expect there is already an event reported for the failing check (this is for external modes)
|
||||
reporter.clearCanRunBits((NavModes)reporter.failsafeFlags().mode_req_other);
|
||||
}
|
||||
|
||||
if ((reporter.failsafeFlags().flight_time_limit_exceeded || reporter.failsafeFlags().wind_limit_exceeded)
|
||||
&& reporter.failsafeFlags().mode_req_wind_and_flight_time_compliance != 0) {
|
||||
// Already reported
|
||||
reporter.clearCanRunBits((NavModes)reporter.failsafeFlags().mode_req_wind_and_flight_time_compliance);
|
||||
}
|
||||
}
|
||||
|
||||
void ModeChecks::checkArmingRequirement(const Context &context, Report &reporter)
|
||||
|
||||
Reference in New Issue
Block a user