Skip to content

Commit ebed1a0

Browse files
committed
moisesmata
1 parent e1f047a commit ebed1a0

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

FprimeZephyrReference/Components/Watchdog/Watchdog.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// ======================================================================
22
// \title Watchdog.cpp
3-
// \author ortega
3+
// \author moisesmata
44
// \brief cpp file for Watchdog component implementation class
55
// ======================================================================
66

@@ -47,4 +47,12 @@ void Watchdog ::stop_handler(FwIndexType portNum) {
4747
// Handler implementations for commands
4848
// ----------------------------------------------------------------------
4949

50+
void Watchdog ::STOP_WATCHDOG_cmdHandler(FwOpcodeType opCode, U32 cmdSeq) {
51+
// Set the stop flag to stop watchdog petting
52+
this->m_stopRequested = true;
53+
54+
// Provide command response
55+
this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::OK);
56+
}
57+
5058
} // namespace Components

FprimeZephyrReference/Components/Watchdog/Watchdog.fpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ module Components {
22
@ Component to blink an LED as a watchdog petter, driven by a rate group
33
passive component Watchdog {
44

5+
@ Command to stop the watchdog petter
6+
sync command STOP_WATCHDOG(
7+
)
8+
59
@ Telemetry channel to report watchdog petter state.
610
telemetry WatchdogState: Fw.On
711

FprimeZephyrReference/Components/Watchdog/Watchdog.hpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// ======================================================================
22
// \title Watchdog.hpp
3-
// \author ortega
3+
// \author moisesmata
44
// \brief hpp file for Watchdog component implementation class
55
// ======================================================================
66

@@ -50,6 +50,8 @@ class Watchdog : public WatchdogComponentBase {
5050
// Handler implementations for commands
5151
// ----------------------------------------------------------------------
5252

53+
void STOP_WATCHDOG_cmdHandler(FwOpcodeType opCode, U32 cmdSeq) override;
54+
5355

5456

5557
Fw::On m_state = Fw::On::OFF; //! Keeps track if LED is on or off

0 commit comments

Comments
 (0)