Merge branch 'master' into 2264-feature-check-for-low-heap-before-adding-to-nodedb-was-reboot-loop-heap-too-low

This commit is contained in:
Thomas Göttgens
2023-04-13 23:09:33 +02:00
committed by GitHub
2 changed files with 3 additions and 4 deletions

View File

@@ -123,9 +123,8 @@ class ButtonThread : public concurrency::OSThread
static void userButtonPressedLong()
{
// LOG_DEBUG("Long press!\n");
screen->adjustBrightness();
// If user button is held down for 10 seconds, shutdown the device.
if ((millis() - longPressTime > 10000) && (longPressTime > 0)) {
// If user button is held down for 5 seconds, shutdown the device.
if ((millis() - longPressTime > 5000) && (longPressTime > 0)) {
#if defined(ARCH_NRF52) || defined(ARCH_ESP32)
// Do actual shutdown when button released, otherwise the button release
// may wake the board immediatedly.