From 23fdc0cce177319d429e9de17a3142e807646087 Mon Sep 17 00:00:00 2001 From: pgp Date: Mon, 18 Jan 2021 13:47:36 +0100 Subject: [PATCH] =?UTF-8?q?r=C3=A9duction=20de=20la=20fonction=20code=20er?= =?UTF-8?q?reur?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main.cpp | 56 ++++++++++------------------------------------------ 1 file changed, 10 insertions(+), 46 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index f5a85ec..67c46a9 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -266,57 +266,21 @@ void scribe_sd (){ appendFile(SD, fileName, horodatage); } -///////////////////////////// -/// FONCTIONS CODE ERREUR /// -///////////////////////////// +//////////////////////////// +/// FONCTION CODE ERREUR /// +//////////////////////////// void errorCode(char codeNumber) { - char i=0; - if(codeNumber == 1){ - delay(2000); - - digitalWrite(LED, HIGH); - delay(300); - digitalWrite(LED, LOW); - - } - if(codeNumber == 2){ + while(1) { + char i=0; delay(4700); - for(i=0; i=2; ++i){ - digitalWrite(LED, HIGH); - delay(300); - digitalWrite(LED, LOW); - delay(300); - } + for(i=0; i=codeNumber; ++i){ + digitalWrite(LED, HIGH); + delay(300); + digitalWrite(LED, LOW); + delay(300); } - if(codeNumber == 3){ - delay(4700); - for(i=0; i=3; ++i){ - digitalWrite(LED, HIGH); - delay(300); - digitalWrite(LED, LOW); - delay(300); - } } - if(codeNumber == 4){ - delay(4700); - for(i=0; i>=4; ++i){ - digitalWrite(LED, HIGH); - delay(300); - digitalWrite(LED, LOW); - delay(300); - } - } - if(codeNumber == 5){ - delay(4700); - for(i=0; i>=5; ++i){ - digitalWrite(LED, HIGH); - delay(300); - digitalWrite(LED, LOW); - delay(300); - } - } - } /////////////////////