ARES
/
Timer
Time is good
Fork of Robot2016_2-0 by
entete.h@98:2426d699362b, 2016-05-06 (annotated)
- Committer:
- Jagang
- Date:
- Fri May 06 23:55:01 2016 +0000
- Revision:
- 98:2426d699362b
- Parent:
- 97:42167cfeb8d7
petit push ? romain;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
IceTeam | 81:e7b03e81b025 | 1 | #ifndef FONCTIONS_H |
IceTeam | 81:e7b03e81b025 | 2 | #define FONCTIONS_H |
IceTeam | 81:e7b03e81b025 | 3 | |
IceTeam | 81:e7b03e81b025 | 4 | #include "RoboClaw/RoboClaw.h" |
IceTeam | 81:e7b03e81b025 | 5 | #include "mbed.h" |
IceTeam | 81:e7b03e81b025 | 6 | |
sype | 97:42167cfeb8d7 | 7 | #define PI 3.14159f |
sype | 97:42167cfeb8d7 | 8 | |
Jagang | 98:2426d699362b | 9 | #define ENTRAXE 243.8 |
Jagang | 98:2426d699362b | 10 | #define DIAMETRE_ROUE_GAUCHE 61.7 |
Jagang | 98:2426d699362b | 11 | #define DIAMETRE_ROUE_DROITE 61.8 |
Jagang | 98:2426d699362b | 12 | |
Jagang | 98:2426d699362b | 13 | #define accel_angle 3200 |
Jagang | 98:2426d699362b | 14 | #define vitesse_angle 3200 |
Jagang | 98:2426d699362b | 15 | #define deccel_angle 3200 |
Jagang | 98:2426d699362b | 16 | |
Jagang | 98:2426d699362b | 17 | #define accel_dista 4000 |
Jagang | 98:2426d699362b | 18 | #define vitesse_dista 4000 |
Jagang | 98:2426d699362b | 19 | #define deccel_dista 4000 |
Jagang | 98:2426d699362b | 20 | |
Jagang | 98:2426d699362b | 21 | #define waiting_time 1 |
Jagang | 98:2426d699362b | 22 | #define GAUCHE 1 |
Jagang | 98:2426d699362b | 23 | #define DROITE -1 |
Jagang | 98:2426d699362b | 24 | |
Jagang | 98:2426d699362b | 25 | #define VERT 1 |
Jagang | 98:2426d699362b | 26 | #define VIOLET 2 |
Jagang | 98:2426d699362b | 27 | #define NOIR 3 |
Jagang | 98:2426d699362b | 28 | |
IceTeam | 92:f09f55aa992b | 29 | /* Classes du projet : |
IceTeam | 92:f09f55aa992b | 30 | AX12 |
IceTeam | 92:f09f55aa992b | 31 | Roboclaw |
IceTeam | 93:c0b040954eac | 32 | StepperMotor |
IceTeam | 93:c0b040954eac | 33 | AX12 |
IceTeam | 92:f09f55aa992b | 34 | */ |
IceTeam | 92:f09f55aa992b | 35 | |
IceTeam | 81:e7b03e81b025 | 36 | extern BusOut drapeau; |
IceTeam | 81:e7b03e81b025 | 37 | extern RoboClaw roboclaw; |
IceTeam | 81:e7b03e81b025 | 38 | extern AnalogIn Rcapt1; |
IceTeam | 81:e7b03e81b025 | 39 | extern int RvalRcapt1; |
IceTeam | 81:e7b03e81b025 | 40 | extern AnalogIn Rcapt2; |
IceTeam | 81:e7b03e81b025 | 41 | extern int RvalRcapt2; |
IceTeam | 81:e7b03e81b025 | 42 | extern AnalogIn Rcapt3; |
IceTeam | 81:e7b03e81b025 | 43 | extern int RvalRcapt3; |
IceTeam | 81:e7b03e81b025 | 44 | extern int Ravance; |
IceTeam | 81:e7b03e81b025 | 45 | extern DigitalIn start; |
IceTeam | 81:e7b03e81b025 | 46 | |
IceTeam | 83:714fa414b2bf | 47 | extern DigitalIn CAMP; |
IceTeam | 83:714fa414b2bf | 48 | extern DigitalIn START; |
IceTeam | 83:714fa414b2bf | 49 | extern DigitalOut LEDR; |
IceTeam | 83:714fa414b2bf | 50 | extern DigitalOut LEDV; |
IceTeam | 84:b54822c913b0 | 51 | extern DigitalIn button; |
IceTeam | 83:714fa414b2bf | 52 | extern int SCouleur; |
IceTeam | 90:78d2c1527c95 | 53 | extern float R_SEUIL_SHARP; |
IceTeam | 83:714fa414b2bf | 54 | |
IceTeam | 81:e7b03e81b025 | 55 | // Fonctions main.cpp |
IceTeam | 81:e7b03e81b025 | 56 | void Sharps(); |
IceTeam | 87:60d81ecab4f5 | 57 | void endFonc (); |
IceTeam | 93:c0b040954eac | 58 | void init_globals(); |
IceTeam | 87:60d81ecab4f5 | 59 | |
IceTeam | 87:60d81ecab4f5 | 60 | //vFonctions deplacement.cpp |
Jagang | 98:2426d699362b | 61 | void GotoDist (float timer, int acc=accel_dista, int speed=vitesse_dista, int decc=deccel_dista); |
Jagang | 98:2426d699362b | 62 | void GotoArr(float timer, int acc=accel_dista, int speed=vitesse_dista, int decc=deccel_dista); |
IceTeam | 89:46730de0d013 | 63 | void GotoThet(double theta_); |
sype | 97:42167cfeb8d7 | 64 | void GotoDistPos(double distance); |
IceTeam | 81:e7b03e81b025 | 65 | |
IceTeam | 81:e7b03e81b025 | 66 | // Fonctions test.cpp |
IceTeam | 81:e7b03e81b025 | 67 | |
IceTeam | 83:714fa414b2bf | 68 | // Fonctions couleur.cpp |
IceTeam | 83:714fa414b2bf | 69 | void depart(void); |
IceTeam | 83:714fa414b2bf | 70 | void changeCamp(void); |
IceTeam | 83:714fa414b2bf | 71 | |
IceTeam | 81:e7b03e81b025 | 72 | #endif |