FailureDetector: replace resetAttitudeStatus

This commit is contained in:
Matthias Grob 2020-07-30 20:04:17 +02:00
parent 390edb770d
commit c180e09b9a
2 changed files with 1 additions and 11 deletions

View File

@ -47,15 +47,6 @@ FailureDetector::FailureDetector(ModuleParams *parent) :
{
}
void FailureDetector::resetAttitudeStatus()
{
int attitude_fields_bitmask = _status & (FAILURE_ROLL | FAILURE_PITCH | FAILURE_ALT | FAILURE_EXT);
if (attitude_fields_bitmask > FAILURE_NONE) {
_status &= ~attitude_fields_bitmask;
}
}
bool FailureDetector::update(const vehicle_status_s &vehicle_status)
{
uint8_t previous_status = _status;
@ -68,7 +59,7 @@ bool FailureDetector::update(const vehicle_status_s &vehicle_status)
}
} else {
resetAttitudeStatus();
_status &= ~(FAILURE_ROLL | FAILURE_PITCH | FAILURE_ALT | FAILURE_EXT);
}
if (_esc_status_sub.updated()) {

View File

@ -77,7 +77,6 @@ public:
uint8_t getStatus() const { return _status; }
private:
void resetAttitudeStatus();
bool isAttitudeStabilized(const vehicle_status_s &vehicle_status);
void updateAttitudeStatus();
void updateExternalAtsStatus();