SoC Calculator #754
@ -564,6 +564,19 @@ bool PayloadPcduHandler::checkCurrent(float val, float upperBound, Event event)
|
||||
return true;
|
||||
}
|
||||
|
||||
ReturnValue_t PayloadPcduHandler::checkModeCommand(Mode_t commandedMode, Submode_t commandedSubmode,
|
||||
uint32_t* msToReachTheMode) {
|
||||
if (commandedMode != MODE_OFF) {
|
||||
PoolReadGuard pg(&enablePl);
|
||||
if (pg.getReadResult() == returnvalue::OK) {
|
||||
if (enablePl.plUseAllowed.isValid() and not enablePl.plUseAllowed.value) {
|
||||
return NON_OP_SOC;
|
||||
}
|
||||
}
|
||||
}
|
||||
return DeviceHandlerBase::checkModeCommand(commandedMode, commandedSubmode, msToReachTheMode);
|
||||
}
|
||||
|
||||
ReturnValue_t PayloadPcduHandler::isModeCombinationValid(Mode_t mode, Submode_t submode) {
|
||||
using namespace plpcdu;
|
||||
if (mode == MODE_NORMAL) {
|
||||
|
@ -4,6 +4,7 @@
|
||||
#include <fsfw/devicehandlers/DeviceHandlerBase.h>
|
||||
#include <fsfw/globalfunctions/PeriodicOperationDivider.h>
|
||||
#include <fsfw/timemanager/Countdown.h>
|
||||
#include <mission/controller/controllerdefinitions/PowerCtrlDefinitions.h>
|
||||
#include <mission/payload/payloadPcduDefinitions.h>
|
||||
#include <mission/system/objects/Stack5VHandler.h>
|
||||
|
||||
@ -76,6 +77,8 @@ class PayloadPcduHandler : public DeviceHandlerBase {
|
||||
#endif
|
||||
|
||||
private:
|
||||
pwrctrl::EnablePl enablePl = pwrctrl::EnablePl(objects::POWER_CONTROLLER);
|
||||
|
||||
static constexpr bool NO_ADC_CHECKS = false;
|
||||
|
||||
enum class States : uint8_t {
|
||||
@ -152,6 +155,8 @@ class PayloadPcduHandler : public DeviceHandlerBase {
|
||||
uint32_t getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) override;
|
||||
ReturnValue_t initializeLocalDataPool(localpool::DataPool& localDataPoolMap,
|
||||
LocalDataPoolManager& poolManager) override;
|
||||
ReturnValue_t checkModeCommand(Mode_t commandedMode, Submode_t commandedSubmode,
|
||||
uint32_t* msToReachTheMode) override;
|
||||
ReturnValue_t isModeCombinationValid(Mode_t mode, Submode_t submode) override;
|
||||
ReturnValue_t getParameter(uint8_t domainId, uint8_t uniqueId, ParameterWrapper* parameterWrapper,
|
||||
const ParameterWrapper* newValues, uint16_t startAtIndex) override;
|
||||
|
Loading…
Reference in New Issue
Block a user