-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
### Changelist <!-- Give a list of the changes covered in this PR. This will help both you and the reviewer keep this PR within scope. --> - Changed structure of heartbeat monitor config. (see `firmware/shared/src/app/app_heartbeatMonitorBoard.h`) - Gives sturcture towards future app level refactor ### Testing Done <!-- Outline the testing that was done to demonstrate the changes are solid. This could be unit tests, integration tests, testing on the car, etc. Include relevant code snippets, screenshots, etc as needed. --> - fixed tests for all boards - adapted shared heartbeat monitor to new structure ### Resolved Tickets <!-- Link any tickets that this PR resolves. -->
- Loading branch information
Showing
41 changed files
with
418 additions
and
1,043 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
message("") | ||
message("⚙️ Configuring LogFS") | ||
|
||
set(LOGFS_INCLUDE_DIRS | ||
"${CMAKE_CURRENT_SOURCE_DIR}/src" | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#include "app_heartbeatMonitors.h" | ||
#include "app_canRx.h" | ||
#include "app_canAlerts.h" | ||
#include "app_canTx.h" | ||
|
||
static HeartbeatBoard heartbeat_boards[1] = { | ||
// vc | ||
{ | ||
.getter = app_canRx_VC_Heartbeat_get, | ||
.resetter = app_canRx_VC_Heartbeat_update, | ||
.fault_setter = app_canAlerts_BMS_Warning_MissingVCHeartbeat_set, | ||
.fault_getter = app_canAlerts_BMS_Warning_MissingVCHeartbeat_get, | ||
.timeout_ms = 200, | ||
} | ||
}; | ||
|
||
HeartbeatMonitor hb_monitor = { .boards = heartbeat_boards, | ||
.board_count = 1, | ||
.block_faults = false, | ||
.own_heartbeat = app_canTx_BMS_Heartbeat_set }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#pragma once | ||
|
||
#include "app_heartbeatMonitor.h" | ||
|
||
extern HeartbeatMonitor hb_monitor; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#include "app_heartbeatMonitors.h" | ||
|
||
#include "app_canTx.h" | ||
#include "app_canRx.h" | ||
#include "app_canAlerts.h" | ||
|
||
static HeartbeatBoard heartbeat_boards[4] = { | ||
// bms | ||
{ .getter = app_canRx_BMS_Heartbeat_get, | ||
.resetter = app_canRx_BMS_Heartbeat_update, | ||
.fault_setter = app_canAlerts_CRIT_Fault_MissingBMSHeartbeat_set, | ||
.fault_getter = app_canAlerts_CRIT_Fault_MissingBMSHeartbeat_get, | ||
.timeout_ms = 200 }, | ||
// vc | ||
{ .getter = app_canRx_VC_Heartbeat_get, | ||
.resetter = app_canRx_VC_Heartbeat_update, | ||
.fault_setter = app_canAlerts_CRIT_Fault_MissingVCHeartbeat_set, | ||
.fault_getter = app_canAlerts_CRIT_Fault_MissingVCHeartbeat_get, | ||
.timeout_ms = 200 }, | ||
// rsm | ||
{ .getter = app_canRx_RSM_Heartbeat_get, | ||
.resetter = app_canRx_RSM_Heartbeat_update, | ||
.fault_setter = app_canAlerts_CRIT_Fault_MissingRSMHeartbeat_set, | ||
.fault_getter = app_canAlerts_CRIT_Fault_MissingRSMHeartbeat_get, | ||
.timeout_ms = 200 }, | ||
// fsm | ||
{ .getter = app_canRx_FSM_Heartbeat_get, | ||
.resetter = app_canRx_FSM_Heartbeat_update, | ||
.fault_setter = app_canAlerts_CRIT_Fault_MissingFSMHeartbeat_set, | ||
.fault_getter = app_canAlerts_CRIT_Fault_MissingFSMHeartbeat_get, | ||
.timeout_ms = 200 } | ||
}; | ||
|
||
HeartbeatMonitor hb_monitor = { .boards = heartbeat_boards, | ||
.board_count = 4, | ||
.block_faults = false, | ||
.own_heartbeat = app_canTx_CRIT_Heartbeat_set }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#pragma once | ||
|
||
#include "app_heartbeatMonitor.h" | ||
|
||
extern HeartbeatMonitor hb_monitor; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.