Formula Student Electronics & Software
The code for the embedded software
Loading...
Searching...
No Matches
digitalSettings.hpp
Go to the documentation of this file.
1#pragma once
2
3#define COMPONENT_TIMESTAMP_TIMEOUT 500
4#define RES_TIMESTAMP_TIMEOUT 200
5#define EBS_BUZZER_TIMEOUT 8000
6#define LED_BLINK_INTERVAL 500
7#define INITIAL_CHECKUP_STEP_TIMEOUT 500
8#define WATCHDOG_TOGGLE_FREQUENCY 100
9#define WATCHDOG_TIMEOUT 500
10
11#define WHEEL_MEASUREMENT_INTERVAL_MS 30 // 30ms // TODO(andre): change to adequate value
12#define WHEEL_MEASUREMENT_INTERVAL_MIN (WHEEL_MEASUREMENT_INTERVAL_MS / 60000.0)
13#define PULSES_PER_ROTATION 48
14
15// Number of consecutive different values of a digital input to consider change
16// (to avoid noise)
17#define DIGITAL_INPUT_COUNTER_LIMIT 5
18#define WD_PULSE_INTERVAL_MS 10
19// TODO(andre): confirm wd timer values
20
21/*
22 * ===========
23 * OUTPUT PINS
24 * ===========
25 */
26
27#define ASSI_BLUE_PIN 7
28#define ASSI_YELLOW_PIN 4
29
30
31#define SDC_LOGIC_CLOSE_SDC_PIN 8
32#define SDC_LOGIC_WATCHDOG_OUT_PIN 10
33#define EBS_VALVE_1_PIN 29
34#define EBS_VALVE_2_PIN 30
35#define MASTER_SDC_OUT_PIN 31
36
37/*
38 * ==========
39 * INPUT PINS
40 * ==========
41 */
42
43#define LWSS_PIN 32
44
45// When pressure on the line passes the threshold defined, pin is set to HIGH
46#define SENSOR_PRESSURE_2_PIN 6
47#define SENSOR_PRESSURE_1_PIN 5
48
49// Mission pins
50
51#define MISSION_MANUAL_PIN 39
52#define MISSION_AUTOCROSS_PIN 41
53#define MISSION_TRACKDRIVE_PIN 14
54#define MISSION_SKIDPAD_PIN 16
55#define MISSION_INSPECTION_PIN 18
56#define MISSION_ACCELERATION_PIN 20
57#define MISSION_EBSTEST_PIN 21
58
59
60#define SDC_STATE_PIN 37
61#define SDC_LOGIC_WATCHDOG_IN_PIN 35
62#define ASMS_IN_PIN 33