From 285c6c5805dd16b57b87d97e9960820ccd5593be Mon Sep 17 00:00:00 2001 From: Alexis Fourmaux Date: Wed, 13 May 2026 17:20:03 +0200 Subject: [PATCH] config: change init parameters of simulation + data generation delay this is made to fit with mass data insertion made with python. Now, the system will generate a single reading every hour, in continuity with generated data already in db --- lib/SimuGaz/SimuGaz.cpp | 2 +- src/main.cpp | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/SimuGaz/SimuGaz.cpp b/lib/SimuGaz/SimuGaz.cpp index e30e990..1ef8c89 100644 --- a/lib/SimuGaz/SimuGaz.cpp +++ b/lib/SimuGaz/SimuGaz.cpp @@ -1,7 +1,7 @@ #include #define INITIAL_CONSUMPTION 3451.02f -#define INITIAL_SECONDS 0 +#define INITIAL_SECONDS 11462400 // date initiale = 13/05/2026 16:00 #define AVERAGE_DAILY_CONSUMPTION 2.66f // Source : opendata.grdf.fr/explore/dataset/correction_climatique_grdf/ diff --git a/src/main.cpp b/src/main.cpp index caf7619..5870002 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -72,7 +72,7 @@ void setup() { void loop() { uint8_t payload[4]; - uint32_t pulses = simulateGasPulses(86400); + uint32_t pulses = simulateGasPulses(3600); displayGasIndex(pulses); @@ -81,6 +81,5 @@ void loop() { Serial.flush(); - delay(2000); - esp_deep_sleep(60000000); + esp_deep_sleep(3600000000); } \ No newline at end of file