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 enter_emergency_state ()
 ASSI LEDs blue flashing, sdc open and buzzer ringing.
 
void enter_driving_state ()
 ASSI LEDs yellow flashing, ebs valves deactivated, sdc closed.
 
void blink_led (int pin)
 Blinks the LED at the given pin.
 

Static Public Member Functions

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 enter_manual_state ()
 Everything off, sdc closed.
 
static void enter_off_state ()
 Everything off, sdc open.
 
static void enter_ready_state ()
 ASSI yellow LED on, ebs valves activated, sdc closed.
 
static void enter_finish_state ()
 ASSI blue LED on, ebs valves activated, sdc open.
 

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 37 of file digitalSender.hpp.

Member Function Documentation

◆ activate_ebs()

void DigitalSender::activate_ebs ( )
inlinestatic

Activates the solenoid EBS valves.

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

Here is the call graph for this function:
Here is the caller graph for this function:

◆ close_sdc()

void DigitalSender::close_sdc ( )
inlinestatic

Closes the SDC in Master and SDC Logic.

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

Here is the caller graph for this function:

◆ enter_driving_state()

void DigitalSender::enter_driving_state ( )
inline

ASSI LEDs yellow flashing, ebs valves deactivated, sdc closed.

Definition at line 151 of file digitalSender.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ enter_emergency_state()

void DigitalSender::enter_emergency_state ( )
inline

ASSI LEDs blue flashing, sdc open and buzzer ringing.

Definition at line 125 of file digitalSender.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ enter_finish_state()

void DigitalSender::enter_finish_state ( )
inlinestatic

ASSI blue LED on, ebs valves activated, sdc open.

Definition at line 158 of file digitalSender.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ enter_manual_state()

void DigitalSender::enter_manual_state ( )
inlinestatic

Everything off, sdc closed.

Definition at line 132 of file digitalSender.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ enter_off_state()

void DigitalSender::enter_off_state ( )
inlinestatic

Everything off, sdc open.

Definition at line 138 of file digitalSender.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ enter_ready_state()

void DigitalSender::enter_ready_state ( )
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 144 of file digitalSender.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ open_sdc()

void DigitalSender::open_sdc ( )
inlinestatic

Opens the SDC in Master and SDC Logic.

Definition at line 100 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 ASSI_BLUE_PIN
constexpr int ASSI_YELLOW_PIN
#define SDC_LOGIC_CLOSE_SDC_PIN
#define EBS_VALVE_2_PIN
#define EBS_VALVE_1_PIN
#define MASTER_SDC_OUT_PIN

Definition at line 26 of file digitalSender.hpp.


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