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_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
 

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.

Member Function Documentation

◆ activate_ebs()

void DigitalSender::activate_ebs ( )
inlinestatic

Activates the solenoid EBS valves.

Definition at line 122 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 149 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 159 of file digitalSender.hpp.

◆ close_sdc()

void DigitalSender::close_sdc ( )
inlinestatic

Closes the SDC in Master and SDC Logic.

Definition at line 120 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 170 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 127 of file digitalSender.hpp.

Here is the caller graph for this function:

◆ disable_ebs_actuator_1()

void DigitalSender::disable_ebs_actuator_1 ( )
inlinestatic

Disables EBS actuator 1.

Definition at line 132 of file digitalSender.hpp.

◆ disable_ebs_actuator_2()

void DigitalSender::disable_ebs_actuator_2 ( )
inlinestatic

Disables EBS actuator 2.

Definition at line 136 of file digitalSender.hpp.

◆ enable_ebs_actuator_1()

void DigitalSender::enable_ebs_actuator_1 ( )
inlinestatic

Enables EBS actuator 1.

Definition at line 134 of file digitalSender.hpp.

◆ enable_ebs_actuator_2()

void DigitalSender::enable_ebs_actuator_2 ( )
inlinestatic

Enables EBS actuator 2.

Definition at line 138 of file digitalSender.hpp.

◆ no_bspd_error()

void DigitalSender::no_bspd_error ( )
inline

Turns off the BSPD error signal.

Definition at line 161 of file digitalSender.hpp.

◆ open_sdc()

void DigitalSender::open_sdc ( )
inlinestatic

Opens the SDC in Master and SDC Logic.

Definition at line 118 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 163 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 140 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 157 of file digitalSender.hpp.

◆ turn_on_blue()

void DigitalSender::turn_on_blue ( )
inline

Turns on the blue ASSI LED.

Definition at line 147 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 155 of file digitalSender.hpp.

◆ turn_on_yellow()

void DigitalSender::turn_on_yellow ( )
inline

Turns on the yellow ASSI LED.

Definition at line 145 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 WD_SDC_CLOSE
constexpr int WD_ALIVE
constexpr int ASSI_BLUE_PIN
constexpr int BRAKE_LIGHT
constexpr int ASSI_YELLOW_PIN
#define EBS_VALVE_2_PIN
#define EBS_VALVE_1_PIN

Definition at line 19 of file digitalSender.hpp.


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