mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-23 00:58:37 -04:00
DataFlash: eliminate calls to manipulate _writes_enabled
This commit is contained in:
parent
19a9690102
commit
bd747006aa
@ -212,6 +212,7 @@ public:
|
||||
bool logging_failed() const;
|
||||
|
||||
void set_vehicle_armed(bool armed_state);
|
||||
bool vehicle_is_armed() const { return _armed; }
|
||||
|
||||
protected:
|
||||
|
||||
|
@ -265,5 +265,9 @@ bool DataFlash_Backend::WritesOK() const
|
||||
if (!_writes_enabled) {
|
||||
return false;
|
||||
}
|
||||
if (!_front.vehicle_is_armed() && !_front.log_while_disarmed()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user