mbed-os github
Dependencies: ADS1015 Faulhaber HTU21D_mod MS5837_potless Sensor_Head_RevB_3 USBDevice_dfu Utilsdfu beep
Fork of ARNSRS_testDFU by
Diff: main.cpp
- Revision:
- 79:d22473a0e20d
- Parent:
- 78:674882631acc
- Child:
- 80:545af6e94aa5
diff -r 674882631acc -r d22473a0e20d main.cpp --- a/main.cpp Thu Jul 19 14:09:08 2018 +0000 +++ b/main.cpp Fri Jul 20 08:03:18 2018 +0000 @@ -267,11 +267,10 @@ Servo_Fuite.Sleep(); } -void Sleep_IHM() +void Sleep_IHM(int commande) { //Mise en veille de l'IHM - Commande_IHM = 1; - IHM("<0 0 ;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;%d>\r\n", Commande_IHM); + IHM("<0 0 ;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;%d>\r\n", commande); wait(0.5); @@ -353,7 +352,7 @@ buzzer.beep(1000,0.1); - Sleep_IHM(); + Sleep_IHM(2); Mode_SECU(); @@ -366,7 +365,7 @@ { OUTPUT(" Mise en veille de l'appareil.\r\n"); - Sleep_IHM(); + Sleep_IHM(1); Mode_SECU(); @@ -983,7 +982,6 @@ wait(1); - //Init PID //Entrée PPO2 entre 100 et 1000 mb control_Servo.setInputLimits(Min_Input, Max_Input); @@ -995,15 +993,15 @@ control_Servo.setSetPoint(consigne); //Mode auto au démarrage control_Servo.setMode(AUTO_MODE); - + thread_PID.set_priority(osPriorityNormal); thread_PID.start(callback(PID_thread)); - + DEBUG(" PID thread démarré\r\n\r\n"); wait(1); - + DEBUG(" Cliquez sur le bouton help pour voir la liste des \r\n commandes administrateur disponibles.\r\n"); OUTPUT("$\r\n"); @@ -1112,7 +1110,7 @@ Consigne_fuite = 90 - Consigne_poumon; } */ - + //Arrêt du Timer mesurant le temps d'éxecution du code REAL_RATE.stop(); //Définition de la nouvelle valeur du temps d'échantillonage du PID.