diff --git a/mission/controller/PowerController.cpp b/mission/controller/PowerController.cpp index bfecc67c..595a74f2 100644 --- a/mission/controller/PowerController.cpp +++ b/mission/controller/PowerController.cpp @@ -2,7 +2,10 @@ #include PowerController::PowerController(object_id_t objectId, bool enableHkSets) - : ExtendedControllerBase(objectId), enableHkSets(enableHkSets), parameterHelper(this) {} + : ExtendedControllerBase(objectId), + enableHkSets(enableHkSets), + parameterHelper(this), + stateOfChargeData(this) {} ReturnValue_t PowerController::initialize() { ReturnValue_t result = parameterHelper.initialize(); @@ -48,9 +51,10 @@ void PowerController::performControlOperation() { return; } case InternalState::READY: { - if (mode != MODE_OFF) { - // do something - } + // if (mode != MODE_OFF) { + sif::debug << "oh shit, now i gotta do something" << std::endl; + // do something + //} break; } default: diff --git a/mission/controller/PowerController.h b/mission/controller/PowerController.h index 8e2f6339..70a7b297 100644 --- a/mission/controller/PowerController.h +++ b/mission/controller/PowerController.h @@ -5,6 +5,9 @@ #include #include #include +#include +#include +#include class PowerController : public ExtendedControllerBase, public ReceivesParameterMessagesIF { public: @@ -35,6 +38,15 @@ class PowerController : public ExtendedControllerBase, public ReceivesParameterM ReturnValue_t checkModeCommand(Mode_t mode, Submode_t submode, uint32_t* msToReachTheMode) override; void performControlOperation() override; + + // HK Datasets for Calculation + BpxBatteryHk bpxBatteryHk = BpxBatteryHk(objects::BPX_BATT_HANDLER); + P60Dock::CoreHkSet p60CoreHk = P60Dock::CoreHkSet(objects::P60DOCK_HANDLER); + PDU1::Pdu1CoreHk pdu1CoreHk = PDU1::Pdu1CoreHk(objects::PDU1_HANDLER); + PDU2::Pdu2CoreHk pdu2CoreHk = PDU2::Pdu2CoreHk(objects::PDU2_HANDLER); + ACU::CoreHk acuCoreHk = ACU::CoreHk(objects::ACU_HANDLER); + // Output Dataset + pwrctrl::StateOfChargedData stateOfChargeData; }; #endif /* MISSION_CONTROLLER_POWERCONTROLLER_H_ */ diff --git a/mission/controller/controllerdefinitions/PowerCtrlDefinitions.h b/mission/controller/controllerdefinitions/PowerCtrlDefinitions.h new file mode 100644 index 00000000..d4eeeed0 --- /dev/null +++ b/mission/controller/controllerdefinitions/PowerCtrlDefinitions.h @@ -0,0 +1,29 @@ +#ifndef MISSION_CONTROLLER_CONTROLLERDEFINITIONS_POWERCTRLDEFINITIONS_H_ +#define MISSION_CONTROLLER_CONTROLLERDEFINITIONS_POWERCTRLDEFINITIONS_H_ + +#include +#include + +#include + +namespace pwrctrl { + +enum SetIds : uint32_t { STATE_OF_CHARGE_DATA }; + +enum PoolIds : lp_id_t { + +}; + +static constexpr uint8_t STATE_OF_CHARGE_ENTRIES = 6; + +class StateOfChargedData : public StaticLocalDataSet { + public: + StateOfChargedData(HasLocalDataPoolIF* hkOwner) + : StaticLocalDataSet(hkOwner, STATE_OF_CHARGE_DATA) {} + + private: +}; + +} // namespace pwrctrl + +#endif /* MISSION_CONTROLLER_CONTROLLERDEFINITIONS_POWERCTRLDEFINITIONS_H_ */