TRR 2018 / Mbed 2 deprecated biniou-TRR2019-DLVV

Dependencies:   mbed MPU6050

utils.h

Committer:
GaspardD
Date:
2019-10-02
Revision:
8:f23601373e8b
Parent:
6:ab9f3695633f
Child:
9:1b54bac6d9a7

File content as of revision 8:f23601373e8b:

#ifndef UTILS_H
#define UTILS_H

#include "mbed.h"
#include "chassis_mode.h"

/*
Structs
*/

typedef struct s_section {
   double targetSpeed_mps;
   double consigne_position;
   double lng_section_m;
   double coef_p;
   double coef_i;
   double coef_d;
   s_section* nextSection;
}s_Section;


/*
Globals
*/
extern Timer t_utils_timerSinceStart;
extern bool b_UTILS_flag_button_ESC;
extern bool b_UTILS_flag_button_SECTIONS;
extern bool b_UTILS_flag_emergency_stop;

extern Serial rs_UTILS_pc;
extern Serial rs_UTILS_odroid;
extern InterruptIn b_UTILS_button;
extern InterruptIn b_UTILS_emergency_signal;

extern s_Section* s_UTILS_currentSection;


/*
Functions
*/
void it_pressed();
void it_emergency_signal_recieved();

#endif