code avec modifs, programme mit dans les robots pour les derniers matchs

Dependencies:   mbed SerialHalfDuplex SDFileSystem liaison_Bluetooth ident_crac DISCO-F469NI_portrait

Committer:
gabrieltetar
Date:
Wed Jul 08 08:19:16 2020 +0000
Revision:
24:1a13c998c7ac
Parent:
22:c7763a7ec6c7
Child:
27:ff70537a7619
revert

Who changed what in which revision?

UserRevisionLine numberNew contents of line
gabrieltetar 21:d137ec53c3a9 1 #include "global.h"
gabrieltetar 21:d137ec53c3a9 2
gabrieltetar 21:d137ec53c3a9 3 #define VERT 0xFF00FF00
gabrieltetar 21:d137ec53c3a9 4 #define ROUGE 0xFFFF0000
gabrieltetar 21:d137ec53c3a9 5 #define BLEU 0xFF0000FF
gabrieltetar 21:d137ec53c3a9 6 #define JAUNE 0xFFFDD835//FEFE00
gabrieltetar 21:d137ec53c3a9 7 #define BLANC 0xFF000000
gabrieltetar 21:d137ec53c3a9 8 #define ORANGE 0xFFFFA500
gabrieltetar 21:d137ec53c3a9 9 #define NOIR 0xFF000000
gabrieltetar 21:d137ec53c3a9 10 #define DIY_GREY 0xFFDFDFDF
gabrieltetar 21:d137ec53c3a9 11 #define VIOLET 0xFF4527A0
gabrieltetar 21:d137ec53c3a9 12 TS_DISCO_F469NI ts;
gabrieltetar 21:d137ec53c3a9 13 LCD_DISCO_F469NI lcd;
gabrieltetar 21:d137ec53c3a9 14
gabrieltetar 21:d137ec53c3a9 15
gabrieltetar 21:d137ec53c3a9 16 TS_StateTypeDef TS_State;
gabrieltetar 21:d137ec53c3a9 17
gabrieltetar 21:d137ec53c3a9 18
gabrieltetar 21:d137ec53c3a9 19 /////////////////DEFINITION DES BOUTONS////////////////////
gabrieltetar 21:d137ec53c3a9 20 Button COTE_JAUNE(0, 25, 400, 300, "JAUNE");
gabrieltetar 21:d137ec53c3a9 21 Button COTE_VIOLET(0, 350, 400, 300, "VIOLET");
gabrieltetar 21:d137ec53c3a9 22 Button RETOUR (0, 680, 400, 110, "--Precedent--");
gabrieltetar 21:d137ec53c3a9 23 Button LANCER (0, 200, 400, 200, "--LANCER--");
gabrieltetar 21:d137ec53c3a9 24 Button CHECK (0, 420, 400, 200, "Valider");
gabrieltetar 21:d137ec53c3a9 25 Button MATCH (0, 50, 400, 320, "Match");
gabrieltetar 21:d137ec53c3a9 26 Button DEMONSTRATION (0, 400, 400, 320, "Demo");
gabrieltetar 21:d137ec53c3a9 27 //menu demo
gabrieltetar 21:d137ec53c3a9 28 Button TEST_VENT(0, 25, 400, 100, "Test ventouses");
gabrieltetar 21:d137ec53c3a9 29 Button TEST_MOT(0, 135, 400, 100, "Test moteur");
gabrieltetar 21:d137ec53c3a9 30 Button TEST_COUL(0,245,400,100,"Test capteurs couleur");
gabrieltetar 21:d137ec53c3a9 31 Button TEST_BRAS(0,355,400,100,"Test Bras");
gabrieltetar 21:d137ec53c3a9 32 Button TEST_AUDIO(0,465,400,100,"Test Audio");
gabrieltetar 22:c7763a7ec6c7 33
gabrieltetar 22:c7763a7ec6c7 34 Button TEST_NEXT(0,575,400,100,"------>");
gabrieltetar 22:c7763a7ec6c7 35 Button TEST_DIV(0,25,400,100,"Test Divers");
gabrieltetar 22:c7763a7ec6c7 36 Button TEST_ASSERV(0, 135, 400, 100, "Test asserv");
gabrieltetar 21:d137ec53c3a9 37 //menu demo/demo/
gabrieltetar 21:d137ec53c3a9 38 Button TEST_A(0,25,195,100,"A");
gabrieltetar 21:d137ec53c3a9 39 Button TEST_B(205,25,195,100,"B");
gabrieltetar 21:d137ec53c3a9 40 Button TEST_C(0,135,195,100,"C");
gabrieltetar 21:d137ec53c3a9 41 Button TEST_D(205,135,195,100,"D");
gabrieltetar 22:c7763a7ec6c7 42 Button TEST_NUM(0,245,400,100,"Num");
gabrieltetar 21:d137ec53c3a9 43 Button TEST_PLUS(205,355,195,100,"+");
gabrieltetar 21:d137ec53c3a9 44 Button TEST_MOINS(0,355,195,100,"-");
gabrieltetar 22:c7763a7ec6c7 45 Button FORCE_LAUNCH(0, 600, 400, 100, "Force Launch");
gabrieltetar 21:d137ec53c3a9 46 Button SUIVANT(0,380,200,100,"Suivant");
gabrieltetar 21:d137ec53c3a9 47 ////////////////////////////////////////////////////////////
gabrieltetar 24:1a13c998c7ac 48
gabrieltetar 21:d137ec53c3a9 49 signed char Bouton_Strat (void);
gabrieltetar 24:1a13c998c7ac 50
gabrieltetar 21:d137ec53c3a9 51 void SelectionStrat (unsigned char numeroStrat);
gabrieltetar 21:d137ec53c3a9 52
gabrieltetar 21:d137ec53c3a9 53 /****************************************************************************************/
gabrieltetar 21:d137ec53c3a9 54 /* FUNCTION NAME: automate_etat_ihm */
gabrieltetar 21:d137ec53c3a9 55 /* DESCRIPTION : Automate de gestion de l'affichage */
gabrieltetar 21:d137ec53c3a9 56 /****************************************************************************************/
gabrieltetar 21:d137ec53c3a9 57 void automate_etat_ihm(void)
gabrieltetar 21:d137ec53c3a9 58 {
gabrieltetar 21:d137ec53c3a9 59 char toto[2];
gabrieltetar 21:d137ec53c3a9 60 int j;
gabrieltetar 21:d137ec53c3a9 61 unsigned char maximilien=1;
gabrieltetar 21:d137ec53c3a9 62 if (j==0) {
gabrieltetar 21:d137ec53c3a9 63 ts.Init(lcd.GetXSize(), lcd.GetYSize());
gabrieltetar 21:d137ec53c3a9 64 j++;
gabrieltetar 21:d137ec53c3a9 65 }
gabrieltetar 21:d137ec53c3a9 66 ts.GetState(&TS_State);
gabrieltetar 21:d137ec53c3a9 67 switch (strat_etat_s) {
gabrieltetar 24:1a13c998c7ac 68 case INIT : //intialise l'écran et passe à l'attente d'initialisation des cartes
gabrieltetar 21:d137ec53c3a9 69 ts.GetState(&TS_State);
gabrieltetar 22:c7763a7ec6c7 70 canProcessRx();
gabrieltetar 24:1a13c998c7ac 71 lcd.SetBackColor(LCD_COLOR_WHITE);
gabrieltetar 24:1a13c998c7ac 72 lcd.SetTextColor(LCD_COLOR_BLACK);
gabrieltetar 24:1a13c998c7ac 73 lcd.Clear (LCD_COLOR_WHITE);
gabrieltetar 24:1a13c998c7ac 74 wait(0.15);
gabrieltetar 24:1a13c998c7ac 75 lcd.DisplayStringAt(0, 10, (uint8_t *)"Verification des cartes", LEFT_MODE);
gabrieltetar 24:1a13c998c7ac 76 //cartes non verifiées////////////////
gabrieltetar 24:1a13c998c7ac 77 lcd.SetTextColor(DIY_GREY);
gabrieltetar 24:1a13c998c7ac 78 lcd.FillRect(0,400,400,150); //carte moteur
gabrieltetar 24:1a13c998c7ac 79 lcd.FillRect(0,600,400,150); //Balise
gabrieltetar 24:1a13c998c7ac 80 lcd.SetTextColor(LCD_COLOR_BLACK);
gabrieltetar 24:1a13c998c7ac 81 lcd.SetBackColor(DIY_GREY);
gabrieltetar 24:1a13c998c7ac 82 lcd.DisplayStringAt(80, 450, (uint8_t *)"Carte Moteur", LEFT_MODE);
gabrieltetar 24:1a13c998c7ac 83 lcd.DisplayStringAt(110,650, (uint8_t *)"Balise", LEFT_MODE);
gabrieltetar 24:1a13c998c7ac 84 ////////////////////////////////////////
gabrieltetar 24:1a13c998c7ac 85 FORCE_LAUNCH.Draw(0xFFFF0000, 0);
gabrieltetar 24:1a13c998c7ac 86
gabrieltetar 24:1a13c998c7ac 87 strat_etat_s=ATT;
gabrieltetar 24:1a13c998c7ac 88 break;
gabrieltetar 24:1a13c998c7ac 89
gabrieltetar 24:1a13c998c7ac 90 case ATT : //Si les cartes sont présentes passe directement à choix sinon attente de force Launch (cette partie est encore buggée mais les cartes affichent bien leur présence donc faut juste force launch tout le temps...)
gabrieltetar 24:1a13c998c7ac 91 if (flag_check_carte==1) {
gabrieltetar 24:1a13c998c7ac 92 strat_etat_s = CHOIX;
gabrieltetar 24:1a13c998c7ac 93 gameEtat = ETAT_CONFIG;
gabrieltetar 24:1a13c998c7ac 94 } else if (FORCE_LAUNCH.Touched()) {
gabrieltetar 24:1a13c998c7ac 95 strat_etat_s = CHOIX;
gabrieltetar 24:1a13c998c7ac 96 gameEtat = ETAT_CONFIG;
gabrieltetar 24:1a13c998c7ac 97 while(FORCE_LAUNCH.Touched());
gabrieltetar 21:d137ec53c3a9 98 }
gabrieltetar 24:1a13c998c7ac 99
gabrieltetar 21:d137ec53c3a9 100 break;
gabrieltetar 24:1a13c998c7ac 101
gabrieltetar 24:1a13c998c7ac 102
gabrieltetar 21:d137ec53c3a9 103 case CHOIX : //Match ou DEMO
gabrieltetar 21:d137ec53c3a9 104 lcd.SetBackColor(LCD_COLOR_WHITE);
gabrieltetar 21:d137ec53c3a9 105 lcd.SetTextColor(LCD_COLOR_BLACK);
gabrieltetar 21:d137ec53c3a9 106 lcd.Clear (LCD_COLOR_WHITE);
gabrieltetar 21:d137ec53c3a9 107 lcd.DisplayStringAt(0, LINE(0), (uint8_t *)"Match ou demonstration ?", LEFT_MODE);
gabrieltetar 21:d137ec53c3a9 108 DEMONSTRATION.Draw(LCD_COLOR_LIGHTGREEN, 0);
gabrieltetar 21:d137ec53c3a9 109 MATCH.Draw(0xFFF01010, 0);
gabrieltetar 21:d137ec53c3a9 110 while(strat_etat_s == CHOIX) {
gabrieltetar 21:d137ec53c3a9 111 canProcessRx();
gabrieltetar 21:d137ec53c3a9 112 if(DEMONSTRATION.Touched()) {
gabrieltetar 21:d137ec53c3a9 113 strat_etat_s = DEMO;
gabrieltetar 21:d137ec53c3a9 114 while(DEMONSTRATION.Touched());
gabrieltetar 21:d137ec53c3a9 115 }
gabrieltetar 21:d137ec53c3a9 116
gabrieltetar 21:d137ec53c3a9 117 if(MATCH.Touched()) {
gabrieltetar 21:d137ec53c3a9 118 strat_etat_s = SELECT_SIDE;
gabrieltetar 21:d137ec53c3a9 119 while(MATCH.Touched());
gabrieltetar 21:d137ec53c3a9 120 }
gabrieltetar 21:d137ec53c3a9 121
gabrieltetar 21:d137ec53c3a9 122 }
gabrieltetar 21:d137ec53c3a9 123 break;
gabrieltetar 21:d137ec53c3a9 124
gabrieltetar 21:d137ec53c3a9 125 case DEMO :
gabrieltetar 21:d137ec53c3a9 126 lcd.SetBackColor(LCD_COLOR_WHITE);
gabrieltetar 21:d137ec53c3a9 127 lcd.SetTextColor(LCD_COLOR_BLACK);
gabrieltetar 21:d137ec53c3a9 128 lcd.Clear (LCD_COLOR_WHITE);
gabrieltetar 22:c7763a7ec6c7 129 lcd.DisplayStringAt(0, LINE(0), (uint8_t *)"DEMO 1/2", LEFT_MODE);
gabrieltetar 21:d137ec53c3a9 130 RETOUR.Draw(0xFFFF0000, 0);
gabrieltetar 21:d137ec53c3a9 131 TEST_VENT.Draw(VERT, 0);
gabrieltetar 21:d137ec53c3a9 132 TEST_MOT.Draw(VERT, 0);
gabrieltetar 21:d137ec53c3a9 133 TEST_COUL.Draw(VERT, 0);
gabrieltetar 21:d137ec53c3a9 134 TEST_BRAS.Draw(VERT, 0);
gabrieltetar 21:d137ec53c3a9 135 TEST_AUDIO.Draw(VERT, 0);
gabrieltetar 22:c7763a7ec6c7 136 TEST_NEXT.Draw(BLEU, 0);
gabrieltetar 21:d137ec53c3a9 137 maximilien=0;
gabrieltetar 21:d137ec53c3a9 138 while (strat_etat_s == DEMO) {
gabrieltetar 21:d137ec53c3a9 139 canProcessRx();
gabrieltetar 21:d137ec53c3a9 140 if(TEST_VENT.Touched()) {
gabrieltetar 21:d137ec53c3a9 141 while(TEST_VENT.Touched());
gabrieltetar 21:d137ec53c3a9 142 strat_etat_s = TEST_VENTOUSE;
gabrieltetar 21:d137ec53c3a9 143 } else if(TEST_MOT.Touched()) {
gabrieltetar 21:d137ec53c3a9 144 while(TEST_MOT.Touched());
gabrieltetar 21:d137ec53c3a9 145 strat_etat_s = TEST_MOTEUR;
gabrieltetar 22:c7763a7ec6c7 146 } else if(TEST_NEXT.Touched()) {
gabrieltetar 22:c7763a7ec6c7 147 while(TEST_NEXT.Touched());
gabrieltetar 22:c7763a7ec6c7 148 strat_etat_s = DEMO2;
gabrieltetar 21:d137ec53c3a9 149 } else if (TEST_COUL.Touched()) {
gabrieltetar 21:d137ec53c3a9 150 while(TEST_COUL.Touched());
gabrieltetar 21:d137ec53c3a9 151 strat_etat_s =TEST_COULEUR ;
gabrieltetar 21:d137ec53c3a9 152 } else if (TEST_BRAS.Touched()) {
gabrieltetar 21:d137ec53c3a9 153 while(TEST_BRAS.Touched());
gabrieltetar 21:d137ec53c3a9 154 strat_etat_s =TEST_SERVO_BRAS ;
gabrieltetar 21:d137ec53c3a9 155 } else if(TEST_AUDIO.Touched()) {
gabrieltetar 21:d137ec53c3a9 156 while(TEST_AUDIO.Touched());
gabrieltetar 21:d137ec53c3a9 157 strat_etat_s=TEST_AUD;
gabrieltetar 21:d137ec53c3a9 158 } else if(RETOUR.Touched()) {
gabrieltetar 21:d137ec53c3a9 159 while(RETOUR.Touched());
gabrieltetar 21:d137ec53c3a9 160 strat_etat_s = CHOIX;
gabrieltetar 21:d137ec53c3a9 161 }
gabrieltetar 21:d137ec53c3a9 162 }
gabrieltetar 21:d137ec53c3a9 163 break;
gabrieltetar 24:1a13c998c7ac 164
gabrieltetar 24:1a13c998c7ac 165 case DEMO2 :
gabrieltetar 22:c7763a7ec6c7 166 lcd.SetBackColor(LCD_COLOR_WHITE);
gabrieltetar 22:c7763a7ec6c7 167 lcd.SetTextColor(LCD_COLOR_BLACK);
gabrieltetar 22:c7763a7ec6c7 168 lcd.Clear (LCD_COLOR_WHITE);
gabrieltetar 22:c7763a7ec6c7 169 lcd.DisplayStringAt(0, LINE(0), (uint8_t *)"DEMO 2/2", LEFT_MODE);
gabrieltetar 22:c7763a7ec6c7 170 RETOUR.Draw(0xFFFF0000, 0);
gabrieltetar 22:c7763a7ec6c7 171 TEST_DIV.Draw(VERT, 0);
gabrieltetar 22:c7763a7ec6c7 172 TEST_ASSERV.Draw(VERT, 0);
gabrieltetar 22:c7763a7ec6c7 173 TEST_NEXT.Draw(BLEU, 0);
gabrieltetar 22:c7763a7ec6c7 174 maximilien=0;
gabrieltetar 22:c7763a7ec6c7 175 while (strat_etat_s == DEMO2) {
gabrieltetar 22:c7763a7ec6c7 176 canProcessRx();
gabrieltetar 22:c7763a7ec6c7 177 if(TEST_NEXT.Touched()) {
gabrieltetar 22:c7763a7ec6c7 178 while(TEST_NEXT.Touched());
gabrieltetar 22:c7763a7ec6c7 179 strat_etat_s = DEMO;
gabrieltetar 22:c7763a7ec6c7 180 } else if(TEST_DIV.Touched()) {
gabrieltetar 22:c7763a7ec6c7 181 while(TEST_DIV.Touched());
gabrieltetar 22:c7763a7ec6c7 182 strat_etat_s = TEST_DIVE;
gabrieltetar 22:c7763a7ec6c7 183 } else if(TEST_ASSERV.Touched()) {
gabrieltetar 22:c7763a7ec6c7 184 while(TEST_ASSERV.Touched());
gabrieltetar 22:c7763a7ec6c7 185 strat_etat_s = TEST_ASSERVE;
gabrieltetar 22:c7763a7ec6c7 186 } else if(RETOUR.Touched()) {
gabrieltetar 22:c7763a7ec6c7 187 while(RETOUR.Touched());
gabrieltetar 22:c7763a7ec6c7 188 strat_etat_s = CHOIX;
gabrieltetar 22:c7763a7ec6c7 189 }
gabrieltetar 22:c7763a7ec6c7 190 }
gabrieltetar 24:1a13c998c7ac 191 break;
gabrieltetar 24:1a13c998c7ac 192
gabrieltetar 24:1a13c998c7ac 193 case TEST_ASSERVE:
gabrieltetar 24:1a13c998c7ac 194 lcd.SetBackColor(LCD_COLOR_WHITE);
gabrieltetar 24:1a13c998c7ac 195 lcd.SetTextColor(LCD_COLOR_BLACK);
gabrieltetar 24:1a13c998c7ac 196 lcd.Clear (LCD_COLOR_WHITE);
gabrieltetar 24:1a13c998c7ac 197 lcd.DisplayStringAt(0, LINE(0), (uint8_t *)"Asservissements", LEFT_MODE);
gabrieltetar 24:1a13c998c7ac 198 RETOUR.Draw(0xFFFF0000,0);
gabrieltetar 24:1a13c998c7ac 199 TEST_A.Draw(BLEU, BLANC);
gabrieltetar 24:1a13c998c7ac 200 TEST_B.Draw(BLEU, BLANC);
gabrieltetar 24:1a13c998c7ac 201 while(strat_etat_s==TEST_ASSERVE) {
gabrieltetar 24:1a13c998c7ac 202 if(RETOUR.Touched()) {
gabrieltetar 24:1a13c998c7ac 203 while (RETOUR.Touched());
gabrieltetar 24:1a13c998c7ac 204 strat_etat_s=DEMO2;
gabrieltetar 24:1a13c998c7ac 205 } else if(TEST_A.Touched()) {
gabrieltetar 24:1a13c998c7ac 206 while (TEST_A.Touched());
gabrieltetar 24:1a13c998c7ac 207 GoToPosition(2000,0,0,0);
gabrieltetar 24:1a13c998c7ac 208 TEST_A.Draw(BLEU, BLANC);
gabrieltetar 24:1a13c998c7ac 209 } else if(TEST_B.Touched()) {
gabrieltetar 24:1a13c998c7ac 210 while (TEST_B.Touched());
gabrieltetar 24:1a13c998c7ac 211 Rotate(3599);
gabrieltetar 24:1a13c998c7ac 212 TEST_B.Draw(BLEU, BLANC);
gabrieltetar 24:1a13c998c7ac 213 }
gabrieltetar 24:1a13c998c7ac 214 }
gabrieltetar 24:1a13c998c7ac 215 break;
gabrieltetar 24:1a13c998c7ac 216
gabrieltetar 24:1a13c998c7ac 217 case TEST_DIVE:
gabrieltetar 24:1a13c998c7ac 218
gabrieltetar 24:1a13c998c7ac 219 while(strat_etat_s==TEST_DIVE) {
gabrieltetar 24:1a13c998c7ac 220 canProcessRx();
gabrieltetar 24:1a13c998c7ac 221 lcd.SetBackColor(LCD_COLOR_WHITE);
gabrieltetar 24:1a13c998c7ac 222 lcd.SetTextColor(LCD_COLOR_BLACK);
gabrieltetar 24:1a13c998c7ac 223 lcd.Clear (LCD_COLOR_WHITE);
gabrieltetar 24:1a13c998c7ac 224 lcd.DisplayStringAt(0, LINE(0), (uint8_t *)"Coordonnees", LEFT_MODE);
gabrieltetar 24:1a13c998c7ac 225 RETOUR.Draw(0xFFFF0000,0);
gabrieltetar 24:1a13c998c7ac 226 sprintf(toto,"%hd",x_robot);
gabrieltetar 24:1a13c998c7ac 227 lcd.DisplayStringAt(0, LINE(10), (unsigned char *)"X :", LEFT_MODE);
gabrieltetar 24:1a13c998c7ac 228 lcd.DisplayStringAt(50, LINE(10), (unsigned char *)toto, LEFT_MODE);
gabrieltetar 24:1a13c998c7ac 229 sprintf(toto,"%hd",y_robot);
gabrieltetar 24:1a13c998c7ac 230 lcd.DisplayStringAt(0, LINE(11), (unsigned char *)"Y :", LEFT_MODE);
gabrieltetar 24:1a13c998c7ac 231 lcd.DisplayStringAt(50, LINE(11), (unsigned char *)toto, LEFT_MODE);
gabrieltetar 24:1a13c998c7ac 232 sprintf(toto,"%hd",theta_robot);
gabrieltetar 24:1a13c998c7ac 233 lcd.DisplayStringAt(0, LINE(12), (unsigned char *)"T :", LEFT_MODE);
gabrieltetar 24:1a13c998c7ac 234 lcd.DisplayStringAt(50, LINE(12), (unsigned char *) toto, LEFT_MODE);
gabrieltetar 24:1a13c998c7ac 235 if(RETOUR.Touched()) {
gabrieltetar 24:1a13c998c7ac 236 while (RETOUR.Touched());
gabrieltetar 24:1a13c998c7ac 237 strat_etat_s=DEMO2;
gabrieltetar 24:1a13c998c7ac 238 }
gabrieltetar 24:1a13c998c7ac 239 wait(0.2);
gabrieltetar 24:1a13c998c7ac 240 }
gabrieltetar 24:1a13c998c7ac 241 break;
gabrieltetar 21:d137ec53c3a9 242
gabrieltetar 21:d137ec53c3a9 243 case TEST_VENTOUSE:
gabrieltetar 21:d137ec53c3a9 244 lcd.SetBackColor(LCD_COLOR_WHITE);
gabrieltetar 21:d137ec53c3a9 245 lcd.SetTextColor(LCD_COLOR_BLACK);
gabrieltetar 21:d137ec53c3a9 246 lcd.Clear (LCD_COLOR_WHITE);
gabrieltetar 21:d137ec53c3a9 247 lcd.Clear (LCD_COLOR_WHITE);
gabrieltetar 21:d137ec53c3a9 248 lcd.DisplayStringAt(0, LINE(0), (uint8_t *)"Test Ventouse", LEFT_MODE);
gabrieltetar 21:d137ec53c3a9 249 sprintf(toto,"%hd",maximilien);
gabrieltetar 21:d137ec53c3a9 250 lcd.DisplayStringAt(50, LINE(20), (unsigned char *)toto, LEFT_MODE);
gabrieltetar 21:d137ec53c3a9 251 RETOUR.Draw(0xFFFF0000,0);
gabrieltetar 21:d137ec53c3a9 252 TEST_A.Draw(BLEU, BLANC);
gabrieltetar 21:d137ec53c3a9 253 TEST_NUM.Draw(BLEU, BLANC);
gabrieltetar 21:d137ec53c3a9 254 TEST_PLUS.Draw(BLEU, BLANC);
gabrieltetar 21:d137ec53c3a9 255 TEST_MOINS.Draw(BLEU, BLANC);
gabrieltetar 21:d137ec53c3a9 256 while(strat_etat_s==TEST_VENTOUSE) {
gabrieltetar 21:d137ec53c3a9 257 if(RETOUR.Touched()) {
gabrieltetar 21:d137ec53c3a9 258 while (RETOUR.Touched());
gabrieltetar 21:d137ec53c3a9 259 strat_etat_s=DEMO;
gabrieltetar 21:d137ec53c3a9 260 } else if(TEST_A.Touched()) {
gabrieltetar 21:d137ec53c3a9 261 while (TEST_A.Touched());
gabrieltetar 21:d137ec53c3a9 262 //SendRawId(TEST_VENT_A);
gabrieltetar 21:d137ec53c3a9 263 TEST_A.Draw(BLEU, BLANC);
gabrieltetar 21:d137ec53c3a9 264 } else if(TEST_NUM.Touched()) {
gabrieltetar 21:d137ec53c3a9 265 while (TEST_NUM.Touched());
gabrieltetar 21:d137ec53c3a9 266 TEST_NUM.Draw(BLEU, BLANC);
gabrieltetar 21:d137ec53c3a9 267 switch(maximilien){
gabrieltetar 21:d137ec53c3a9 268 case 1:
gabrieltetar 21:d137ec53c3a9 269 SendRawId(TEST_VENT_1_ON);
gabrieltetar 21:d137ec53c3a9 270 break;
gabrieltetar 21:d137ec53c3a9 271 case 2:
gabrieltetar 21:d137ec53c3a9 272 SendRawId(TEST_VENT_1_OFF);
gabrieltetar 21:d137ec53c3a9 273 break;
gabrieltetar 21:d137ec53c3a9 274 case 3:
gabrieltetar 21:d137ec53c3a9 275 //SendRawId(TEST_VENT_3);
gabrieltetar 21:d137ec53c3a9 276 break;
gabrieltetar 21:d137ec53c3a9 277 case 4:
gabrieltetar 21:d137ec53c3a9 278 //SendRawId(TEST_VENT_4);
gabrieltetar 21:d137ec53c3a9 279 break;
gabrieltetar 21:d137ec53c3a9 280 case 5:
gabrieltetar 21:d137ec53c3a9 281 //SendRawId(TEST_VENT_5);
gabrieltetar 21:d137ec53c3a9 282 break;
gabrieltetar 21:d137ec53c3a9 283 case 6:
gabrieltetar 21:d137ec53c3a9 284 //SendRawId(TEST_VENT_6);
gabrieltetar 21:d137ec53c3a9 285 break;
gabrieltetar 21:d137ec53c3a9 286 }
gabrieltetar 21:d137ec53c3a9 287 } else if(TEST_PLUS.Touched()) {
gabrieltetar 21:d137ec53c3a9 288 while (TEST_PLUS.Touched());
gabrieltetar 21:d137ec53c3a9 289 TEST_PLUS.Draw(BLEU, BLANC);
gabrieltetar 21:d137ec53c3a9 290 if(maximilien!=6)maximilien++;
gabrieltetar 21:d137ec53c3a9 291 sprintf(toto,"%hd",maximilien);
gabrieltetar 21:d137ec53c3a9 292 lcd.SetBackColor(LCD_COLOR_WHITE);
gabrieltetar 21:d137ec53c3a9 293 lcd.SetTextColor(LCD_COLOR_BLACK);
gabrieltetar 21:d137ec53c3a9 294 lcd.DisplayStringAt(50, LINE(20), (unsigned char *)toto, LEFT_MODE);
gabrieltetar 21:d137ec53c3a9 295 } else if(TEST_MOINS.Touched()) {
gabrieltetar 21:d137ec53c3a9 296 while (TEST_MOINS.Touched());
gabrieltetar 21:d137ec53c3a9 297 TEST_MOINS.Draw(BLEU, BLANC);
gabrieltetar 21:d137ec53c3a9 298 if(maximilien!=1)maximilien--;
gabrieltetar 21:d137ec53c3a9 299 sprintf(toto,"%hd",maximilien);
gabrieltetar 21:d137ec53c3a9 300 lcd.SetBackColor(LCD_COLOR_WHITE);
gabrieltetar 21:d137ec53c3a9 301 lcd.SetTextColor(LCD_COLOR_BLACK);
gabrieltetar 21:d137ec53c3a9 302 lcd.DisplayStringAt(50, LINE(20), (unsigned char *)toto, LEFT_MODE);
gabrieltetar 21:d137ec53c3a9 303 }
gabrieltetar 21:d137ec53c3a9 304 }
gabrieltetar 21:d137ec53c3a9 305 break;
gabrieltetar 21:d137ec53c3a9 306
gabrieltetar 24:1a13c998c7ac 307 case TEST_ELECTROV:
gabrieltetar 21:d137ec53c3a9 308 lcd.SetBackColor(LCD_COLOR_WHITE);
gabrieltetar 21:d137ec53c3a9 309 lcd.SetTextColor(LCD_COLOR_BLACK);
gabrieltetar 21:d137ec53c3a9 310 lcd.Clear (LCD_COLOR_WHITE);
gabrieltetar 21:d137ec53c3a9 311 lcd.Clear (LCD_COLOR_WHITE);
gabrieltetar 21:d137ec53c3a9 312 lcd.DisplayStringAt(0, LINE(0), (uint8_t *)"A : Manches B : Pavillon", LEFT_MODE);
gabrieltetar 21:d137ec53c3a9 313 RETOUR.Draw(0xFFFF0000,0);
gabrieltetar 21:d137ec53c3a9 314 TEST_A.Draw(BLEU, BLANC);
gabrieltetar 21:d137ec53c3a9 315 TEST_B.Draw(BLEU, BLANC);
gabrieltetar 24:1a13c998c7ac 316 while(strat_etat_s==TEST_ELECTROV) {
gabrieltetar 21:d137ec53c3a9 317 if(RETOUR.Touched()) {
gabrieltetar 21:d137ec53c3a9 318 while (RETOUR.Touched());
gabrieltetar 24:1a13c998c7ac 319 strat_etat_s=DEMO;
gabrieltetar 21:d137ec53c3a9 320 } else if(TEST_A.Touched()) {
gabrieltetar 21:d137ec53c3a9 321 while (TEST_A.Touched());
gabrieltetar 21:d137ec53c3a9 322 //SendRawId(TEST_ELECTROV_A);
gabrieltetar 21:d137ec53c3a9 323 TEST_A.Draw(BLEU, BLANC);
gabrieltetar 21:d137ec53c3a9 324 } else if(TEST_B.Touched()) {
gabrieltetar 21:d137ec53c3a9 325 while (TEST_B.Touched());
gabrieltetar 21:d137ec53c3a9 326 //SendRawId(TEST_ELECTROV_A);
gabrieltetar 21:d137ec53c3a9 327 TEST_B.Draw(BLEU, BLANC);
gabrieltetar 21:d137ec53c3a9 328 }
gabrieltetar 21:d137ec53c3a9 329 }
gabrieltetar 21:d137ec53c3a9 330 break;
gabrieltetar 24:1a13c998c7ac 331
gabrieltetar 21:d137ec53c3a9 332 case TEST_AUD:
gabrieltetar 21:d137ec53c3a9 333
gabrieltetar 21:d137ec53c3a9 334 lcd.SetBackColor(LCD_COLOR_WHITE);
gabrieltetar 21:d137ec53c3a9 335 lcd.SetTextColor(LCD_COLOR_BLACK);
gabrieltetar 21:d137ec53c3a9 336 lcd.Clear (LCD_COLOR_WHITE);
gabrieltetar 21:d137ec53c3a9 337 lcd.Clear (LCD_COLOR_WHITE);
gabrieltetar 21:d137ec53c3a9 338 lcd.DisplayStringAt(0, LINE(0), (uint8_t *)"Test Audio", LEFT_MODE);
gabrieltetar 21:d137ec53c3a9 339 sprintf(toto,"%hd",maximilien);
gabrieltetar 21:d137ec53c3a9 340 lcd.DisplayStringAt(50, LINE(20), (unsigned char *)toto, LEFT_MODE);
gabrieltetar 21:d137ec53c3a9 341 RETOUR.Draw(0xFFFF0000,0);
gabrieltetar 21:d137ec53c3a9 342 TEST_NUM.Draw(BLEU, BLANC);
gabrieltetar 21:d137ec53c3a9 343 TEST_PLUS.Draw(BLEU, BLANC);
gabrieltetar 21:d137ec53c3a9 344 TEST_MOINS.Draw(BLEU, BLANC);
gabrieltetar 21:d137ec53c3a9 345 while(strat_etat_s==TEST_AUD) {
gabrieltetar 21:d137ec53c3a9 346 if(RETOUR.Touched()) {
gabrieltetar 21:d137ec53c3a9 347 while (RETOUR.Touched());
gabrieltetar 21:d137ec53c3a9 348 strat_etat_s=DEMO;
gabrieltetar 21:d137ec53c3a9 349 } else if(TEST_NUM.Touched()) {
gabrieltetar 21:d137ec53c3a9 350 while (TEST_NUM.Touched());
gabrieltetar 21:d137ec53c3a9 351 TEST_NUM.Draw(BLEU, BLANC);
gabrieltetar 21:d137ec53c3a9 352 Debug_Audio(3,maximilien);
gabrieltetar 21:d137ec53c3a9 353 } else if(TEST_PLUS.Touched()) {
gabrieltetar 21:d137ec53c3a9 354 while (TEST_PLUS.Touched());
gabrieltetar 21:d137ec53c3a9 355 TEST_PLUS.Draw(BLEU, BLANC);
gabrieltetar 21:d137ec53c3a9 356 if(maximilien!=20)maximilien++;
gabrieltetar 21:d137ec53c3a9 357 sprintf(toto,"%hd",maximilien);
gabrieltetar 21:d137ec53c3a9 358 lcd.SetBackColor(LCD_COLOR_WHITE);
gabrieltetar 21:d137ec53c3a9 359 lcd.SetTextColor(LCD_COLOR_BLACK);
gabrieltetar 21:d137ec53c3a9 360 lcd.DisplayStringAt(50, LINE(20), (unsigned char *)toto, LEFT_MODE);
gabrieltetar 21:d137ec53c3a9 361 } else if(TEST_MOINS.Touched()) {
gabrieltetar 21:d137ec53c3a9 362 while (TEST_MOINS.Touched());
gabrieltetar 21:d137ec53c3a9 363 TEST_MOINS.Draw(BLEU, BLANC);
gabrieltetar 21:d137ec53c3a9 364 if(maximilien!=1)maximilien--;
gabrieltetar 21:d137ec53c3a9 365 sprintf(toto,"%hd",maximilien);
gabrieltetar 21:d137ec53c3a9 366 lcd.SetBackColor(LCD_COLOR_WHITE);
gabrieltetar 21:d137ec53c3a9 367 lcd.SetTextColor(LCD_COLOR_BLACK);
gabrieltetar 21:d137ec53c3a9 368 lcd.DisplayStringAt(50, LINE(20), (unsigned char *)toto, LEFT_MODE);
gabrieltetar 21:d137ec53c3a9 369 }
gabrieltetar 21:d137ec53c3a9 370 }
gabrieltetar 21:d137ec53c3a9 371 break;
gabrieltetar 21:d137ec53c3a9 372
gabrieltetar 21:d137ec53c3a9 373 case TEST_SERVO_BRAS:
gabrieltetar 21:d137ec53c3a9 374
gabrieltetar 21:d137ec53c3a9 375 lcd.SetBackColor(LCD_COLOR_WHITE);
gabrieltetar 21:d137ec53c3a9 376 lcd.SetTextColor(LCD_COLOR_BLACK);
gabrieltetar 21:d137ec53c3a9 377 lcd.Clear (LCD_COLOR_WHITE);
gabrieltetar 21:d137ec53c3a9 378 lcd.Clear (LCD_COLOR_WHITE);
gabrieltetar 21:d137ec53c3a9 379 lcd.DisplayStringAt(0, LINE(0), (uint8_t *)"Test Bras", LEFT_MODE);
gabrieltetar 21:d137ec53c3a9 380 sprintf(toto,"%hd",maximilien);
gabrieltetar 21:d137ec53c3a9 381 lcd.DisplayStringAt(50, LINE(20), (unsigned char *)toto, LEFT_MODE);
gabrieltetar 21:d137ec53c3a9 382 RETOUR.Draw(0xFFFF0000,0);
gabrieltetar 21:d137ec53c3a9 383 TEST_A.Draw(BLEU, BLANC);
gabrieltetar 21:d137ec53c3a9 384 TEST_B.Draw(BLEU, BLANC);
gabrieltetar 21:d137ec53c3a9 385 TEST_C.Draw(BLEU, BLANC);
gabrieltetar 21:d137ec53c3a9 386 TEST_D.Draw(BLEU, BLANC);
gabrieltetar 21:d137ec53c3a9 387 TEST_NUM.Draw(BLEU, BLANC);
gabrieltetar 21:d137ec53c3a9 388 TEST_PLUS.Draw(BLEU, BLANC);
gabrieltetar 21:d137ec53c3a9 389 TEST_MOINS.Draw(BLEU, BLANC);
gabrieltetar 21:d137ec53c3a9 390 while(strat_etat_s==TEST_SERVO_BRAS) {
gabrieltetar 21:d137ec53c3a9 391 if(RETOUR.Touched()) {
gabrieltetar 21:d137ec53c3a9 392 while (RETOUR.Touched());
gabrieltetar 21:d137ec53c3a9 393 strat_etat_s=DEMO;
gabrieltetar 21:d137ec53c3a9 394 } else if(TEST_A.Touched()) {
gabrieltetar 21:d137ec53c3a9 395 while (TEST_A.Touched());
gabrieltetar 21:d137ec53c3a9 396 SendRawId(TEST_BRAS_A);
gabrieltetar 21:d137ec53c3a9 397 TEST_A.Draw(BLEU, BLANC);
gabrieltetar 21:d137ec53c3a9 398 } else if(TEST_B.Touched()) {
gabrieltetar 21:d137ec53c3a9 399 while (TEST_B.Touched());
gabrieltetar 21:d137ec53c3a9 400 SendRawId(TEST_BRAS_B);
gabrieltetar 21:d137ec53c3a9 401 TEST_B.Draw(BLEU, BLANC);
gabrieltetar 21:d137ec53c3a9 402 } else if(TEST_C.Touched()) {
gabrieltetar 21:d137ec53c3a9 403 while (TEST_C.Touched());
gabrieltetar 21:d137ec53c3a9 404 SendRawId(TEST_BRAS_C);
gabrieltetar 21:d137ec53c3a9 405 TEST_C.Draw(BLEU, BLANC);
gabrieltetar 21:d137ec53c3a9 406 } else if(TEST_D.Touched()) {
gabrieltetar 21:d137ec53c3a9 407 while (TEST_D.Touched());
gabrieltetar 21:d137ec53c3a9 408 SendRawId(TEST_BRAS_D);
gabrieltetar 21:d137ec53c3a9 409 TEST_D.Draw(BLEU, BLANC);
gabrieltetar 21:d137ec53c3a9 410 } else if(TEST_NUM.Touched()) {
gabrieltetar 21:d137ec53c3a9 411 while (TEST_NUM.Touched());
gabrieltetar 21:d137ec53c3a9 412 TEST_NUM.Draw(BLEU, BLANC);
gabrieltetar 21:d137ec53c3a9 413 switch(maximilien){
gabrieltetar 21:d137ec53c3a9 414 case 1:
gabrieltetar 21:d137ec53c3a9 415 SendRawId(TEST_BRAS_1);
gabrieltetar 21:d137ec53c3a9 416 break;
gabrieltetar 21:d137ec53c3a9 417 case 2:
gabrieltetar 21:d137ec53c3a9 418 SendRawId(TEST_BRAS_2);
gabrieltetar 21:d137ec53c3a9 419 break;
gabrieltetar 21:d137ec53c3a9 420 case 3:
gabrieltetar 21:d137ec53c3a9 421 SendRawId(TEST_BRAS_3);
gabrieltetar 21:d137ec53c3a9 422 break;
gabrieltetar 21:d137ec53c3a9 423 case 4:
gabrieltetar 21:d137ec53c3a9 424 SendRawId(TEST_BRAS_4);
gabrieltetar 21:d137ec53c3a9 425 break;
gabrieltetar 21:d137ec53c3a9 426 case 5:
gabrieltetar 21:d137ec53c3a9 427 SendRawId(TEST_BRAS_5);
gabrieltetar 21:d137ec53c3a9 428 break;
gabrieltetar 21:d137ec53c3a9 429 case 6:
gabrieltetar 21:d137ec53c3a9 430 SendRawId(TEST_BRAS_6);
gabrieltetar 21:d137ec53c3a9 431 break;
gabrieltetar 21:d137ec53c3a9 432 }
gabrieltetar 21:d137ec53c3a9 433 } else if(TEST_PLUS.Touched()) {
gabrieltetar 21:d137ec53c3a9 434 while (TEST_PLUS.Touched());
gabrieltetar 21:d137ec53c3a9 435 TEST_PLUS.Draw(BLEU, BLANC);
gabrieltetar 21:d137ec53c3a9 436 if(maximilien!=6)maximilien++;
gabrieltetar 21:d137ec53c3a9 437 sprintf(toto,"%hd",maximilien);
gabrieltetar 21:d137ec53c3a9 438 lcd.SetBackColor(LCD_COLOR_WHITE);
gabrieltetar 21:d137ec53c3a9 439 lcd.SetTextColor(LCD_COLOR_BLACK);
gabrieltetar 21:d137ec53c3a9 440 lcd.DisplayStringAt(50, LINE(20), (unsigned char *)toto, LEFT_MODE);
gabrieltetar 21:d137ec53c3a9 441 } else if(TEST_MOINS.Touched()) {
gabrieltetar 21:d137ec53c3a9 442 while (TEST_MOINS.Touched());
gabrieltetar 21:d137ec53c3a9 443 TEST_MOINS.Draw(BLEU, BLANC);
gabrieltetar 21:d137ec53c3a9 444 if(maximilien!=1)maximilien--;
gabrieltetar 21:d137ec53c3a9 445 sprintf(toto,"%hd",maximilien);
gabrieltetar 21:d137ec53c3a9 446 lcd.SetBackColor(LCD_COLOR_WHITE);
gabrieltetar 21:d137ec53c3a9 447 lcd.SetTextColor(LCD_COLOR_BLACK);
gabrieltetar 21:d137ec53c3a9 448 lcd.DisplayStringAt(50, LINE(20), (unsigned char *)toto, LEFT_MODE);
gabrieltetar 21:d137ec53c3a9 449 }
gabrieltetar 21:d137ec53c3a9 450 }
gabrieltetar 21:d137ec53c3a9 451 break;
gabrieltetar 21:d137ec53c3a9 452
gabrieltetar 21:d137ec53c3a9 453 case TEST_COULEUR:
gabrieltetar 21:d137ec53c3a9 454 lcd.Clear (LCD_COLOR_WHITE);
gabrieltetar 21:d137ec53c3a9 455 lcd.DisplayStringAt(0, LINE(0), (uint8_t *)"Test Couleur", LEFT_MODE);
gabrieltetar 24:1a13c998c7ac 456 TEST_A.Draw(BLEU, BLANC);
gabrieltetar 24:1a13c998c7ac 457 TEST_B.Draw(BLEU, BLANC);
gabrieltetar 24:1a13c998c7ac 458 TEST_C.Draw(BLEU, BLANC);
gabrieltetar 24:1a13c998c7ac 459 TEST_D.Draw(BLEU, BLANC);
gabrieltetar 21:d137ec53c3a9 460 RETOUR.Draw(0xFFFF0000,0);
gabrieltetar 21:d137ec53c3a9 461 while(strat_etat_s==TEST_COULEUR) {
gabrieltetar 21:d137ec53c3a9 462 if(RETOUR.Touched()) {
gabrieltetar 21:d137ec53c3a9 463 while (RETOUR.Touched());
gabrieltetar 21:d137ec53c3a9 464 strat_etat_s=DEMO;
gabrieltetar 21:d137ec53c3a9 465 lcd.Clear (LCD_COLOR_WHITE);
gabrieltetar 24:1a13c998c7ac 466 }else if(TEST_A.Touched()) {
gabrieltetar 24:1a13c998c7ac 467 while (TEST_A.Touched());
gabrieltetar 24:1a13c998c7ac 468 SendRawId(TEST_BRAS_A);
gabrieltetar 24:1a13c998c7ac 469 TEST_A.Draw(BLEU, BLANC);
gabrieltetar 24:1a13c998c7ac 470 } else if(TEST_B.Touched()) {
gabrieltetar 24:1a13c998c7ac 471 while (TEST_B.Touched());
gabrieltetar 24:1a13c998c7ac 472 SendRawId(TEST_BRAS_B);
gabrieltetar 24:1a13c998c7ac 473 TEST_B.Draw(BLEU, BLANC);
gabrieltetar 24:1a13c998c7ac 474 } else if(TEST_C.Touched()) {
gabrieltetar 24:1a13c998c7ac 475 while (TEST_C.Touched());
gabrieltetar 24:1a13c998c7ac 476 SendRawId(TEST_BRAS_C);
gabrieltetar 24:1a13c998c7ac 477 TEST_C.Draw(BLEU, BLANC);
gabrieltetar 24:1a13c998c7ac 478 } else if(TEST_D.Touched()) {
gabrieltetar 24:1a13c998c7ac 479 while (TEST_D.Touched());
gabrieltetar 24:1a13c998c7ac 480 SendRawId(TEST_BRAS_D);
gabrieltetar 24:1a13c998c7ac 481 TEST_D.Draw(BLEU, BLANC);
gabrieltetar 21:d137ec53c3a9 482 }
gabrieltetar 21:d137ec53c3a9 483 }
gabrieltetar 21:d137ec53c3a9 484 break;
gabrieltetar 21:d137ec53c3a9 485
gabrieltetar 21:d137ec53c3a9 486 case TEST_MOTEUR:
gabrieltetar 21:d137ec53c3a9 487 lcd.SetBackColor(LCD_COLOR_WHITE);
gabrieltetar 21:d137ec53c3a9 488 lcd.SetTextColor(LCD_COLOR_BLACK);
gabrieltetar 21:d137ec53c3a9 489 lcd.Clear (LCD_COLOR_WHITE);
gabrieltetar 21:d137ec53c3a9 490 lcd.Clear (LCD_COLOR_WHITE);
gabrieltetar 21:d137ec53c3a9 491 lcd.DisplayStringAt(0, LINE(0), (uint8_t *)"Test Moteur", LEFT_MODE);
gabrieltetar 21:d137ec53c3a9 492 RETOUR.Draw(0xFFFF0000,0);
gabrieltetar 21:d137ec53c3a9 493 TEST_A.Draw(BLEU, BLANC);
gabrieltetar 21:d137ec53c3a9 494 TEST_B.Draw(BLEU, BLANC);
gabrieltetar 21:d137ec53c3a9 495 while(strat_etat_s==TEST_MOTEUR) {
gabrieltetar 21:d137ec53c3a9 496 if(RETOUR.Touched()) {
gabrieltetar 21:d137ec53c3a9 497 while (RETOUR.Touched());
gabrieltetar 21:d137ec53c3a9 498 strat_etat_s=DEMO;
gabrieltetar 21:d137ec53c3a9 499 } else if(TEST_A.Touched()) {
gabrieltetar 21:d137ec53c3a9 500 while (TEST_A.Touched());
gabrieltetar 21:d137ec53c3a9 501 BendRadius(150,1800,1,0);
gabrieltetar 21:d137ec53c3a9 502 TEST_A.Draw(BLEU, BLANC);
gabrieltetar 21:d137ec53c3a9 503 } else if(TEST_B.Touched()) {
gabrieltetar 21:d137ec53c3a9 504 while (TEST_B.Touched());
gabrieltetar 21:d137ec53c3a9 505 BendRadius(150,1800,0,0);
gabrieltetar 21:d137ec53c3a9 506 TEST_B.Draw(BLEU, BLANC);
gabrieltetar 21:d137ec53c3a9 507 }
gabrieltetar 21:d137ec53c3a9 508 }
gabrieltetar 21:d137ec53c3a9 509 break; ///////////////////////////////////////////FIN DES DEMOS/////////////////////////////////////////////////
gabrieltetar 21:d137ec53c3a9 510
gabrieltetar 21:d137ec53c3a9 511
gabrieltetar 21:d137ec53c3a9 512 case SELECT_SIDE : // CHOIX DU COTE DU TERRAIN + INVERSION DE LA STRAT SI COTE ORANGE+ ENVOI DU COTE A LA CARTE CAPTEUR/ACTIONNEURS
gabrieltetar 21:d137ec53c3a9 513 lcd.Clear(LCD_COLOR_WHITE);
gabrieltetar 21:d137ec53c3a9 514 lcd.SetBackColor(LCD_COLOR_WHITE);
gabrieltetar 21:d137ec53c3a9 515 lcd.SetTextColor(LCD_COLOR_BLACK);
gabrieltetar 21:d137ec53c3a9 516
gabrieltetar 21:d137ec53c3a9 517 lcd.DisplayStringAt(70, LINE(0), (uint8_t *)"Choisir le cote", LEFT_MODE);
gabrieltetar 21:d137ec53c3a9 518 COTE_JAUNE.Draw(JAUNE, 0);
gabrieltetar 21:d137ec53c3a9 519 COTE_VIOLET.Draw(VIOLET, 0);
gabrieltetar 21:d137ec53c3a9 520 RETOUR.Draw(LCD_COLOR_RED, 0);
gabrieltetar 21:d137ec53c3a9 521
gabrieltetar 21:d137ec53c3a9 522
gabrieltetar 21:d137ec53c3a9 523 while (strat_etat_s == SELECT_SIDE) {
gabrieltetar 21:d137ec53c3a9 524 canProcessRx();
gabrieltetar 21:d137ec53c3a9 525 if(COTE_JAUNE.Touched()) {
gabrieltetar 21:d137ec53c3a9 526 Cote = 0x0;
gabrieltetar 21:d137ec53c3a9 527 InversStrat = Cote;
gabrieltetar 21:d137ec53c3a9 528 strat_etat_s = TACTIQUE;
gabrieltetar 21:d137ec53c3a9 529 CANMessage trame_Tx = CANMessage();
gabrieltetar 21:d137ec53c3a9 530 trame_Tx.len = 1;
gabrieltetar 21:d137ec53c3a9 531 trame_Tx.format = CANStandard;
gabrieltetar 21:d137ec53c3a9 532 trame_Tx.type = CANData;
gabrieltetar 21:d137ec53c3a9 533 trame_Tx.id=CHOICE_COLOR;
gabrieltetar 21:d137ec53c3a9 534 trame_Tx.data[0]=Cote;
gabrieltetar 21:d137ec53c3a9 535 can2.write(trame_Tx);
gabrieltetar 21:d137ec53c3a9 536 while(COTE_JAUNE.Touched());
gabrieltetar 21:d137ec53c3a9 537
gabrieltetar 21:d137ec53c3a9 538 }
gabrieltetar 21:d137ec53c3a9 539
gabrieltetar 21:d137ec53c3a9 540 if(COTE_VIOLET.Touched()) {
gabrieltetar 21:d137ec53c3a9 541 Cote = 0x1;
gabrieltetar 21:d137ec53c3a9 542 InversStrat= Cote;
gabrieltetar 21:d137ec53c3a9 543 strat_etat_s = TACTIQUE;
gabrieltetar 21:d137ec53c3a9 544 CANMessage trame_Tx = CANMessage();
gabrieltetar 21:d137ec53c3a9 545 trame_Tx.len = 1;
gabrieltetar 21:d137ec53c3a9 546 trame_Tx.format = CANStandard;
gabrieltetar 21:d137ec53c3a9 547 trame_Tx.type = CANData;
gabrieltetar 21:d137ec53c3a9 548 trame_Tx.id=CHOICE_COLOR;
gabrieltetar 21:d137ec53c3a9 549 trame_Tx.data[0]=Cote;
gabrieltetar 21:d137ec53c3a9 550 can2.write(trame_Tx);
gabrieltetar 21:d137ec53c3a9 551 while(COTE_VIOLET.Touched());
gabrieltetar 21:d137ec53c3a9 552 }
gabrieltetar 21:d137ec53c3a9 553
gabrieltetar 21:d137ec53c3a9 554 if(RETOUR.Touched()) {
gabrieltetar 21:d137ec53c3a9 555 strat_etat_s = CHOIX;
gabrieltetar 21:d137ec53c3a9 556 while(RETOUR.Touched());
gabrieltetar 21:d137ec53c3a9 557 }
gabrieltetar 21:d137ec53c3a9 558 }
gabrieltetar 21:d137ec53c3a9 559
gabrieltetar 21:d137ec53c3a9 560 break;
gabrieltetar 21:d137ec53c3a9 561
gabrieltetar 21:d137ec53c3a9 562 case TACTIQUE : //AFFICHE LA LISTE DES STRATS AFIN DE SELECTIONNER CELLE VOULUE
gabrieltetar 21:d137ec53c3a9 563 if (Cote == 0) {
gabrieltetar 21:d137ec53c3a9 564 lcd.Clear(JAUNE);
gabrieltetar 21:d137ec53c3a9 565 lcd.SetBackColor(JAUNE);
gabrieltetar 21:d137ec53c3a9 566 } else if (Cote == 1) {
gabrieltetar 21:d137ec53c3a9 567 lcd.Clear(VIOLET);
gabrieltetar 21:d137ec53c3a9 568 lcd.SetBackColor(VIOLET);
gabrieltetar 21:d137ec53c3a9 569 } else {
gabrieltetar 21:d137ec53c3a9 570 lcd.Clear(BLEU);
gabrieltetar 21:d137ec53c3a9 571 lcd.SetBackColor(BLEU);
gabrieltetar 21:d137ec53c3a9 572 }
gabrieltetar 21:d137ec53c3a9 573
gabrieltetar 21:d137ec53c3a9 574 lcd.SetTextColor(LCD_COLOR_BLACK);
gabrieltetar 21:d137ec53c3a9 575
gabrieltetar 21:d137ec53c3a9 576 lcd.DisplayStringAt(20, LINE(0), (uint8_t *)"Choisir une strategie", LEFT_MODE);
gabrieltetar 21:d137ec53c3a9 577
gabrieltetar 21:d137ec53c3a9 578 nbStrat = Bouton_Strat(); // retourne valeur de Strategie si bouton strat renvoi -1 on reviens en arriere
gabrieltetar 21:d137ec53c3a9 579 if (nbStrat == -1) {
gabrieltetar 21:d137ec53c3a9 580 strat_etat_s = SELECT_SIDE;
gabrieltetar 21:d137ec53c3a9 581 } else {
gabrieltetar 21:d137ec53c3a9 582 strat_etat_s = DETAILS;
gabrieltetar 21:d137ec53c3a9 583 }
gabrieltetar 21:d137ec53c3a9 584 wait(0.1);
gabrieltetar 21:d137ec53c3a9 585 break;
gabrieltetar 21:d137ec53c3a9 586
gabrieltetar 21:d137ec53c3a9 587 case DETAILS : //SECONDE VALIDATION DE LA STRAT
gabrieltetar 21:d137ec53c3a9 588 lcd.Clear(LCD_COLOR_WHITE);
gabrieltetar 21:d137ec53c3a9 589 lcd.SetBackColor(LCD_COLOR_WHITE);
gabrieltetar 21:d137ec53c3a9 590 lcd.SetTextColor(LCD_COLOR_BLACK);
gabrieltetar 21:d137ec53c3a9 591 CHECK.Draw(VERT);
gabrieltetar 21:d137ec53c3a9 592 RETOUR.Draw(LCD_COLOR_RED);
gabrieltetar 21:d137ec53c3a9 593
gabrieltetar 21:d137ec53c3a9 594 SelectionStrat(nbStrat); //affiche la stratégie selectionnée
gabrieltetar 21:d137ec53c3a9 595
gabrieltetar 21:d137ec53c3a9 596 while (strat_etat_s == DETAILS) {
gabrieltetar 21:d137ec53c3a9 597 canProcessRx();
gabrieltetar 21:d137ec53c3a9 598 if (CHECK.Touched()) {
gabrieltetar 21:d137ec53c3a9 599 if(gameEtat == ETAT_CONFIG) {
gabrieltetar 21:d137ec53c3a9 600 gameEtat = ETAT_GAME_INIT;
gabrieltetar 21:d137ec53c3a9 601 strat_etat_s=LECTURE;
gabrieltetar 21:d137ec53c3a9 602
gabrieltetar 21:d137ec53c3a9 603 }
gabrieltetar 21:d137ec53c3a9 604 while(CHECK.Touched());
gabrieltetar 21:d137ec53c3a9 605 }
gabrieltetar 21:d137ec53c3a9 606
gabrieltetar 21:d137ec53c3a9 607 if(RETOUR.Touched()) {
gabrieltetar 21:d137ec53c3a9 608 strat_etat_s = TACTIQUE;
gabrieltetar 21:d137ec53c3a9 609 while(RETOUR.Touched());
gabrieltetar 21:d137ec53c3a9 610 }
gabrieltetar 21:d137ec53c3a9 611 }
gabrieltetar 21:d137ec53c3a9 612 break;
gabrieltetar 21:d137ec53c3a9 613
gabrieltetar 21:d137ec53c3a9 614
gabrieltetar 21:d137ec53c3a9 615 case LECTURE :
gabrieltetar 21:d137ec53c3a9 616 break;
gabrieltetar 21:d137ec53c3a9 617 case AFF_WAIT_JACK : //FONCTIONS D'AFFICHAGE DE L'ATTENTE DU JACK
gabrieltetar 21:d137ec53c3a9 618 lcd.Clear(BLANC);
gabrieltetar 21:d137ec53c3a9 619 lcd.SetBackColor(LCD_COLOR_WHITE);
gabrieltetar 21:d137ec53c3a9 620 lcd.SetTextColor(LCD_COLOR_BLACK);
gabrieltetar 21:d137ec53c3a9 621
gabrieltetar 21:d137ec53c3a9 622 if (Cote == 0) {
gabrieltetar 21:d137ec53c3a9 623 lcd.Clear(VERT);
gabrieltetar 21:d137ec53c3a9 624 lcd.SetBackColor(VERT);
gabrieltetar 21:d137ec53c3a9 625 } else if (Cote == 1) {
gabrieltetar 21:d137ec53c3a9 626 lcd.Clear(ORANGE);
gabrieltetar 21:d137ec53c3a9 627 lcd.SetBackColor(ORANGE);
gabrieltetar 21:d137ec53c3a9 628 } else {
gabrieltetar 21:d137ec53c3a9 629 lcd.Clear(VERT);
gabrieltetar 21:d137ec53c3a9 630 lcd.SetBackColor(VERT);
gabrieltetar 21:d137ec53c3a9 631 }
gabrieltetar 21:d137ec53c3a9 632 canProcessRx();
gabrieltetar 21:d137ec53c3a9 633 lcd.DisplayStringAt(0, LINE(0), (uint8_t *)"En attente du Jack", CENTER_MODE);
gabrieltetar 21:d137ec53c3a9 634 strat_etat_s=WAIT_JACK;
gabrieltetar 21:d137ec53c3a9 635 break;
gabrieltetar 21:d137ec53c3a9 636
gabrieltetar 21:d137ec53c3a9 637 case WAIT_JACK: //VERITABLE ATTENTE DU JACK
gabrieltetar 21:d137ec53c3a9 638 break;
gabrieltetar 21:d137ec53c3a9 639
gabrieltetar 21:d137ec53c3a9 640 case FIN : //AFFICHAGE DE FIN AVEC LE SCORE FINAL
gabrieltetar 21:d137ec53c3a9 641 lcd.Clear (LCD_COLOR_WHITE);
gabrieltetar 21:d137ec53c3a9 642 lcd.SetBackColor(LCD_COLOR_WHITE);
gabrieltetar 21:d137ec53c3a9 643
gabrieltetar 21:d137ec53c3a9 644
gabrieltetar 21:d137ec53c3a9 645 while(1); // force le redemarage du robot
gabrieltetar 21:d137ec53c3a9 646 //break;
gabrieltetar 21:d137ec53c3a9 647
gabrieltetar 21:d137ec53c3a9 648 }
gabrieltetar 21:d137ec53c3a9 649 }
gabrieltetar 21:d137ec53c3a9 650 /****************************************************************************************/
gabrieltetar 21:d137ec53c3a9 651 /* FUNCTION NAME: Bouton_Strat */
gabrieltetar 21:d137ec53c3a9 652 /* DESCRIPTION : Sélection de la strat sur le lcd puis envoie sur CAN (à modifier!) */
gabrieltetar 21:d137ec53c3a9 653 /****************************************************************************************/
gabrieltetar 21:d137ec53c3a9 654 signed char Bouton_Strat (void)
gabrieltetar 21:d137ec53c3a9 655 {
gabrieltetar 21:d137ec53c3a9 656 char Ack_strat = 0;
gabrieltetar 21:d137ec53c3a9 657 signed char Strat = 0;
gabrieltetar 21:d137ec53c3a9 658 Button STRAT_1 (0, 30, 190, 110, strat_sd[0]);
gabrieltetar 21:d137ec53c3a9 659 Button STRAT_2 (210, 30, 190, 110, strat_sd[1]);
gabrieltetar 21:d137ec53c3a9 660 Button STRAT_3 (0, 150, 190, 110, strat_sd[2]);
gabrieltetar 21:d137ec53c3a9 661 Button STRAT_4 (210, 150, 190, 110, strat_sd[3]);
gabrieltetar 21:d137ec53c3a9 662 Button STRAT_5 (0, 270, 190, 110,strat_sd[4]);
gabrieltetar 21:d137ec53c3a9 663 Button STRAT_6 (210, 270, 190, 110, strat_sd[5]);
gabrieltetar 21:d137ec53c3a9 664 Button STRAT_7 (0, 390, 190, 110, strat_sd[6]);
gabrieltetar 21:d137ec53c3a9 665 Button STRAT_8 (210, 390, 190, 110, strat_sd[7]);
gabrieltetar 21:d137ec53c3a9 666 Button STRAT_9 (0, 510, 190, 110, strat_sd[8]);
gabrieltetar 21:d137ec53c3a9 667 Button STRAT_10 (210, 510, 190, 110, strat_sd[9]);
gabrieltetar 21:d137ec53c3a9 668 Button RETOUR (0, 680, 400, 110, "--Precedent--");
gabrieltetar 21:d137ec53c3a9 669 //Definition des boutons
gabrieltetar 21:d137ec53c3a9 670
gabrieltetar 21:d137ec53c3a9 671 Ack_strat = 0;
gabrieltetar 21:d137ec53c3a9 672 Strat = 0;
gabrieltetar 21:d137ec53c3a9 673 STRAT_1.Draw(0xFFF0F0F0, 0);
gabrieltetar 21:d137ec53c3a9 674 STRAT_2.Draw(0xFFF0F0F0, 0);
gabrieltetar 21:d137ec53c3a9 675 STRAT_3.Draw(0xFFF0F0F0, 0);
gabrieltetar 21:d137ec53c3a9 676 STRAT_4.Draw(0xFFF0F0F0, 0);
gabrieltetar 21:d137ec53c3a9 677 STRAT_5.Draw(0xFFF0F0F0, 0);
gabrieltetar 21:d137ec53c3a9 678 STRAT_6.Draw(0xFFF0F0F0, 0);
gabrieltetar 21:d137ec53c3a9 679 STRAT_7.Draw(0xFFF0F0F0, 0);
gabrieltetar 21:d137ec53c3a9 680 STRAT_8.Draw(0xFFF0F0F0, 0);
gabrieltetar 21:d137ec53c3a9 681 STRAT_9.Draw(0xFFF0F0F0, 0);
gabrieltetar 21:d137ec53c3a9 682 STRAT_10.Draw(0xFFF0F0F0, 0);
gabrieltetar 21:d137ec53c3a9 683 RETOUR.Draw(0xFFFF0000, 0);
gabrieltetar 21:d137ec53c3a9 684
gabrieltetar 21:d137ec53c3a9 685 while(Ack_strat == 0) {
gabrieltetar 21:d137ec53c3a9 686 canProcessRx();
gabrieltetar 21:d137ec53c3a9 687 CANMessage msgTx=CANMessage();
gabrieltetar 21:d137ec53c3a9 688 //msgTx.id=ECRAN_CHOICE_STRAT;
gabrieltetar 21:d137ec53c3a9 689 if (RETOUR.Touched())
gabrieltetar 21:d137ec53c3a9 690 return -1;
gabrieltetar 21:d137ec53c3a9 691 while(RETOUR.Touched());
gabrieltetar 21:d137ec53c3a9 692 //////////////////////////////STRATEGIE N°1
gabrieltetar 21:d137ec53c3a9 693 if (STRAT_1.Touched()) {
gabrieltetar 21:d137ec53c3a9 694 Strat = 0;
gabrieltetar 21:d137ec53c3a9 695 //msgTx.data[0] = 0x1;
gabrieltetar 21:d137ec53c3a9 696 //can2.write(msgTx);
gabrieltetar 21:d137ec53c3a9 697 while(STRAT_1.Touched());
gabrieltetar 21:d137ec53c3a9 698 Ack_strat =1;
gabrieltetar 21:d137ec53c3a9 699 }
gabrieltetar 21:d137ec53c3a9 700 /////////////////////////////STRATEGIE N°2
gabrieltetar 21:d137ec53c3a9 701 if (STRAT_2.Touched()) {
gabrieltetar 21:d137ec53c3a9 702 Strat = 1;
gabrieltetar 21:d137ec53c3a9 703 //msgTx.data[0] = 0x2;
gabrieltetar 21:d137ec53c3a9 704 //can2.write(msgTx);
gabrieltetar 21:d137ec53c3a9 705 while(STRAT_2.Touched());
gabrieltetar 21:d137ec53c3a9 706 Ack_strat =1;
gabrieltetar 21:d137ec53c3a9 707 }
gabrieltetar 21:d137ec53c3a9 708 //////////////////////////////STRATEGIE N°3
gabrieltetar 21:d137ec53c3a9 709 if (STRAT_3.Touched()) {
gabrieltetar 21:d137ec53c3a9 710 Strat = 2;
gabrieltetar 21:d137ec53c3a9 711 //msgTx.data[0] = 0x3;
gabrieltetar 21:d137ec53c3a9 712 //can2.write(msgTx);
gabrieltetar 21:d137ec53c3a9 713 while(STRAT_3.Touched());
gabrieltetar 21:d137ec53c3a9 714 Ack_strat =1;
gabrieltetar 21:d137ec53c3a9 715 }
gabrieltetar 21:d137ec53c3a9 716 /////////////////////////////STRATEGIE N°4
gabrieltetar 21:d137ec53c3a9 717 if (STRAT_4.Touched()) {
gabrieltetar 21:d137ec53c3a9 718 Strat = 3;
gabrieltetar 21:d137ec53c3a9 719 //msgTx.data[0] = 0x4;
gabrieltetar 21:d137ec53c3a9 720 //can2.write(msgTx);
gabrieltetar 21:d137ec53c3a9 721 while(STRAT_4.Touched());
gabrieltetar 21:d137ec53c3a9 722 Ack_strat =1;
gabrieltetar 21:d137ec53c3a9 723 }
gabrieltetar 21:d137ec53c3a9 724 ///////////////////////////////STRATEGIE N°5
gabrieltetar 21:d137ec53c3a9 725 if (STRAT_5.Touched()) {
gabrieltetar 21:d137ec53c3a9 726 Strat = 4;
gabrieltetar 21:d137ec53c3a9 727 //msgTx.data[0] = 0x5;
gabrieltetar 21:d137ec53c3a9 728 //can2.write(msgTx);
gabrieltetar 21:d137ec53c3a9 729 while(STRAT_5.Touched());
gabrieltetar 21:d137ec53c3a9 730 Ack_strat =1;
gabrieltetar 21:d137ec53c3a9 731 }
gabrieltetar 21:d137ec53c3a9 732 ////////////////////////////////STRATEGIE N°6
gabrieltetar 21:d137ec53c3a9 733 if (STRAT_6.Touched()) {
gabrieltetar 21:d137ec53c3a9 734 Strat = 5;
gabrieltetar 21:d137ec53c3a9 735 //msgTx.data[0] = 0x6;
gabrieltetar 21:d137ec53c3a9 736 //can2.write(msgTx);
gabrieltetar 21:d137ec53c3a9 737 while(STRAT_6.Touched());
gabrieltetar 21:d137ec53c3a9 738 Ack_strat =1;
gabrieltetar 21:d137ec53c3a9 739 }
gabrieltetar 21:d137ec53c3a9 740 /////////////////////////////////STRATEGIE N°7
gabrieltetar 21:d137ec53c3a9 741 if (STRAT_7.Touched()) {
gabrieltetar 21:d137ec53c3a9 742 Strat = 6;
gabrieltetar 21:d137ec53c3a9 743 //msgTx.data[0] = 0x7;
gabrieltetar 21:d137ec53c3a9 744 //can2.write(msgTx);
gabrieltetar 21:d137ec53c3a9 745 while(STRAT_7.Touched());
gabrieltetar 21:d137ec53c3a9 746 Ack_strat =1;
gabrieltetar 21:d137ec53c3a9 747 }
gabrieltetar 21:d137ec53c3a9 748 /////////////////////////////////STRATEGIE N°8
gabrieltetar 21:d137ec53c3a9 749 if (STRAT_8.Touched()) {
gabrieltetar 21:d137ec53c3a9 750 Strat = 7;
gabrieltetar 21:d137ec53c3a9 751 //msgTx.data[0] = 0x8;
gabrieltetar 21:d137ec53c3a9 752 //can2.write(msgTx);
gabrieltetar 21:d137ec53c3a9 753 while(STRAT_8.Touched());
gabrieltetar 21:d137ec53c3a9 754 Ack_strat =1;
gabrieltetar 21:d137ec53c3a9 755 }
gabrieltetar 21:d137ec53c3a9 756 /////////////////////////////////STRATEGIE N°9
gabrieltetar 21:d137ec53c3a9 757 if (STRAT_9.Touched()) {
gabrieltetar 21:d137ec53c3a9 758 Strat = 8;
gabrieltetar 21:d137ec53c3a9 759 //msgTx.data[0] = 0x9;
gabrieltetar 21:d137ec53c3a9 760 //can2.write(msgTx);
gabrieltetar 21:d137ec53c3a9 761 while(STRAT_9.Touched());
gabrieltetar 21:d137ec53c3a9 762 Ack_strat =1;
gabrieltetar 21:d137ec53c3a9 763 }
gabrieltetar 21:d137ec53c3a9 764 ///////////////////////////////////STRATEGIE N°10
gabrieltetar 21:d137ec53c3a9 765 if (STRAT_10.Touched()) {
gabrieltetar 21:d137ec53c3a9 766 Strat = 9;
gabrieltetar 21:d137ec53c3a9 767 //msgTx.data[0] = 0xA;
gabrieltetar 21:d137ec53c3a9 768 //can2.write(msgTx);
gabrieltetar 21:d137ec53c3a9 769 while(STRAT_10.Touched());
gabrieltetar 21:d137ec53c3a9 770 Ack_strat =1;
gabrieltetar 21:d137ec53c3a9 771 }
gabrieltetar 21:d137ec53c3a9 772
gabrieltetar 21:d137ec53c3a9 773 }
gabrieltetar 21:d137ec53c3a9 774 return Strat;
gabrieltetar 21:d137ec53c3a9 775
gabrieltetar 21:d137ec53c3a9 776 }
gabrieltetar 21:d137ec53c3a9 777 /****************************************************************************************/
gabrieltetar 21:d137ec53c3a9 778 /* FUNCTION NAME: SelectionStrat */
gabrieltetar 21:d137ec53c3a9 779 /* DESCRIPTION : Affiche la Stratégie sélectionnée sur l'ihm */
gabrieltetar 21:d137ec53c3a9 780 /****************************************************************************************/
gabrieltetar 21:d137ec53c3a9 781
gabrieltetar 21:d137ec53c3a9 782
gabrieltetar 21:d137ec53c3a9 783 void SelectionStrat (unsigned char Strategie)
gabrieltetar 21:d137ec53c3a9 784 {
gabrieltetar 21:d137ec53c3a9 785 lcd.SetBackColor(LCD_COLOR_WHITE);
gabrieltetar 21:d137ec53c3a9 786 lcd.SetTextColor(LCD_COLOR_BLACK);
gabrieltetar 21:d137ec53c3a9 787
gabrieltetar 21:d137ec53c3a9 788 switch (Strategie+1) {
gabrieltetar 21:d137ec53c3a9 789 case 0x1 :
gabrieltetar 21:d137ec53c3a9 790 //description de Strategie n°1
gabrieltetar 21:d137ec53c3a9 791 lcd.DisplayStringAt(150, 0, (uint8_t *)strat_sd[Strategie], LEFT_MODE);
gabrieltetar 21:d137ec53c3a9 792 break;
gabrieltetar 21:d137ec53c3a9 793
gabrieltetar 21:d137ec53c3a9 794 case 0x2 :
gabrieltetar 21:d137ec53c3a9 795 //description de Strategie n°2
gabrieltetar 21:d137ec53c3a9 796 lcd.DisplayStringAt(150,0, (uint8_t *)strat_sd[Strategie], LEFT_MODE);
gabrieltetar 21:d137ec53c3a9 797 break;
gabrieltetar 21:d137ec53c3a9 798
gabrieltetar 21:d137ec53c3a9 799 case 0x3 :
gabrieltetar 21:d137ec53c3a9 800 //description de Strategie n°3
gabrieltetar 21:d137ec53c3a9 801 lcd.DisplayStringAt(150,0, (uint8_t *)strat_sd[Strategie], LEFT_MODE);
gabrieltetar 21:d137ec53c3a9 802 break;
gabrieltetar 21:d137ec53c3a9 803
gabrieltetar 21:d137ec53c3a9 804 case 0x4 :
gabrieltetar 21:d137ec53c3a9 805 //description de Strategie n°4
gabrieltetar 21:d137ec53c3a9 806 lcd.DisplayStringAt(150,0, (uint8_t *)strat_sd[Strategie], LEFT_MODE);
gabrieltetar 21:d137ec53c3a9 807 break;
gabrieltetar 21:d137ec53c3a9 808
gabrieltetar 21:d137ec53c3a9 809 case 0x5 :
gabrieltetar 21:d137ec53c3a9 810 //description de Strategie n°5
gabrieltetar 21:d137ec53c3a9 811 lcd.DisplayStringAt(150,0, (uint8_t *)strat_sd[Strategie], LEFT_MODE);
gabrieltetar 21:d137ec53c3a9 812 break;
gabrieltetar 21:d137ec53c3a9 813
gabrieltetar 21:d137ec53c3a9 814 case 0x6 :
gabrieltetar 21:d137ec53c3a9 815 //description de Strategie n°5
gabrieltetar 21:d137ec53c3a9 816 lcd.DisplayStringAt(150,0, (uint8_t *)strat_sd[Strategie], LEFT_MODE);
gabrieltetar 21:d137ec53c3a9 817 break;
gabrieltetar 21:d137ec53c3a9 818
gabrieltetar 21:d137ec53c3a9 819 case 0x7 :
gabrieltetar 21:d137ec53c3a9 820 //description de Strategie n°5
gabrieltetar 21:d137ec53c3a9 821 lcd.DisplayStringAt(150,0, (uint8_t *)strat_sd[Strategie], LEFT_MODE);
gabrieltetar 21:d137ec53c3a9 822 break;
gabrieltetar 21:d137ec53c3a9 823
gabrieltetar 21:d137ec53c3a9 824 case 0x8 :
gabrieltetar 21:d137ec53c3a9 825 //description de Strategie n°5
gabrieltetar 21:d137ec53c3a9 826 lcd.DisplayStringAt(150,0, (uint8_t *)strat_sd[Strategie], LEFT_MODE);
gabrieltetar 21:d137ec53c3a9 827 break;
gabrieltetar 21:d137ec53c3a9 828
gabrieltetar 21:d137ec53c3a9 829 case 0x9 :
gabrieltetar 21:d137ec53c3a9 830 //description de Strategie n°5
gabrieltetar 21:d137ec53c3a9 831 lcd.DisplayStringAt(150,0, (uint8_t *)strat_sd[Strategie], LEFT_MODE);
gabrieltetar 21:d137ec53c3a9 832 break;
gabrieltetar 21:d137ec53c3a9 833
gabrieltetar 21:d137ec53c3a9 834 case 0xA :
gabrieltetar 21:d137ec53c3a9 835 //description de Strategie n°5
gabrieltetar 21:d137ec53c3a9 836 lcd.DisplayStringAt(150,0, (uint8_t *)strat_sd[Strategie], LEFT_MODE);
gabrieltetar 21:d137ec53c3a9 837 break;
gabrieltetar 21:d137ec53c3a9 838 }
gabrieltetar 21:d137ec53c3a9 839 }