Skip to content

Commit c3f4888

Browse files
committed
init to 0
1 parent 7d03af7 commit c3f4888

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

FprimeZephyrReference/Components/PowerMonitor/PowerMonitor.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,18 +50,16 @@ void PowerMonitor ::run_handler(FwIndexType portNum, U32 context) {
5050

5151
void PowerMonitor ::RESET_TOTAL_POWER_cmdHandler(FwOpcodeType opCode, U32 cmdSeq) {
5252
this->m_totalPower_mWh = 0.0f;
53-
this->m_lastUpdateTime_s = this->getCurrentTimeSeconds();
54-
this->m_lastUpdateTime_s = 0.0;
5553
this->tlmWrite_TotalPowerConsumption(this->m_totalPower_mWh);
54+
this->m_lastUpdateTime_s = 0.0;
5655
this->log_ACTIVITY_LO_TotalPowerReset();
5756
this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::OK);
5857
}
5958

6059
void PowerMonitor ::RESET_TOTAL_GENERATION_cmdHandler(FwOpcodeType opCode, U32 cmdSeq) {
6160
this->m_totalGeneration_mWh = 0.0f;
62-
this->m_lastUpdateTime_s = this->getCurrentTimeSeconds();
63-
this->m_lastUpdateTime_s = 0.0;
6461
this->tlmWrite_TotalPowerGenerated(this->m_totalGeneration_mWh);
62+
this->m_lastUpdateTime_s = 0.0;
6563
this->log_ACTIVITY_LO_TotalGenerationReset();
6664
this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::OK);
6765
}

0 commit comments

Comments
 (0)