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_REAR () |
Disables EBS actuator 1. | |
static void | enable_ebs_actuator_REAR () |
Enables EBS actuator 1. | |
static void | disable_ebs_actuator_FRONT () |
Disables EBS actuator 2. | |
static void | enable_ebs_actuator_FRONT () |
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 123 of file digitalSender.hpp.
|
inline |
Blinks the LED at the given pin.
pin | The pin to blink. |
Definition at line 150 of file digitalSender.hpp.
|
inline |
Turns on the BSPD error signal.
Definition at line 160 of file digitalSender.hpp.
|
inlinestatic |
Closes the SDC in Master and SDC Logic.
Definition at line 121 of file digitalSender.hpp.
|
inlinestatic |
Closes the watchdog signal for SDC.
Definition at line 171 of file digitalSender.hpp.
|
inlinestatic |
Deactivates the solenoid EBS valves.
Definition at line 128 of file digitalSender.hpp.
|
inlinestatic |
Disables EBS actuator 2.
Definition at line 137 of file digitalSender.hpp.
|
inlinestatic |
Disables EBS actuator 1.
Definition at line 133 of file digitalSender.hpp.
|
inlinestatic |
Enables EBS actuator 2.
Definition at line 139 of file digitalSender.hpp.
|
inlinestatic |
Enables EBS actuator 1.
Definition at line 135 of file digitalSender.hpp.
|
inline |
Turns off the BSPD error signal.
Definition at line 162 of file digitalSender.hpp.
|
inlinestatic |
Opens the SDC in Master and SDC Logic.
Definition at line 119 of file digitalSender.hpp.
|
inlinestatic |
Toggles the watchdog signal.
Definition at line 164 of file digitalSender.hpp.
|
inlinestatic |
Turns off both ASSI LEDs (yellow and blue).
Definition at line 141 of file digitalSender.hpp.
|
inline |
Turns off the brake light.
Definition at line 158 of file digitalSender.hpp.
|
inline |
Turns on the blue ASSI LED.
Definition at line 148 of file digitalSender.hpp.
|
inline |
Turns on the brake light.
Definition at line 156 of file digitalSender.hpp.
|
inline |
Turns on the yellow ASSI LED.
Definition at line 146 of file digitalSender.hpp.
|
staticconstexpr |
Definition at line 19 of file digitalSender.hpp.