Skip to content

Commit 26db1c3

Browse files
committed
Fix debug output for sleep mode on ESP32
1 parent 2ba8ee2 commit 26db1c3

2 files changed

Lines changed: 19 additions & 4 deletions

File tree

VanLiveConnect/Sleep.ino

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,13 @@ void GoToSleep()
5959
{
6060
Serial.printf_P
6161
(
62-
PSTR("%s===> Entering light sleep mode; will wake up when detecting VAN bus activity on pin %s (GPIO%u)\n"),
62+
PSTR("%s===> Entering %s sleep mode; will wake up when detecting VAN bus activity on pin %s (GPIO%u)\n"),
6363
TimeStamp(),
64+
#ifdef ARDUINO_ARCH_ESP32
65+
PSTR("deep"),
66+
#else
67+
PSTR("light"),
68+
#endif
6469
XSTR(LIGHT_SLEEP_WAKE_PIN),
6570
LIGHT_SLEEP_WAKE_PIN
6671
);
@@ -113,9 +118,14 @@ void GoToSleep()
113118

114119
Serial.printf_P
115120
(
116-
PSTR("\n===> VAN bus activity on pin %s (GPIO%u) detected: waking up from light sleep mode\n"),
121+
PSTR("\n===> VAN bus activity on pin %s (GPIO%u) detected: waking up from %s sleep mode\n"),
117122
XSTR(LIGHT_SLEEP_WAKE_PIN),
118-
LIGHT_SLEEP_WAKE_PIN
123+
LIGHT_SLEEP_WAKE_PIN,
124+
#ifdef ARDUINO_ARCH_ESP32
125+
PSTR("deep")
126+
#else
127+
PSTR("light")
128+
#endif
119129
);
120130
Serial.flush();
121131

VanLiveConnect/VanLiveConnect.ino

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,9 +425,14 @@ void setup()
425425
(
426426
PSTR
427427
(
428-
"ESP will enter light sleep mode after %lu:%02lu minutes of inactivity; "
428+
"ESP will enter %s sleep mode after %lu:%02lu minutes of inactivity; "
429429
"listening on pin %s (GPIO%u) for VAN bus activity to wake up from sleep.\n"
430430
),
431+
#ifdef ARDUINO_ARCH_ESP32
432+
PSTR("deep"),
433+
#else
434+
PSTR("light"),
435+
#endif
431436
sleepAfter / 1000 / 60, sleepAfter / 1000 % 60,
432437
XSTR(LIGHT_SLEEP_WAKE_PIN),
433438
LIGHT_SLEEP_WAKE_PIN

0 commit comments

Comments
 (0)