-
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.
Testing to do heart beat monitor: - [x] missing FSM heart beat caught standalone (can recorded a missing heartbeat when no BMS connected) - [ ] missing FMS heart beat caught with other boards connected - [x] missing VC heart beat caught standalone (can recorded a missing heartbeat when no BMS connected) - [ ] missing VC heart beat caught with other boards connected watchdog timer: - [ ] record a timeout when infinite loop placed in code io/app: - [ ] Coolant temp transfer functions - [ ] Coolant pressure adc voltage readings - [ ] load cell adc voltage readings - [ ] load cell OCSC warning behaving as expected - [ ] suspension adc voltage reading - [ ] suspension OCSC warning behaving as expected --------- Co-authored-by: Edwin <[email protected]>
- Loading branch information
Showing
24 changed files
with
677 additions
and
179 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
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,24 @@ | ||
#include "hw_watchdogConfig.h" | ||
#include "hw_hal.h" | ||
#include <string.h> | ||
#include "app_canAlerts.h" | ||
#include "app_canTx.h" | ||
#include "io_canTx.h" | ||
#include "hw_utils.h" | ||
|
||
// TODO: Re-enable watchdog. | ||
// extern IWDG_HandleTypeDef hiwdg; | ||
|
||
void hw_watchdogConfig_refresh(void) | ||
{ | ||
// HAL_IWDG_Refresh(&hiwdg); | ||
} | ||
|
||
void hw_watchdogConfig_timeoutCallback(WatchdogHandle *watchdog) | ||
{ | ||
BREAK_IF_DEBUGGER_CONNECTED(); | ||
|
||
const uint8_t watchdog_id = hw_watchdog_getTaskId(watchdog); | ||
app_canAlerts_RSM_Warning_WatchdogTimeout_set(true); | ||
app_canTx_RSM_WatchdogTimeoutTaskName_set((RtosTaskName)watchdog_id); | ||
} |
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,6 @@ | ||
#pragma once | ||
|
||
#include "hw_watchdog.h" | ||
|
||
void hw_watchdogConfig_refresh(void); | ||
void hw_watchdogConfig_timeoutCallback(WatchdogHandle *watchdog); |
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,13 @@ | ||
#include "io_brake_light.h" | ||
|
||
static const BinaryLed *brake_light = NULL; | ||
|
||
void io_brake_light_init(const BinaryLed *brake_light_in) | ||
{ | ||
brake_light = brake_light_in; | ||
} | ||
|
||
void io_brake_light_set(bool val) | ||
{ | ||
io_led_enable(brake_light, val); | ||
} |
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,8 @@ | ||
#pragma once | ||
|
||
#ifdef TARGET_EMBEDDED | ||
#include "io_led.h" | ||
void io_brake_light_init(const BinaryLed *brake_light); | ||
#endif | ||
|
||
void io_brake_light_set(bool val); |
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 "io_fan.h" | ||
|
||
static const Gpio *acc_fan = NULL; | ||
static const Gpio *rad_fan = NULL; | ||
|
||
void io_fan_init(const Gpio *acc_fan_in, const Gpio *rad_fan_in) | ||
{ | ||
acc_fan = acc_fan_in; | ||
rad_fan = rad_fan_in; | ||
} | ||
|
||
void io_acc_fan_set(bool on) | ||
{ | ||
hw_gpio_writePin(acc_fan, on); | ||
} | ||
|
||
void io_rad_fan_set(bool on) | ||
{ | ||
hw_gpio_writePin(rad_fan, on); | ||
} |
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,13 @@ | ||
#pragma once | ||
|
||
#include <stdbool.h> | ||
#include "app_utils.h" | ||
|
||
#ifdef TARGET_EMBEDDED | ||
#include "hw_gpio.h" | ||
void io_fan_init(const Gpio *acc_fan_in, const Gpio *rad_fan_in); | ||
#endif | ||
|
||
void io_acc_fan_set(bool on); | ||
|
||
void io_rad_fan_set(bool on); |
Oops, something went wrong.