marc le dep

Dependencies:   BSP_DISCO_F429ZI LCD_DISCO_F429ZI TS_DISCO_F429ZI mbed

Committer:
Alex_mln
Date:
Thu Mar 29 07:14:46 2018 +0000
Revision:
1:59fe933886bd
Parent:
0:4910cdb3d377
sghkjlm

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Alex_mln 0:4910cdb3d377 1 #include "mbed.h"
Alex_mln 0:4910cdb3d377 2 #include "LCD_DISCO_F429ZI.h"
Alex_mln 0:4910cdb3d377 3 #include "TS_DISCO_F429ZI.h"
Alex_mln 0:4910cdb3d377 4
Alex_mln 0:4910cdb3d377 5 #include "calibrage.h"
Alex_mln 0:4910cdb3d377 6 #include "capteur.h"
Alex_mln 0:4910cdb3d377 7 #include "fonctions.h"
Alex_mln 0:4910cdb3d377 8 #include "automatique.h"
Alex_mln 0:4910cdb3d377 9 #include "manuel.h"
Alex_mln 0:4910cdb3d377 10
Alex_mln 0:4910cdb3d377 11
Alex_mln 0:4910cdb3d377 12 LCD_DISCO_F429ZI lcd;
Alex_mln 0:4910cdb3d377 13 //LCD_DISCO_F429ZI lcd;
Alex_mln 0:4910cdb3d377 14 TS_DISCO_F429ZI ts;
Alex_mln 0:4910cdb3d377 15 TS_StateTypeDef tsState;
Alex_mln 0:4910cdb3d377 16
Alex_mln 0:4910cdb3d377 17 int vol_y=145;
Alex_mln 0:4910cdb3d377 18 bool test=false;
Alex_mln 0:4910cdb3d377 19 bool indice_depart=false;
Alex_mln 0:4910cdb3d377 20 uint16_t x, y;
Alex_mln 0:4910cdb3d377 21
Alex_mln 0:4910cdb3d377 22 bool var_manuel=false;
Alex_mln 0:4910cdb3d377 23 bool var_automatique=false;
Alex_mln 0:4910cdb3d377 24
Alex_mln 0:4910cdb3d377 25
Alex_mln 0:4910cdb3d377 26
Alex_mln 0:4910cdb3d377 27 void initialisation(){
Alex_mln 0:4910cdb3d377 28 lcd.Clear(LCD_COLOR_WHITE);
Alex_mln 0:4910cdb3d377 29
Alex_mln 0:4910cdb3d377 30
Alex_mln 0:4910cdb3d377 31 lcd.SetTextColor(LCD_COLOR_BLUE);
Alex_mln 0:4910cdb3d377 32 lcd.FillRect(18,57,104,30); //Rectangle calibrage
Alex_mln 0:4910cdb3d377 33 lcd.SetTextColor(LCD_COLOR_RED);
Alex_mln 0:4910cdb3d377 34 lcd.FillEllipse(65, 118, 45, 15); //ellipse des modes
Alex_mln 0:4910cdb3d377 35 lcd.FillRect(20, 180-35, 90, 40); //Rectangle manuel
Alex_mln 0:4910cdb3d377 36 lcd.FillRect(5, 230-35, 135, 40); //Rectangle automatique
Alex_mln 0:4910cdb3d377 37
Alex_mln 0:4910cdb3d377 38 //La vitesse :
Alex_mln 0:4910cdb3d377 39 lcd.SetTextColor(LCD_COLOR_RED);
Alex_mln 0:4910cdb3d377 40 lcd.FillRect(200,80,2,180);
Alex_mln 0:4910cdb3d377 41 lcd.SetTextColor(LCD_COLOR_BLACK);
Alex_mln 0:4910cdb3d377 42 lcd.FillRect(190,vol_y-15,20,30);
Alex_mln 0:4910cdb3d377 43 lcd.SetBackColor(LCD_COLOR_WHITE);
Alex_mln 0:4910cdb3d377 44 lcd.SetTextColor(LCD_COLOR_BLACK);
Alex_mln 0:4910cdb3d377 45 lcd.DisplayStringAt(0, LINE(7), (uint8_t *)"V", RIGHT_MODE);
Alex_mln 0:4910cdb3d377 46 lcd.DisplayStringAt(0, LINE(8), (uint8_t *)"I", RIGHT_MODE);
Alex_mln 0:4910cdb3d377 47 lcd.DisplayStringAt(0, LINE(9), (uint8_t *)"T", RIGHT_MODE);
Alex_mln 0:4910cdb3d377 48 lcd.DisplayStringAt(0, LINE(10), (uint8_t *)"E", RIGHT_MODE);
Alex_mln 0:4910cdb3d377 49 lcd.DisplayStringAt(0, LINE(11), (uint8_t *)"S", RIGHT_MODE);
Alex_mln 0:4910cdb3d377 50 lcd.DisplayStringAt(0, LINE(12), (uint8_t *)"S", RIGHT_MODE);
Alex_mln 0:4910cdb3d377 51 lcd.DisplayStringAt(0, LINE(13), (uint8_t *)"E", RIGHT_MODE);
Alex_mln 0:4910cdb3d377 52
Alex_mln 0:4910cdb3d377 53
Alex_mln 0:4910cdb3d377 54 //Départ
Alex_mln 0:4910cdb3d377 55 lcd.SetTextColor(LCD_COLOR_BLACK);
Alex_mln 0:4910cdb3d377 56 lcd.FillEllipse(115, 292, 60, 23);
Alex_mln 0:4910cdb3d377 57 lcd.SetTextColor(LCD_COLOR_GREEN);
Alex_mln 0:4910cdb3d377 58 lcd.FillEllipse(115, 292, 55, 20);
Alex_mln 0:4910cdb3d377 59
Alex_mln 0:4910cdb3d377 60
Alex_mln 0:4910cdb3d377 61 //Ecriture
Alex_mln 0:4910cdb3d377 62
Alex_mln 0:4910cdb3d377 63 lcd.SetTextColor(LCD_COLOR_WHITE);
Alex_mln 0:4910cdb3d377 64 lcd.SetBackColor(LCD_COLOR_BLUE);
Alex_mln 0:4910cdb3d377 65 lcd.DisplayStringAt(20,67,(uint8_t *)"Calibrage",LEFT_MODE);
Alex_mln 0:4910cdb3d377 66 lcd.SetBackColor(LCD_COLOR_RED);
Alex_mln 0:4910cdb3d377 67 lcd.DisplayStringAt(0, LINE(1), (uint8_t *)"Turbo Poparcalex2", CENTER_MODE);
Alex_mln 0:4910cdb3d377 68
Alex_mln 0:4910cdb3d377 69 lcd.DisplayStringAt(45, LINE(7), (uint8_t *)"Mode", LEFT_MODE);
Alex_mln 0:4910cdb3d377 70 lcd.DisplayStringAt(35, LINE(10), (uint8_t *)"Manuel", LEFT_MODE);
Alex_mln 0:4910cdb3d377 71 lcd.DisplayStringAt(15, LINE(13), (uint8_t *)"Automatique", LEFT_MODE);
Alex_mln 0:4910cdb3d377 72
Alex_mln 0:4910cdb3d377 73 lcd.SetBackColor(LCD_COLOR_GREEN);
Alex_mln 0:4910cdb3d377 74 lcd.SetTextColor(LCD_COLOR_BLACK);
Alex_mln 0:4910cdb3d377 75 lcd.DisplayStringAt(0, LINE(18), (uint8_t *)"Depart", CENTER_MODE);
Alex_mln 0:4910cdb3d377 76
Alex_mln 0:4910cdb3d377 77 test=true;
Alex_mln 0:4910cdb3d377 78 wait(0.1);}
Alex_mln 0:4910cdb3d377 79
Alex_mln 0:4910cdb3d377 80
Alex_mln 0:4910cdb3d377 81 void manuel(){
Alex_mln 0:4910cdb3d377 82 lcd.SetTextColor(LCD_COLOR_GREEN);
Alex_mln 0:4910cdb3d377 83 lcd.FillRect(20, 180-35, 90, 40);
Alex_mln 0:4910cdb3d377 84 lcd.SetBackColor(LCD_COLOR_GREEN);
Alex_mln 0:4910cdb3d377 85 lcd.SetTextColor(LCD_COLOR_BLACK);
Alex_mln 0:4910cdb3d377 86 lcd.DisplayStringAt(35, LINE(10), (uint8_t *)"Manuel", LEFT_MODE);
Alex_mln 0:4910cdb3d377 87 var_manuel=true;
Alex_mln 0:4910cdb3d377 88
Alex_mln 0:4910cdb3d377 89 lcd.SetTextColor(LCD_COLOR_RED);
Alex_mln 0:4910cdb3d377 90 lcd.FillRect(5, 230-35, 135, 40);
Alex_mln 0:4910cdb3d377 91 lcd.SetBackColor(LCD_COLOR_RED);
Alex_mln 0:4910cdb3d377 92 lcd.SetTextColor(LCD_COLOR_WHITE);
Alex_mln 0:4910cdb3d377 93 lcd.DisplayStringAt(15, LINE(13), (uint8_t *)"Automatique", LEFT_MODE);
Alex_mln 0:4910cdb3d377 94 var_automatique=false;
Alex_mln 0:4910cdb3d377 95 x=0;
Alex_mln 0:4910cdb3d377 96 y=0; }
Alex_mln 0:4910cdb3d377 97
Alex_mln 0:4910cdb3d377 98
Alex_mln 0:4910cdb3d377 99 void automatique(){
Alex_mln 0:4910cdb3d377 100 lcd.SetTextColor(LCD_COLOR_RED);
Alex_mln 0:4910cdb3d377 101 lcd.FillRect(20, 180-35, 90, 40);
Alex_mln 0:4910cdb3d377 102 lcd.SetBackColor(LCD_COLOR_RED);
Alex_mln 0:4910cdb3d377 103 lcd.SetTextColor(LCD_COLOR_WHITE);
Alex_mln 0:4910cdb3d377 104 lcd.DisplayStringAt(35, LINE(10), (uint8_t *)"Manuel", LEFT_MODE);
Alex_mln 0:4910cdb3d377 105 var_manuel=false;
Alex_mln 0:4910cdb3d377 106
Alex_mln 0:4910cdb3d377 107 lcd.SetTextColor(LCD_COLOR_GREEN);
Alex_mln 0:4910cdb3d377 108 lcd.FillRect(5, 230-35, 135, 40);
Alex_mln 0:4910cdb3d377 109 lcd.SetBackColor(LCD_COLOR_GREEN);
Alex_mln 0:4910cdb3d377 110 lcd.SetTextColor(LCD_COLOR_BLACK);
Alex_mln 0:4910cdb3d377 111 lcd.DisplayStringAt(15, LINE(13), (uint8_t *)"Automatique", LEFT_MODE);
Alex_mln 0:4910cdb3d377 112 var_automatique=true;
Alex_mln 0:4910cdb3d377 113 x=0;
Alex_mln 0:4910cdb3d377 114 y=0; }
Alex_mln 0:4910cdb3d377 115
Alex_mln 0:4910cdb3d377 116
Alex_mln 0:4910cdb3d377 117 void vitesse(){
Alex_mln 0:4910cdb3d377 118 lcd.SetTextColor(LCD_COLOR_WHITE);
Alex_mln 0:4910cdb3d377 119 lcd.FillRect(190,vol_y-15,20,30);
Alex_mln 0:4910cdb3d377 120 lcd.SetTextColor(LCD_COLOR_RED);
Alex_mln 0:4910cdb3d377 121 lcd.FillRect(200,80,2,180);
Alex_mln 0:4910cdb3d377 122 lcd.SetBackColor(LCD_COLOR_WHITE);
Alex_mln 0:4910cdb3d377 123 lcd.SetTextColor(LCD_COLOR_BLACK);
Alex_mln 0:4910cdb3d377 124 lcd.DisplayStringAt(0, LINE(7), (uint8_t *)"V", RIGHT_MODE);
Alex_mln 0:4910cdb3d377 125 lcd.DisplayStringAt(0, LINE(8), (uint8_t *)"I", RIGHT_MODE);
Alex_mln 0:4910cdb3d377 126 lcd.DisplayStringAt(0, LINE(9), (uint8_t *)"T", RIGHT_MODE);
Alex_mln 0:4910cdb3d377 127 lcd.DisplayStringAt(0, LINE(10), (uint8_t *)"E", RIGHT_MODE);
Alex_mln 0:4910cdb3d377 128 lcd.DisplayStringAt(0, LINE(11), (uint8_t *)"S", RIGHT_MODE);
Alex_mln 0:4910cdb3d377 129 lcd.DisplayStringAt(0, LINE(12), (uint8_t *)"S", RIGHT_MODE);
Alex_mln 0:4910cdb3d377 130 lcd.DisplayStringAt(0, LINE(13), (uint8_t *)"E", RIGHT_MODE);
Alex_mln 0:4910cdb3d377 131 lcd.SetTextColor(LCD_COLOR_BLACK);
Alex_mln 0:4910cdb3d377 132 vol_y=y;
Alex_mln 0:4910cdb3d377 133 lcd.FillRect(190,vol_y-15,20,30);
Alex_mln 0:4910cdb3d377 134 if(y>999){ y=y/10; }
Alex_mln 0:4910cdb3d377 135 int valeur=((274.0-y)/(274.0-83))*99;
Alex_mln 0:4910cdb3d377 136 uint8_t text[7];
Alex_mln 0:4910cdb3d377 137 sprintf((char*)text, "%d ", valeur);
Alex_mln 0:4910cdb3d377 138 lcd.DisplayStringAt(0, LINE(4), (uint8_t *)&text, RIGHT_MODE);
Alex_mln 0:4910cdb3d377 139 lcd.DisplayStringAt(0, LINE(4), (uint8_t *)"% ", RIGHT_MODE);
Alex_mln 0:4910cdb3d377 140
Alex_mln 0:4910cdb3d377 141
Alex_mln 0:4910cdb3d377 142 x=0;
Alex_mln 0:4910cdb3d377 143 y=0; }
Alex_mln 0:4910cdb3d377 144
Alex_mln 0:4910cdb3d377 145
Alex_mln 0:4910cdb3d377 146 void depart(){
Alex_mln 0:4910cdb3d377 147 lcd.Clear(LCD_COLOR_TRANSPARENT);
Alex_mln 0:4910cdb3d377 148 lcd.SetBackColor(LCD_COLOR_TRANSPARENT);
Alex_mln 0:4910cdb3d377 149 lcd.SetTextColor(LCD_COLOR_RED);
Alex_mln 0:4910cdb3d377 150 lcd.DisplayStringAt(0, LINE(2), (uint8_t *)"3", CENTER_MODE);
Alex_mln 0:4910cdb3d377 151 wait(1);
Alex_mln 0:4910cdb3d377 152 lcd.DisplayStringAt(0, LINE(2), (uint8_t *)"2", CENTER_MODE);
Alex_mln 0:4910cdb3d377 153 wait(1);
Alex_mln 0:4910cdb3d377 154 lcd.DisplayStringAt(0, LINE(2), (uint8_t *)"1", CENTER_MODE);
Alex_mln 0:4910cdb3d377 155 wait(1);
Alex_mln 0:4910cdb3d377 156 lcd.DisplayStringAt(0, LINE(2), (uint8_t *)"EN MARCHE", CENTER_MODE);
Alex_mln 0:4910cdb3d377 157
Alex_mln 0:4910cdb3d377 158 lcd.SetBackColor(LCD_COLOR_RED);
Alex_mln 0:4910cdb3d377 159 lcd.FillCircle(120, 180-20, 100);
Alex_mln 0:4910cdb3d377 160 lcd.SetTextColor(LCD_COLOR_WHITE);
Alex_mln 0:4910cdb3d377 161 lcd.DisplayStringAt(0, 170-20, (uint8_t *)"STOP", CENTER_MODE);
Alex_mln 0:4910cdb3d377 162 wait(0.5);
Alex_mln 0:4910cdb3d377 163 indice_depart=true;
Alex_mln 0:4910cdb3d377 164 x=0;
Alex_mln 0:4910cdb3d377 165 y=0; }
Alex_mln 0:4910cdb3d377 166
Alex_mln 0:4910cdb3d377 167
Alex_mln 0:4910cdb3d377 168 void stop(){
Alex_mln 0:4910cdb3d377 169 lcd.Clear(LCD_COLOR_WHITE);
Alex_mln 0:4910cdb3d377 170
Alex_mln 0:4910cdb3d377 171 lcd.SetBackColor(LCD_COLOR_RED);
Alex_mln 0:4910cdb3d377 172 lcd.SetTextColor(LCD_COLOR_WHITE);
Alex_mln 0:4910cdb3d377 173 lcd.DisplayStringAt(0, LINE(1), (uint8_t *)"Turbo Poparcalex2", CENTER_MODE);
Alex_mln 0:4910cdb3d377 174
Alex_mln 0:4910cdb3d377 175 //modes
Alex_mln 0:4910cdb3d377 176 lcd.SetTextColor(LCD_COLOR_RED);
Alex_mln 0:4910cdb3d377 177 lcd.FillEllipse(65, 118, 45, 15);
Alex_mln 0:4910cdb3d377 178 lcd.SetTextColor(LCD_COLOR_WHITE);
Alex_mln 0:4910cdb3d377 179 lcd.DisplayStringAt(45, LINE(7), (uint8_t *)"Mode", LEFT_MODE);
Alex_mln 0:4910cdb3d377 180
Alex_mln 0:4910cdb3d377 181 //vitesse
Alex_mln 0:4910cdb3d377 182 lcd.SetTextColor(LCD_COLOR_RED);
Alex_mln 0:4910cdb3d377 183 lcd.FillRect(200,80,2,180);
Alex_mln 0:4910cdb3d377 184 lcd.SetTextColor(LCD_COLOR_BLACK);
Alex_mln 0:4910cdb3d377 185 lcd.FillRect(190,vol_y-15,20,30);
Alex_mln 0:4910cdb3d377 186 lcd.SetBackColor(LCD_COLOR_WHITE);
Alex_mln 0:4910cdb3d377 187 lcd.SetTextColor(LCD_COLOR_BLACK);
Alex_mln 0:4910cdb3d377 188 lcd.DisplayStringAt(0, LINE(7), (uint8_t *)"V", RIGHT_MODE);
Alex_mln 0:4910cdb3d377 189 lcd.DisplayStringAt(0, LINE(8), (uint8_t *)"I", RIGHT_MODE);
Alex_mln 0:4910cdb3d377 190 lcd.DisplayStringAt(0, LINE(9), (uint8_t *)"T", RIGHT_MODE);
Alex_mln 0:4910cdb3d377 191 lcd.DisplayStringAt(0, LINE(10), (uint8_t *)"E", RIGHT_MODE);
Alex_mln 0:4910cdb3d377 192 lcd.DisplayStringAt(0, LINE(11), (uint8_t *)"S", RIGHT_MODE);
Alex_mln 0:4910cdb3d377 193 lcd.DisplayStringAt(0, LINE(12), (uint8_t *)"S", RIGHT_MODE);
Alex_mln 0:4910cdb3d377 194 lcd.DisplayStringAt(0, LINE(13), (uint8_t *)"E", RIGHT_MODE);
Alex_mln 0:4910cdb3d377 195
Alex_mln 0:4910cdb3d377 196 //Calibrage
Alex_mln 0:4910cdb3d377 197 lcd.SetTextColor(LCD_COLOR_BLUE);
Alex_mln 0:4910cdb3d377 198 lcd.FillRect(18,57,104,30);
Alex_mln 0:4910cdb3d377 199 lcd.SetTextColor(LCD_COLOR_WHITE);
Alex_mln 0:4910cdb3d377 200 lcd.SetBackColor(LCD_COLOR_BLUE);
Alex_mln 0:4910cdb3d377 201 lcd.DisplayStringAt(20,67,(uint8_t *)"Calibrage",LEFT_MODE);
Alex_mln 0:4910cdb3d377 202
Alex_mln 0:4910cdb3d377 203
Alex_mln 0:4910cdb3d377 204 //depart
Alex_mln 0:4910cdb3d377 205 lcd.SetTextColor(LCD_COLOR_BLACK);
Alex_mln 0:4910cdb3d377 206 lcd.FillEllipse(115, 292, 58, 23);
Alex_mln 0:4910cdb3d377 207 lcd.SetTextColor(LCD_COLOR_GREEN);
Alex_mln 0:4910cdb3d377 208 lcd.FillEllipse(115, 292, 55, 20);
Alex_mln 0:4910cdb3d377 209 lcd.SetBackColor(LCD_COLOR_GREEN);
Alex_mln 0:4910cdb3d377 210 lcd.SetTextColor(LCD_COLOR_BLACK);
Alex_mln 0:4910cdb3d377 211 lcd.DisplayStringAt(0, LINE(18), (uint8_t *)"Depart", CENTER_MODE);
Alex_mln 0:4910cdb3d377 212
Alex_mln 0:4910cdb3d377 213 if(var_manuel==true){
Alex_mln 0:4910cdb3d377 214 manuel();}
Alex_mln 0:4910cdb3d377 215
Alex_mln 0:4910cdb3d377 216 else if(var_automatique==true){
Alex_mln 0:4910cdb3d377 217 automatique();}
Alex_mln 0:4910cdb3d377 218
Alex_mln 0:4910cdb3d377 219 else{
Alex_mln 0:4910cdb3d377 220 lcd.SetTextColor(LCD_COLOR_RED);
Alex_mln 0:4910cdb3d377 221 lcd.FillRect(20, 180-35, 90, 40); //Rectangle manuel
Alex_mln 0:4910cdb3d377 222 lcd.FillRect(5, 230-35, 135, 40); //Rectangle automatique
Alex_mln 0:4910cdb3d377 223
Alex_mln 0:4910cdb3d377 224 lcd.SetBackColor(LCD_COLOR_RED);
Alex_mln 0:4910cdb3d377 225 lcd.SetTextColor(LCD_COLOR_WHITE);
Alex_mln 0:4910cdb3d377 226
Alex_mln 0:4910cdb3d377 227 lcd.DisplayStringAt(35, LINE(10), (uint8_t *)"Manuel", LEFT_MODE);
Alex_mln 0:4910cdb3d377 228 lcd.DisplayStringAt(15, LINE(13), (uint8_t *)"Automatique", LEFT_MODE);}
Alex_mln 0:4910cdb3d377 229 indice_depart=false;
Alex_mln 0:4910cdb3d377 230 x=0;
Alex_mln 0:4910cdb3d377 231 y=0; }
Alex_mln 0:4910cdb3d377 232
Alex_mln 0:4910cdb3d377 233
Alex_mln 0:4910cdb3d377 234 void detection(){
Alex_mln 0:4910cdb3d377 235 x = tsState.X;
Alex_mln 0:4910cdb3d377 236 y = tsState.Y;
Alex_mln 0:4910cdb3d377 237 uint8_t text[7];
Alex_mln 0:4910cdb3d377 238 sprintf((char*)text, "%d; %d", x, y);
Alex_mln 0:4910cdb3d377 239 lcd.DisplayStringAt(0, LINE(0), (uint8_t *)&text, LEFT_MODE); }
Alex_mln 0:4910cdb3d377 240
Alex_mln 0:4910cdb3d377 241
Alex_mln 0:4910cdb3d377 242
Alex_mln 0:4910cdb3d377 243
Alex_mln 0:4910cdb3d377 244
Alex_mln 0:4910cdb3d377 245 int main()
Alex_mln 0:4910cdb3d377 246 {
Alex_mln 0:4910cdb3d377 247 int *pointeur2=(int*)malloc(3*sizeof(int));
Alex_mln 0:4910cdb3d377 248
Alex_mln 0:4910cdb3d377 249 if(test==false){
Alex_mln 0:4910cdb3d377 250 initialisation();}
Alex_mln 0:4910cdb3d377 251 while(1){
Alex_mln 0:4910cdb3d377 252
Alex_mln 0:4910cdb3d377 253 uint8_t status= ts.Init(lcd.GetXSize(), lcd.GetYSize());
Alex_mln 0:4910cdb3d377 254
Alex_mln 0:4910cdb3d377 255 if(status != TS_OK){ erreur(); }
Alex_mln 0:4910cdb3d377 256
Alex_mln 0:4910cdb3d377 257 ts.GetState(&tsState);
Alex_mln 0:4910cdb3d377 258 if(tsState.TouchDetected){
Alex_mln 0:4910cdb3d377 259 detection(); }
Alex_mln 0:4910cdb3d377 260
Alex_mln 0:4910cdb3d377 261
Alex_mln 0:4910cdb3d377 262 if((x<113 && x>13) && (y>189-35 && y<222-35) && indice_depart==false){
Alex_mln 0:4910cdb3d377 263 manuel();}
Alex_mln 0:4910cdb3d377 264
Alex_mln 0:4910cdb3d377 265 if((x<144 && x>2) && (y>240-35 && y<275-35) && indice_depart==false){
Alex_mln 0:4910cdb3d377 266 automatique();}
Alex_mln 0:4910cdb3d377 267
Alex_mln 0:4910cdb3d377 268 if((x<217 && x>193) && (y>81 && y<265) && indice_depart==false){
Alex_mln 0:4910cdb3d377 269 vitesse();}
Alex_mln 0:4910cdb3d377 270
Alex_mln 0:4910cdb3d377 271 if((x<182 && x>59) && (y>273 && y<318) && indice_depart==false){
Alex_mln 0:4910cdb3d377 272 depart();
Alex_mln 0:4910cdb3d377 273
Alex_mln 0:4910cdb3d377 274 if(var_automatique==true){
Alex_mln 0:4910cdb3d377 275 int test=0;
Alex_mln 0:4910cdb3d377 276 while(test==0){
Alex_mln 0:4910cdb3d377 277 test=go_automatique(vol_y);}}
Alex_mln 0:4910cdb3d377 278 else if(var_manuel==true){
Alex_mln 0:4910cdb3d377 279 int test=0;
Alex_mln 0:4910cdb3d377 280 while(test==0){
Alex_mln 0:4910cdb3d377 281 test=go_manuel(vol_y);}}
Alex_mln 0:4910cdb3d377 282 stop(); }
Alex_mln 0:4910cdb3d377 283
Alex_mln 0:4910cdb3d377 284 /* if((x<225 && x>12) && (y>78-20 && y<288-20) && indice_depart==true){
Alex_mln 0:4910cdb3d377 285 stop();}
Alex_mln 0:4910cdb3d377 286 */
Alex_mln 0:4910cdb3d377 287
Alex_mln 0:4910cdb3d377 288
Alex_mln 0:4910cdb3d377 289
Alex_mln 0:4910cdb3d377 290 if((x<125 && x>10 ) && (y>61 && y<88) && indice_depart==false){
Alex_mln 0:4910cdb3d377 291 pointeur2=calibrage();
Alex_mln 0:4910cdb3d377 292 stop();
Alex_mln 0:4910cdb3d377 293 decodage(pointeur2);}
Alex_mln 0:4910cdb3d377 294
Alex_mln 0:4910cdb3d377 295
Alex_mln 0:4910cdb3d377 296 wait(0.05);
Alex_mln 0:4910cdb3d377 297
Alex_mln 0:4910cdb3d377 298
Alex_mln 0:4910cdb3d377 299
Alex_mln 0:4910cdb3d377 300 }
Alex_mln 0:4910cdb3d377 301 }
Alex_mln 0:4910cdb3d377 302