mbed-os github

Dependencies:   ADS1015 Faulhaber HTU21D_mod MS5837_potless Sensor_Head_RevB_3 USBDevice_dfu Utilsdfu beep

Fork of ARNSRS_testDFU by POTLESS

Revision:
23:7477dc855fad
Parent:
22:555c2930e8e0
Child:
24:44ef919899c1
--- a/main.cpp	Thu Feb 08 12:15:29 2018 +0000
+++ b/main.cpp	Thu Feb 08 12:56:44 2018 +0000
@@ -176,12 +176,17 @@
 
 //Interruption user button
 InterruptIn button(USER_BUTTON);
-volatile bool  GO = false;
+volatile int  GO = 0;
 
 void pressed() {
  
-  if (GO == false) GO = true;
-    
+  GO = GO + 1;
+  
+  if (GO > 1) {
+  GO = 1;
+  UTILS::Mount_SD();
+  Servo_Poumon.Wake_Up(); 
+  } 
 }
 
 //Passage en mode SECU
@@ -208,7 +213,7 @@
     //UTILS::Store_A_Val((float)Pos, "Servo_Fuite");
     //printf("  position volet fuite sauvegardée = %d pulse(s)\r\n", Pos);
     UTILS::UnMount_SD();
-    //Servo_Poumon.Sleep();
+    Servo_Poumon.Sleep();
     //thread_Volets.terminate();
 }
 
@@ -467,7 +472,7 @@
    
    count = 1;
    
-    if (GO == true) {
+    if (GO > 0) {
     
     wait(1);