Skip to content

Commit 7d03af7

Browse files
committed
reset time
1 parent 4317b99 commit 7d03af7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

FprimeZephyrReference/Components/PowerMonitor/PowerMonitor.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,16 @@ 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->m_lastUpdateTime_s = 0.0;
5455
this->tlmWrite_TotalPowerConsumption(this->m_totalPower_mWh);
5556
this->log_ACTIVITY_LO_TotalPowerReset();
5657
this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::OK);
5758
}
5859

5960
void PowerMonitor ::RESET_TOTAL_GENERATION_cmdHandler(FwOpcodeType opCode, U32 cmdSeq) {
6061
this->m_totalGeneration_mWh = 0.0f;
62+
this->m_lastUpdateTime_s = this->getCurrentTimeSeconds();
63+
this->m_lastUpdateTime_s = 0.0;
6164
this->tlmWrite_TotalPowerGenerated(this->m_totalGeneration_mWh);
6265
this->log_ACTIVITY_LO_TotalGenerationReset();
6366
this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::OK);

0 commit comments

Comments
 (0)