mirror of
https://github.com/meshtastic/firmware.git
synced 2025-02-03 11:19:58 +00:00
Fix compilation without a BUTTON_PIN definition
This commit is contained in:
parent
170f0693c6
commit
48256d6e9e
@ -284,8 +284,10 @@ esp_sleep_wakeup_cause_t doLightSleep(uint64_t sleepMsec) // FIXME, use a more r
|
|||||||
assert(esp_light_sleep_start() == ESP_OK);
|
assert(esp_light_sleep_start() == ESP_OK);
|
||||||
|
|
||||||
esp_sleep_wakeup_cause_t cause = esp_sleep_get_wakeup_cause();
|
esp_sleep_wakeup_cause_t cause = esp_sleep_get_wakeup_cause();
|
||||||
|
#ifdef BUTTON_PIN
|
||||||
if (cause == ESP_SLEEP_WAKEUP_GPIO)
|
if (cause == ESP_SLEEP_WAKEUP_GPIO)
|
||||||
DEBUG_MSG("Exit light sleep gpio: btn=%d\n", !digitalRead(BUTTON_PIN));
|
DEBUG_MSG("Exit light sleep gpio: btn=%d\n", !digitalRead(BUTTON_PIN));
|
||||||
|
#endif
|
||||||
|
|
||||||
return cause;
|
return cause;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user