TRR 2018 / Mbed 2 deprecated biniou-TRR2019-chassis2

Dependencies:   mbed MPU6050

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers utils.h Source File

utils.h

00001 #ifndef UTILS_H
00002 #define UTILS_H
00003 
00004 #include "mbed.h"
00005 #include "chassis_mode.h"
00006 #include "log.h"
00007 
00008 /*
00009 Structs
00010 */
00011 
00012 typedef struct s_section {
00013    double targetSpeed_mps;
00014    double consigne_position;
00015    double lng_section_m;
00016    double coef_pos;
00017    double coef_bord;
00018    double plagePulseFreinage;
00019    s_section* nextSection;
00020 }s_Section;
00021 
00022 /*
00023 Globals
00024 */
00025 extern Timer t_utils_timerSinceStart;
00026 extern bool b_UTILS_flag_button_ESC;
00027 extern bool b_UTILS_flag_button_SECTIONS;
00028 extern bool b_UTILS_flag_emergency_stop;
00029 
00030 extern InterruptIn b_UTILS_button;
00031 extern InterruptIn b_UTILS_emergency_signal;
00032 extern InterruptIn b_UTILS_startOnPin;
00033 
00034 extern s_Section* s_UTILS_currentSection;
00035 
00036 
00037 /*
00038 Functions
00039 */
00040 void it_pressed();
00041 void it_emergency_signal_recieved();
00042 void bubbleSort(double arr[], int n);
00043 void swap(double *xp, double *yp);
00044 
00045 #endif