Skip to content

Commit 50c858c

Browse files
committed
adding writing to tlm on reset
1 parent e41565c commit 50c858c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

FprimeZephyrReference/Components/PowerMonitor/PowerMonitor.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,14 @@ void PowerMonitor ::run_handler(FwIndexType portNum, U32 context) {
5151
void PowerMonitor ::RESET_TOTAL_POWER_cmdHandler(FwOpcodeType opCode, U32 cmdSeq) {
5252
this->m_totalPower_mWh = 0.0f;
5353
this->m_lastUpdateTime_s = this->getCurrentTimeSeconds();
54+
this->tlmWrite_TotalPowerConsumption(this->m_totalPower_mWh);
5455
this->log_ACTIVITY_LO_TotalPowerReset();
5556
this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::OK);
5657
}
5758

5859
void PowerMonitor ::RESET_TOTAL_GENERATION_cmdHandler(FwOpcodeType opCode, U32 cmdSeq) {
5960
this->m_totalGeneration_mWh = 0.0f;
61+
this->tlmWrite_TotalPowerGenerated(this->m_totalGeneration_mWh);
6062
this->log_ACTIVITY_LO_TotalGenerationReset();
6163
this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::OK);
6264
}

0 commit comments

Comments
 (0)