make SW more robust

This commit is contained in:
2022-03-14 09:38:58 +01:00
parent 4c7b527735
commit 4415cb4eda
4 changed files with 35 additions and 30 deletions

View File

@ -365,7 +365,7 @@ ReturnValue_t pst::pstSpi(FixedTimeslotTaskIF *thisSequence) {
#if OBSW_ADD_ACS_BOARD == 1 && OBSW_ADD_ACS_HANDLERS == 1
bool enableAside = true;
bool enableBside = true;
bool enableBside = false;
if (enableAside) {
// A side
thisSequence->addSlot(objects::MGM_0_LIS3_HANDLER, length * 0,
@ -431,17 +431,7 @@ ReturnValue_t pst::pstSpi(FixedTimeslotTaskIF *thisSequence) {
}
#endif /* OBSW_ADD_ACS_BOARD == 1 && OBSW_ADD_ACS_HANDLERS == 1 */
ReturnValue_t seqCheck = thisSequence->checkSequence();
if (seqCheck != HasReturnvaluesIF::RETURN_OK) {
if (seqCheck == FixedTimeslotTaskIF::SLOT_LIST_EMPTY) {
sif::warning << "SPI PST is empty.." << std::endl;
} else {
sif::error << "SPI PST initialization failed" << std::endl;
}
return seqCheck;
}
return HasReturnvaluesIF::RETURN_OK;
return thisSequence->checkSequence();
}
ReturnValue_t pst::pstI2c(FixedTimeslotTaskIF *thisSequence) {
@ -463,11 +453,7 @@ ReturnValue_t pst::pstI2c(FixedTimeslotTaskIF *thisSequence) {
thisSequence->addSlot(objects::BPX_BATT_HANDLER, length * 0.8, DeviceHandlerIF::GET_READ);
#endif
static_cast<void>(length);
if (thisSequence->checkSequence() != HasReturnvaluesIF::RETURN_OK) {
sif::error << "I2C PST initialization failed" << std::endl;
return HasReturnvaluesIF::RETURN_FAILED;
}
return HasReturnvaluesIF::RETURN_OK;
return thisSequence->checkSequence();
}
ReturnValue_t pst::pstUart(FixedTimeslotTaskIF *thisSequence) {