Formula Student Electronics & Software
The code for the embedded software
|
Go to the source code of this file.
Macros | |
#define | GREEN_LED_1 4 |
#define | GREEN_LED_2 5 |
#define | GREEN_LED_3 6 |
#define | RED_LED_1 0 |
#define | RED_LED_2 1 |
#define | YELLOW_LED_1 2 |
#define | YELLOW_LED_2 3 |
#define | BUTTON_1 7 |
#define | BUTTON_2 8 |
#define | BUTTON_3 9 |
#define | BUTTON_4 10 |
#define | BUTTON_5 11 |
#define | BUTTON_6 12 |
#define | POTENCIO 14 |
#define | BK_SENSOR_PIN POTENCIO |
#define | R2D_PIN BUTTON_1 |
#define | TSON_PIN BUTTON_2 |
#define | AS_READY_PIN BUTTON_3 |
#define | STOP_PIN BUTTON_4 |
#define | STATE_IDLE_GREEN_LED_1_PIN GREEN_LED_1 |
#define | STATE_IDLE_GREEN_LED_2_PIN GREEN_LED_2 |
#define | STATE_IDLE_GREEN_LED_3_PIN GREEN_LED_3 |
#define | STATE_DRIVING_RED_LED_1_PIN RED_LED_1 |
#define | STATE_DRIVING_RED_LED_2_PIN RED_LED_2 |
#define | STATE_ASDRIVING_YELLOW_LED_1_PIN YELLOW_LED_1 |
#define | STATE_ASDRIVING_YELLOW_LED_2_PIN YELLOW_LED_2 |
Functions | |
void | brakeValueUpdate () |
void | updateTS () |
void | updateASReady () |
void | stopTest () |
void | test_state_machine () |
void | test_IDLE_2_DRIVING () |
void | test_IDLE_2_ASDRIVING () |
void | test_ASDRIVING_2_IDLE () |
void | test_DRIVING_2_IDLE () |
void | Setup () |
int | main (int argc, char **argv) |
Variables | |
volatile bool | TSOn |
#define AS_READY_PIN BUTTON_3 |
Definition at line 25 of file test_C3.cpp.
#define BK_SENSOR_PIN POTENCIO |
Definition at line 22 of file test_C3.cpp.
#define BUTTON_1 7 |
Definition at line 12 of file test_C3.cpp.
#define BUTTON_2 8 |
Definition at line 13 of file test_C3.cpp.
#define BUTTON_3 9 |
Definition at line 14 of file test_C3.cpp.
#define BUTTON_4 10 |
Definition at line 15 of file test_C3.cpp.
#define BUTTON_5 11 |
Definition at line 16 of file test_C3.cpp.
#define BUTTON_6 12 |
Definition at line 17 of file test_C3.cpp.
#define GREEN_LED_1 4 |
Definition at line 5 of file test_C3.cpp.
#define GREEN_LED_2 5 |
Definition at line 6 of file test_C3.cpp.
#define GREEN_LED_3 6 |
Definition at line 7 of file test_C3.cpp.
#define POTENCIO 14 |
Definition at line 18 of file test_C3.cpp.
#define R2D_PIN BUTTON_1 |
Definition at line 23 of file test_C3.cpp.
#define RED_LED_1 0 |
Definition at line 8 of file test_C3.cpp.
#define RED_LED_2 1 |
Definition at line 9 of file test_C3.cpp.
#define STATE_ASDRIVING_YELLOW_LED_1_PIN YELLOW_LED_1 |
Definition at line 32 of file test_C3.cpp.
#define STATE_ASDRIVING_YELLOW_LED_2_PIN YELLOW_LED_2 |
Definition at line 33 of file test_C3.cpp.
#define STATE_DRIVING_RED_LED_1_PIN RED_LED_1 |
Definition at line 30 of file test_C3.cpp.
#define STATE_DRIVING_RED_LED_2_PIN RED_LED_2 |
Definition at line 31 of file test_C3.cpp.
#define STATE_IDLE_GREEN_LED_1_PIN GREEN_LED_1 |
Definition at line 27 of file test_C3.cpp.
#define STATE_IDLE_GREEN_LED_2_PIN GREEN_LED_2 |
Definition at line 28 of file test_C3.cpp.
#define STATE_IDLE_GREEN_LED_3_PIN GREEN_LED_3 |
Definition at line 29 of file test_C3.cpp.
#define STOP_PIN BUTTON_4 |
Definition at line 26 of file test_C3.cpp.
#define TSON_PIN BUTTON_2 |
Definition at line 24 of file test_C3.cpp.
#define YELLOW_LED_1 2 |
Definition at line 10 of file test_C3.cpp.
#define YELLOW_LED_2 3 |
Definition at line 11 of file test_C3.cpp.
void brakeValueUpdate | ( | ) |
int main | ( | int | argc, |
char ** | argv | ||
) |
void Setup | ( | ) |
void stopTest | ( | ) |
void test_ASDRIVING_2_IDLE | ( | ) |
void test_DRIVING_2_IDLE | ( | ) |
void test_IDLE_2_ASDRIVING | ( | ) |
void test_IDLE_2_DRIVING | ( | ) |
void test_state_machine | ( | ) |
Definition at line 60 of file test_C3.cpp.
void updateASReady | ( | ) |
void updateTS | ( | ) |
volatile bool TSOn |
Definition at line 35 of file test_C3.cpp.