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 | blink_led (int pin) |
Blinks the LED at the given pin. | |
void | turn_on_brake_light () |
Turns on the brake light. | |
void | turn_off_brake_light () |
Turns off the brake light. | |
void | bspd_error () |
Turns on the BSPD error signal. | |
void | no_bspd_error () |
Turns off the BSPD error signal. | |
void | turn_on_yellow () |
Turns on the yellow ASSI LED. | |
void | turn_on_blue () |
Turns on the blue ASSI LED. | |
Static Public Member Functions | |
static void | turn_off_assi () |
Turns off both ASSI LEDs (yellow and blue). | |
static void | open_sdc () |
Opens the SDC in Master and SDC Logic. | |
static void | close_sdc () |
Closes the SDC in Master and SDC Logic. | |
static void | activate_ebs () |
Activates the solenoid EBS valves. | |
static void | deactivate_ebs () |
Deactivates the solenoid EBS valves. | |
static void | disable_ebs_actuator_1 () |
Disables EBS actuator 1. | |
static void | enable_ebs_actuator_1 () |
Enables EBS actuator 1. | |
static void | disable_ebs_actuator_2 () |
Disables EBS actuator 2. | |
static void | enable_ebs_actuator_2 () |
Enables EBS actuator 2. | |
static void | toggle_watchdog () |
Toggles the watchdog signal. | |
static void | close_watchdog_sdc () |
Closes the watchdog signal for SDC. | |
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 15 of file digitalSender.hpp.
|
inline |
Constructor for the DigitalSender class.
Initializes the pins for output as defined in validOutputPins.
Definition at line 30 of file digitalSender.hpp.
|
inlinestatic |
Activates the solenoid EBS valves.
Definition at line 122 of file digitalSender.hpp.
|
inline |
Blinks the LED at the given pin.
pin | The pin to blink. |
Definition at line 149 of file digitalSender.hpp.
|
inline |
Turns on the BSPD error signal.
Definition at line 159 of file digitalSender.hpp.
|
inlinestatic |
Closes the SDC in Master and SDC Logic.
Definition at line 120 of file digitalSender.hpp.
|
inlinestatic |
Closes the watchdog signal for SDC.
Definition at line 170 of file digitalSender.hpp.
|
inlinestatic |
Deactivates the solenoid EBS valves.
Definition at line 127 of file digitalSender.hpp.
|
inlinestatic |
Disables EBS actuator 1.
Definition at line 132 of file digitalSender.hpp.
|
inlinestatic |
Disables EBS actuator 2.
Definition at line 136 of file digitalSender.hpp.
|
inlinestatic |
Enables EBS actuator 1.
Definition at line 134 of file digitalSender.hpp.
|
inlinestatic |
Enables EBS actuator 2.
Definition at line 138 of file digitalSender.hpp.
|
inline |
Turns off the BSPD error signal.
Definition at line 161 of file digitalSender.hpp.
|
inlinestatic |
Opens the SDC in Master and SDC Logic.
Definition at line 118 of file digitalSender.hpp.
|
inlinestatic |
Toggles the watchdog signal.
Definition at line 163 of file digitalSender.hpp.
|
inlinestatic |
Turns off both ASSI LEDs (yellow and blue).
Definition at line 140 of file digitalSender.hpp.
|
inline |
Turns off the brake light.
Definition at line 157 of file digitalSender.hpp.
|
inline |
Turns on the blue ASSI LED.
Definition at line 147 of file digitalSender.hpp.
|
inline |
Turns on the brake light.
Definition at line 155 of file digitalSender.hpp.
|
inline |
Turns on the yellow ASSI LED.
Definition at line 145 of file digitalSender.hpp.
|
staticconstexpr |
Definition at line 19 of file digitalSender.hpp.