Formula Student Electronics & Software
The code for the embedded software
Loading...
Searching...
No Matches
DigitalSender Class Reference

Class responsible for controlling digital outputs in the Master Teensy. More...

#include <digitalSender.hpp>

Collaboration diagram for DigitalSender:
Collaboration graph

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
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ DigitalSender()

DigitalSender::DigitalSender ( )
inline

Constructor for the DigitalSender class.

Initializes the pins for output as defined in validOutputPins.

Definition at line 30 of file digitalSender.hpp.

Here is the call graph for this function:

Member Function Documentation

◆ activate_ebs()

void DigitalSender::activate_ebs ( )
inlinestatic

Activates the solenoid EBS valves.

Definition at line 123 of file digitalSender.hpp.

Here is the caller graph for this function:

◆ blink_led()

void DigitalSender::blink_led ( int  pin)
inline

Blinks the LED at the given pin.

Parameters
pinThe pin to blink.

Definition at line 150 of file digitalSender.hpp.

Here is the caller graph for this function:

◆ bspd_error()

void DigitalSender::bspd_error ( )
inline

Turns on the BSPD error signal.

Definition at line 160 of file digitalSender.hpp.

◆ close_sdc()

void DigitalSender::close_sdc ( )
inlinestatic

Closes the SDC in Master and SDC Logic.

Definition at line 121 of file digitalSender.hpp.

Here is the caller graph for this function:

◆ close_watchdog_sdc()

void DigitalSender::close_watchdog_sdc ( )
inlinestatic

Closes the watchdog signal for SDC.

Definition at line 171 of file digitalSender.hpp.

Here is the caller graph for this function:

◆ deactivate_ebs()

void DigitalSender::deactivate_ebs ( )
inlinestatic

Deactivates the solenoid EBS valves.

Definition at line 128 of file digitalSender.hpp.

Here is the caller graph for this function:

◆ disable_ebs_actuator_FRONT()

void DigitalSender::disable_ebs_actuator_FRONT ( )
inlinestatic

Disables EBS actuator 2.

Definition at line 137 of file digitalSender.hpp.

◆ disable_ebs_actuator_REAR()

void DigitalSender::disable_ebs_actuator_REAR ( )
inlinestatic

Disables EBS actuator 1.

Definition at line 133 of file digitalSender.hpp.

◆ enable_ebs_actuator_FRONT()

void DigitalSender::enable_ebs_actuator_FRONT ( )
inlinestatic

Enables EBS actuator 2.

Definition at line 139 of file digitalSender.hpp.

◆ enable_ebs_actuator_REAR()

void DigitalSender::enable_ebs_actuator_REAR ( )
inlinestatic

Enables EBS actuator 1.

Definition at line 135 of file digitalSender.hpp.

◆ no_bspd_error()

void DigitalSender::no_bspd_error ( )
inline

Turns off the BSPD error signal.

Definition at line 162 of file digitalSender.hpp.

◆ open_sdc()

void DigitalSender::open_sdc ( )
inlinestatic

Opens the SDC in Master and SDC Logic.

Definition at line 119 of file digitalSender.hpp.

Here is the caller graph for this function:

◆ toggle_watchdog()

void DigitalSender::toggle_watchdog ( )
inlinestatic

Toggles the watchdog signal.

Definition at line 164 of file digitalSender.hpp.

Here is the caller graph for this function:

◆ turn_off_assi()

void DigitalSender::turn_off_assi ( )
inlinestatic

Turns off both ASSI LEDs (yellow and blue).

Definition at line 141 of file digitalSender.hpp.

Here is the caller graph for this function:

◆ turn_off_brake_light()

void DigitalSender::turn_off_brake_light ( )
inline

Turns off the brake light.

Definition at line 158 of file digitalSender.hpp.

◆ turn_on_blue()

void DigitalSender::turn_on_blue ( )
inline

Turns on the blue ASSI LED.

Definition at line 148 of file digitalSender.hpp.

Here is the caller graph for this function:

◆ turn_on_brake_light()

void DigitalSender::turn_on_brake_light ( )
inline

Turns on the brake light.

Definition at line 156 of file digitalSender.hpp.

◆ turn_on_yellow()

void DigitalSender::turn_on_yellow ( )
inline

Turns on the yellow ASSI LED.

Definition at line 146 of file digitalSender.hpp.

Here is the caller graph for this function:

Member Data Documentation

◆ validOutputPins

constexpr std::array<int, 9> DigitalSender::validOutputPins
staticconstexpr
Initial value:
= {
}
constexpr int SDC_BSPD_OUT
constexpr int CLOSE_SDC
constexpr int EBS_VALVE_FRONT_PIN
constexpr int EBS_VALVE_REAR_PIN
constexpr int WD_SDC_CLOSE
constexpr int WD_ALIVE
constexpr int ASSI_BLUE_PIN
constexpr int BRAKE_LIGHT
constexpr int ASSI_YELLOW_PIN

Definition at line 19 of file digitalSender.hpp.


The documentation for this class was generated from the following file: