Skip to content

Commit e1f047a

Browse files
committed
Ensure blink every rate group tick
1 parent 3caa0ec commit e1f047a

File tree

1 file changed

+13
-27
lines changed

1 file changed

+13
-27
lines changed

FprimeZephyrReference/Components/Watchdog/Watchdog.cpp

Lines changed: 13 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -21,32 +21,6 @@ Watchdog ::~Watchdog() {}
2121
// Handler implementations for user-defined typed input ports
2222
// ----------------------------------------------------------------------
2323

24-
// If stop requested, turn off LED
25-
else {
26-
if (this->m_state == Fw::On::ON) {
27-
// Port may not be connected, so check before sending output
28-
if (this->isConnected_gpioSet_OutputPort(0)) {
29-
this->gpioSet_out(0, Fw::Logic::LOW);
30-
}
31-
32-
this->m_state = Fw::On::OFF;
33-
this->log_ACTIVITY_LO_WatchdogState(this->m_state);
34-
}
35-
}
36-
}
37-
38-
void Watchdog ::stop_handler(FwIndexType portNum) {
39-
// Set the stop flag to stop watchdog petting
40-
this->m_stopRequested = true;
41-
}
42-
43-
// ----------------------------------------------------------------------
44-
// Handler implementations for commands
45-
// ----------------------------------------------------------------------
46-
47-
48-
49-
} // namespace Components
5024
void Watchdog ::run_handler(FwIndexType portNum, U32 context) {
5125
// Only perform actions when stop not requested
5226
if (!this->m_stopRequested) {
@@ -61,4 +35,16 @@ void Watchdog ::run_handler(FwIndexType portNum, U32 context) {
6135
}
6236

6337
this->log_ACTIVITY_LO_WatchdogState(this->m_state);
64-
}
38+
}
39+
}
40+
41+
void Watchdog ::stop_handler(FwIndexType portNum) {
42+
// Set the stop flag to stop watchdog petting
43+
this->m_stopRequested = true;
44+
}
45+
46+
// ----------------------------------------------------------------------
47+
// Handler implementations for commands
48+
// ----------------------------------------------------------------------
49+
50+
} // namespace Components

0 commit comments

Comments
 (0)