22 static void turn_off_assi();
120inline void DigitalSender::turn_off_assi() {
166 static bool blink_state =
false;
167 if (blink_imer_.
check()) {
168 blink_state = !blink_state;
169 analogWrite(pin, blink_state * 1023);
Class responsible for controlling digital outputs in the Master Teensy.
void enter_emergency_state()
ASSI LEDs blue flashing, sdc open and buzzer ringing.
static constexpr std::array< int, 9 > validOutputPins
DigitalSender()
Constructor for the DigitalSender class.
void blink_led(int pin)
Blinks the LED at the given pin.
static void enter_finish_state()
ASSI blue LED on, ebs valves activated, sdc open.
static void enter_manual_state()
Everything off, sdc closed.
void enter_driving_state()
ASSI LEDs yellow flashing, ebs valves deactivated, sdc closed.
static void activate_ebs()
Activates the solenoid EBS valves.
static void deactivate_ebs()
Deactivates the solenoid EBS valves.
static void open_sdc()
Opens the SDC in Master and SDC Logic.
static void enter_ready_state()
ASSI yellow LED on, ebs valves activated, sdc closed.
static void close_sdc()
Closes the SDC in Master and SDC Logic.
static void enter_off_state()
Everything off, sdc open.
Our own implementation of Metro class.
void reset()
Resets the timer to the current time.
bool check()
Checks if the interval has passed and resets the timer if true.
constexpr int LED_BLINK_INTERVAL
constexpr int ASSI_BLUE_PIN
constexpr int ASSI_YELLOW_PIN
#define SDC_LOGIC_CLOSE_SDC_PIN
#define MASTER_SDC_OUT_PIN