![]() |
SAE Teensy ECU
IIT SAE Microcontroller programming
|
A module used to both ensure a connection to both ECUs using CAN and to periodically run callbacks. More...
Typedefs | |
| typedef void(* | beatFunc) (void) |
| Function called each time the heart beats. | |
Functions | |
| void | beginBeating () |
| begin sending a beat signal at a set interval | |
| void | beginReceiving () |
| Set callback to receive beats over CAN. | |
| int | checkBeat () |
| Poll if a beat has been received. | |
| void | addCallback (beatFunc func) |
| Add a callback to be run at each haertbeat. | |
A module used to both ensure a connection to both ECUs using CAN and to periodically run callbacks.
Currently, Heartbeat::beginBeating() is run on the back ECU and Heartbeat::beginReceiving() is run on the front ECU.
Heartbeat::checkBeat() must be polled on the front ECU to log whether or not a heart beat is being detected
| typedef void(* Heartbeat::beatFunc) (void) |
Function called each time the heart beats.
Definition at line 35 of file Heartbeat.h.
| void Heartbeat::addCallback | ( | beatFunc | func | ) |
Add a callback to be run at each haertbeat.
| func | Callback function |
| int Heartbeat::checkBeat | ( | ) |
Poll if a beat has been received.