From cd0fa64be897765dd9ffa6fb1f0560da605cac44 Mon Sep 17 00:00:00 2001 From: pgp Date: Sat, 30 Jan 2021 07:54:45 +0100 Subject: [PATCH] ajout d'un main.h et tableau de codes d'erreur dans le README --- README.md | 21 ++++++++++++++++++++- src/main.cpp | 19 +++---------------- src/main.h | 16 ++++++++++++++++ 3 files changed, 39 insertions(+), 17 deletions(-) create mode 100644 src/main.h diff --git a/README.md b/README.md index 74d3c2c..c719437 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,22 @@ # IFV_esp32 -https://projets.cohabit.fr/redmine/projects/capteursdesporesifv/wiki/Wiki \ No newline at end of file +https://projets.cohabit.fr/redmine/projects/capteursdesporesifv/wiki/Wiki + +////////////////// +///CODES ERREUR/// +////////////////// +_____________________________________________________________ +|flashs| message +|------------------------------------------------------------ +| 1 | +|------------------------------------------------------------ +| 2 | Echec d'ouverture du fichier data pour écriture +|------------------------------------------------------------ +| 3 | +|------------------------------------------------------------ +| 4 | +|------------------------------------------------------------ +| 5 | +|------------------------------------------------------------ +| 6 | +|------------------------------------------------------------ \ No newline at end of file diff --git a/src/main.cpp b/src/main.cpp index 5c1201c..594a73d 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -8,6 +8,7 @@ #include "driver/pcnt.h" #include #include +#include "main.h" //#include ///////////////////////////// @@ -73,21 +74,7 @@ const char *ssid = "IFV-Sporix"; // SSID const char *password = "12345678"; // PASSWORD, 8 caractères minimum WiFiServer server(80); // port du serveur -////////////////// -/// PROTOTYPES /// -////////////////// -void vigie_Wifi(void); -void wifi_AP(void); -void start_wifiAP(void); -void rtc_init(void); -void scribe_sd (void); -void sd_init(void); -void compte_tour(void); -void stop_compteur(void); -void start_compteur(void); -void stop_moteur(void); -void gaz_moteur(void); -void start_moteur(void); + //////////////////////////// /// FONCTION CODE ERREUR /// @@ -296,7 +283,7 @@ void testFileIO(fs::FS &fs, const char * path){ void sd_init() { if(!SD.begin()){ Serial.println("Card Mount Failed"); - errorCode(2); + errorCode(3); return; } uint8_t cardType = SD.cardType(); diff --git a/src/main.h b/src/main.h new file mode 100644 index 0000000..777fbda --- /dev/null +++ b/src/main.h @@ -0,0 +1,16 @@ +/* header */ +////////////////// +/// PROTOTYPES /// +////////////////// +void vigie_Wifi(void); +void wifi_AP(void); +void start_wifiAP(void); +void rtc_init(void); +void scribe_sd (void); +void sd_init(void); +void compte_tour(void); +void stop_compteur(void); +void start_compteur(void); +void stop_moteur(void); +void gaz_moteur(void); +void start_moteur(void);