Formula Student Electronics & Software
The code for the embedded software
|
Class responsible for controlling digital outputs in the Master Teensy. More...
#include <digitalSender.hpp>
Public Member Functions | |
DigitalSender () | |
Constructor for the DigitalSender class. | |
void | enterEmergencyState () |
ASSI LEDs blue flashing, sdc open and buzzer ringing. | |
void | enterDrivingState () |
ASSI LEDs yellow flashing, ebs valves deactivated, sdc closed. | |
void | blinkLED (int pin) |
Blinks the LED at the given pin. | |
void | toggleWatchdog () |
Toggles the watchdog pin, to ensure certify of masters' liveness. | |
Static Public Member Functions | |
static void | openSDC () |
Opens the SDC in Master and SDC Logic. | |
static void | closeSDC () |
Closes the SDC in Master and SDC Logic. | |
static void | activateEBS () |
Activates the solenoid EBS valves. | |
static void | deactivateEBS () |
Deactivates the solenoid EBS valves. | |
static void | enterManualState () |
Everything off, sdc closed. | |
static void | enterOffState () |
Everything off, sdc open. | |
static void | enterReadyState () |
ASSI yellow LED on, ebs valves activated, sdc closed. | |
static void | enterFinishState () |
ASSI blue LED on, ebs valves activated, sdc open. | |
Static Public Attributes | |
static constexpr std::array< int, 9 > | validOutputPins |
Class responsible for controlling digital outputs in the Master Teensy.
The DigitalSender class handles various operations such as controlling LEDs, EBS valves, SDC state, and watchdog signals. It also manages different operational states such as emergency, manual, ready, driving, and finish.
Definition at line 14 of file digitalSender.hpp.
|
inline |
Constructor for the DigitalSender class.
Initializes the pins for output as defined in validOutputPins.
Definition at line 41 of file digitalSender.hpp.
|
inlinestatic |
Activates the solenoid EBS valves.
Definition at line 119 of file digitalSender.hpp.
|
inline |
Blinks the LED at the given pin.
pin | The pin to blink. |
Definition at line 174 of file digitalSender.hpp.
|
inlinestatic |
Closes the SDC in Master and SDC Logic.
Definition at line 114 of file digitalSender.hpp.
|
inlinestatic |
Deactivates the solenoid EBS valves.
Definition at line 124 of file digitalSender.hpp.
|
inline |
ASSI LEDs yellow flashing, ebs valves deactivated, sdc closed.
Definition at line 160 of file digitalSender.hpp.
|
inline |
ASSI LEDs blue flashing, sdc open and buzzer ringing.
Definition at line 134 of file digitalSender.hpp.
|
inlinestatic |
ASSI blue LED on, ebs valves activated, sdc open.
Definition at line 167 of file digitalSender.hpp.
|
inlinestatic |
Everything off, sdc closed.
Definition at line 141 of file digitalSender.hpp.
|
inlinestatic |
Everything off, sdc open.
Definition at line 147 of file digitalSender.hpp.
|
inlinestatic |
ASSI yellow LED on, ebs valves activated, sdc closed.
these 2 should be redundant since we do it during initial checkup
Definition at line 153 of file digitalSender.hpp.
|
inlinestatic |
Opens the SDC in Master and SDC Logic.
Definition at line 109 of file digitalSender.hpp.
|
inline |
Toggles the watchdog pin, to ensure certify of masters' liveness.
Definition at line 182 of file digitalSender.hpp.
|
staticconstexpr |
Definition at line 26 of file digitalSender.hpp.