From bef81e1b6d1ef7889f83c8bb3ce709401c07171c Mon Sep 17 00:00:00 2001 From: pgp Date: Fri, 16 Apr 2021 14:25:35 +0200 Subject: [PATCH] modifs scribeSD vRotMoyen --- .vscode/settings.json | 7 +++++++ src/main.cpp | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..7d5665e --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,7 @@ +{ + "files.associations": { + "bitset": "cpp", + "fstream": "cpp", + "ostream": "cpp" + } +} \ No newline at end of file diff --git a/src/main.cpp b/src/main.cpp index 9243eaf..cf1896b 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -406,7 +406,7 @@ void scribe_sd (){ pcnt_counter_pause(PCNT_TEST_UNIT); pcnt_counter_clear(PCNT_TEST_UNIT); pcnt_counter_resume(PCNT_TEST_UNIT); - start_chrono_scribe = millis(); + start_chrono_scribe = millis(); } chrono_scribe = millis() - start_chrono_scribe; //Serial.println("sem_scribe="); @@ -414,10 +414,10 @@ void scribe_sd (){ if ( sem_scribe == true && chrono_scribe >= inter_ecriture ){ //Serial.println("balise scribe"); + int vRotMoyen = count*60000/(pptr*chrono_scribe); char timestamp[] = "YY-MM-DD-hh:mm:ss"; char *horodatage = now.toString(timestamp); char buffer[64]; - int vRotMoyen = count*60000/(pptr*chrono_scribe); snprintf(buffer, sizeof buffer, "%d", vRotMoyen); appendFile(SD, fichier, horodatage); appendFile(SD, fichier, " " );