diff --git a/linux/payload/FreshSupvHandler.cpp b/linux/payload/FreshSupvHandler.cpp index 31f42924..bed2ce90 100644 --- a/linux/payload/FreshSupvHandler.cpp +++ b/linux/payload/FreshSupvHandler.cpp @@ -11,12 +11,15 @@ FreshSupvHandler::FreshSupvHandler(DhbConfig cfg, CookieIF *comCookie, Gpio uart PowerSwitchIF &switchIF, power::Switch_t powerSwitch, PlocSupvUartManager &supvHelper) : FreshDeviceHandlerBase(cfg), + uartManager(supvHelper), + comCookie(comCookie), + switchIF(switchIF), + switchId(powerSwitch), hkSet(this), bootStatusReport(this), latchupStatusReport(this), countersReport(this), - adcReport(this), - uartManager(supvHelper) {} + adcReport(this) {} void FreshSupvHandler::performDeviceOperation(uint8_t opCode) { if (!transitionActive and mode == MODE_OFF) { @@ -26,7 +29,7 @@ void FreshSupvHandler::performDeviceOperation(uint8_t opCode) { if (opCode == OpCode::DEFAULT_OPERATION) { if (transitionActive) { // TODO: Perform transition handling: OFF to ON and ON to OFF. - // For OFF to ON, command power switch first, then to isolato switch handling, and lastly + // For OFF to ON, command power switch first, then to isolator switch handling, and lastly // ensure succesfull communication // For ON to OFF ???? } else { @@ -128,11 +131,6 @@ ReturnValue_t FreshSupvHandler::initializeLocalDataPool(localpool::DataPool &loc return returnvalue::OK; } -ReturnValue_t FreshSupvHandler::setHealth(HealthState health) { - // TODO: Go to off is the device is commanded faulty. - return returnvalue::OK; -} - ReturnValue_t FreshSupvHandler::executeAction(ActionId_t actionId, MessageQueueId_t commandedBy, const uint8_t *data, size_t size) { // TODO: Handle all commands here. Need to add them to some command map. Send command immediately diff --git a/linux/payload/FreshSupvHandler.h b/linux/payload/FreshSupvHandler.h index fdb38514..655b8126 100644 --- a/linux/payload/FreshSupvHandler.h +++ b/linux/payload/FreshSupvHandler.h @@ -30,8 +30,6 @@ class FreshSupvHandler : public FreshDeviceHandlerBase { ReturnValue_t handleCommandMessage(CommandMessage* message) override; private: - ReturnValue_t setHealth(HealthState health) override; - // HK manager abstract functions. LocalPoolDataSetBase* getDataSetHandle(sid_t sid) override; ReturnValue_t initializeLocalDataPool(localpool::DataPool& localDataPoolMap, @@ -46,6 +44,9 @@ class FreshSupvHandler : public FreshDeviceHandlerBase { private: PlocSupvUartManager uartManager; + CookieIF* comCookie; + PowerSwitchIF& switchIF; + power::Switch_t switchId; supv::HkSet hkSet; supv::BootStatusReport bootStatusReport;