From bb96ef72914494b0503ef631ca33e9d6a87b14bd Mon Sep 17 00:00:00 2001 From: AntoineGuillerand Date: Mon, 18 Oct 2021 08:21:30 -0400 Subject: [PATCH] Added nbpts wifi send when slp is pressed before infinite sleep --- MainESP32v4_DIO/MainESP32v4_DIO.ino | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/MainESP32v4_DIO/MainESP32v4_DIO.ino b/MainESP32v4_DIO/MainESP32v4_DIO.ino index c5ee158..9885806 100644 --- a/MainESP32v4_DIO/MainESP32v4_DIO.ino +++ b/MainESP32v4_DIO/MainESP32v4_DIO.ino @@ -128,7 +128,8 @@ void loop() { esp_sleep_enable_timer_wakeup((TIME_TO_SLEEP * 1e3 - t_total) * uS_TO_S_FACTOR / 1e3); } else { - Serial.println("Slp_switch pressed, infinite sleep"); + Serial.println("Slp_switch pressed, send nbpts and infinite sleep"); + ConnectWIFI((uint8_t*) &rtcData.nbpts, 1*sizeof(uint16_t)); Serial.println(); } //Start the deep sleep