commander: try to fix arm authorization spamming

Signed-off-by: RomanBapst <bapstroman@gmail.com>
This commit is contained in:
RomanBapst
2024-10-07 14:05:02 +03:00
committed by Roman Bapst
parent e3dd050c91
commit a0e6f9cd70
5 changed files with 12 additions and 4 deletions
@@ -50,12 +50,14 @@ HealthAndArmingChecks::HealthAndArmingChecks(ModuleParams *parent, vehicle_statu
_failsafe_flags.home_position_invalid = true;
}
bool HealthAndArmingChecks::update(bool force_reporting)
bool HealthAndArmingChecks::update(bool force_reporting, bool is_arming_request)
{
_reporter.reset();
_reporter.prepare(_context.status().vehicle_type);
_context.setIsArmingRequest(is_arming_request);
for (unsigned i = 0; i < sizeof(_checks) / sizeof(_checks[0]); ++i) {
if (!_checks[i]) {
break;