Feature: Set health overrides #563

Merged
muellerr merged 7 commits from feature_set_health_overrides into develop 2023-04-04 18:52:07 +02:00
16 changed files with 32 additions and 7 deletions
Showing only changes of commit 106cb1ab35 - Show all commits

View File

@@ -278,9 +278,24 @@ ReturnValue_t AcsBoardAssembly::checkAndHandleHealthStates(Mode_t deviceMode,
modeHelper.setForced(true); modeHelper.setForced(true);
} }
}; };
if (healthHelper.healthTable->getHealth(helper.gpsId) == EXTERNAL_CONTROL) { if (healthHelper.healthTable->getHealth(helper.healthDevGps0) == EXTERNAL_CONTROL or
healthHelper.healthTable->getHealth(helper.healthDevGps1) == EXTERNAL_CONTROL) {
modeHelper.setForced(true); modeHelper.setForced(true);
} }
if (healthHelper.healthTable->getHealth(helper.healthDevGps0) == PERMANENT_FAULTY and
healthHelper.healthTable->getHealth(helper.healthDevGps1) == FAULTY) {
overwriteDeviceHealth(helper.healthDevGps1, FAULTY);
} else if (healthHelper.healthTable->getHealth(helper.healthDevGps1) == PERMANENT_FAULTY and
healthHelper.healthTable->getHealth(helper.healthDevGps0) == FAULTY) {
overwriteDeviceHealth(helper.healthDevGps0, FAULTY);
} else if (healthHelper.healthTable->isFaulty(helper.healthDevGps0) or
healthHelper.healthTable->isFaulty(helper.healthDevGps1)) {
overwriteDeviceHealth(helper.healthDevGps0,
healthHelper.healthTable->getHealth(helper.healthDevGps0));
overwriteDeviceHealth(helper.healthDevGps1,
healthHelper.healthTable->getHealth(helper.healthDevGps1));
}
if (deviceSubmode == duallane::DUAL_MODE) { if (deviceSubmode == duallane::DUAL_MODE) {
checkAcsBoardSensorGroup(helper.mgm0Lis3IdSideA, helper.mgm1Rm3100IdSideA, checkAcsBoardSensorGroup(helper.mgm0Lis3IdSideA, helper.mgm1Rm3100IdSideA,
helper.mgm2Lis3IdSideB, helper.mgm3Rm3100IdSideB); helper.mgm2Lis3IdSideB, helper.mgm3Rm3100IdSideB);