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:
- 30:7a16a66d76f3
- Parent:
- 29:5b822d18bce6
- Child:
- 31:231a96d1d1c8
diff -r 5b822d18bce6 -r 7a16a66d76f3 main.cpp --- a/main.cpp Tue Feb 20 16:52:22 2018 +0000 +++ b/main.cpp Wed Feb 21 06:58:28 2018 +0000 @@ -173,7 +173,8 @@ serialMonit.printf("\r\n"); serialMonit.printf(" Temps d execution de la boucle = %f seconde(s)\n", (RATE + RATE_TRUE / 1000)); serialMonit.printf("\r\n"); - serialMonit.printf(" A enregistrer = %s\n", to_store); + if (FLAG_REC) serialMonit.printf(" Chaine enregistrée = %s\n", to_store); + else serialMonit.printf(" Pas d'enregistrement en cours."); serialMonit.printf("\r\n"); serialMonit.printf(" V_USB = %f", Vusb); serialMonit.printf("\r\n\r\n"); @@ -361,8 +362,23 @@ DEBUG_M("\r\n Commande = %s Valeur = %f \r\n\r\n", com, val); - if (0 == strcmp(com, "secu-")) { + if (0 == strcmp(com, "secu")) { Mode_SECU(); + }else if (0 == strcmp(com, "calib_O2")) { + sensors.Calibrate_O2(true, (int)val); + }else if (0 == strcmp(com, "check")) { + FLAG_REC = false; + serialMonit.printf(" Calibration_O2.txt = %f\r\n", UTILS::Read_A_Val("Calibration_O2")); + serialMonit.printf(" Servo_Poumon.txt = %d\r\n", (int)UTILS::Read_A_Val("Servo_Poumon")); + //serialMonit.printf("Servo_Fuite.txt = %d\r\n", (int)UTILS::Read_A_Val("Servo_Fuite"); + FLAG_REC = true; + }else if (0 == strcmp(com, "rec")) { + if (FLAG_REC){ + FLAG_REC = false; + serialMonit.printf("Arrêt du Data Logging."); + }else { + FLAG_REC = true; + serialMonit.printf("Démarrage Data Logging dans %s", Log_File_Name);} }else if (0 == strcmp(com, "help")) { FLAG_AFF = false; UTILS::Help();