v1.10.0 #220

Merged
meierj merged 592 commits from develop into main 2022-04-22 07:42:20 +02:00
3 changed files with 12 additions and 3 deletions
Showing only changes of commit 9c6f349a08 - Show all commits

View File

@ -22,6 +22,7 @@ enum: uint8_t {
PL_PCDU_HANDLER = 121,
ACS_BOARD_ASS = 122,
SUS_BOARD_ASS = 123,
TCS_BOARD_ASS = 124,
COMMON_SUBSYSTEM_ID_END
};
}

View File

@ -64,9 +64,9 @@ ReturnValue_t TcsBoardAssembly::checkChildrenStateOn(Mode_t wantedMode, Submode_
} catch (const std::out_of_range& e) {
sif::error << "TcsBoardAssembly: Invalid children map: " << e.what() << std::endl;
}
if (devsInWrongMode == 16) {
if (devsInWrongMode >= 3) {
if (warningSwitch) {
sif::warning << "TcsBoardAssembly::checkChildrenStateOn: All devices in"
sif::warning << "TcsBoardAssembly::checkChildrenStateOn: " << devsInWrongMode << " devices in"
<< " wrong mode" << std::endl;
warningSwitch = false;
}
@ -191,7 +191,8 @@ void TcsBoardAssembly::handleModeReached() {
}
void TcsBoardAssembly::handleChildrenLostMode(ReturnValue_t result) {
// TODO: Maybe trigger event
// TODO: Maybe try a reboot once here?
triggerEvent(CHILDREN_LOST_MODE, result);
return;
}

View File

@ -13,6 +13,10 @@ struct TcsBoardHelper {
class TcsBoardAssembly : public AssemblyBase, public ConfirmsFailuresIF {
public:
static constexpr uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::TCS_BOARD_ASS;
static constexpr Event CHILDREN_LOST_MODE =
event::makeEvent(SUBSYSTEM_ID, 0, severity::MEDIUM);
TcsBoardAssembly(object_id_t objectId, object_id_t parentId, PowerSwitchIF* pwrSwitcher,
power::Switch_t switcher, TcsBoardHelper helper);
@ -46,6 +50,9 @@ class TcsBoardAssembly : public AssemblyBase, public ConfirmsFailuresIF {
ReturnValue_t isModeCombinationValid(Mode_t mode, Submode_t submode) override;
void startTransition(Mode_t mode, Submode_t submode) override;
void handleModeReached() override;
// These two overrides prevent a transition of the whole assembly back to off just because
// some devices are not working
void handleChildrenLostMode(ReturnValue_t result) override;
void handleModeTransitionFailed(ReturnValue_t result) override;
};