fix parameters and compilation

This commit is contained in:
Thomas Göttgens 2023-04-11 13:32:19 +02:00
parent 29c13b5c30
commit a9eb19fc62
8 changed files with 8 additions and 10 deletions

View File

@ -123,9 +123,7 @@ class ButtonThread : public concurrency::OSThread
static void userButtonPressedLong() static void userButtonPressedLong()
{ {
// LOG_DEBUG("Long press!\n"); // LOG_DEBUG("Long press!\n");
if (screen_found == true) {
screen->adjustBrightness(); screen->adjustBrightness();
}
// If user button is held down for 10 seconds, shutdown the device. // If user button is held down for 10 seconds, shutdown the device.
if ((millis() - longPressTime > 10000) && (longPressTime > 0)) { if ((millis() - longPressTime > 10000) && (longPressTime > 0)) {
#if defined(ARCH_NRF52) || defined(ARCH_ESP32) #if defined(ARCH_NRF52) || defined(ARCH_ESP32)

View File

@ -162,7 +162,7 @@ void esp32Loop()
// radio.radioIf.canSleep(); // radio.radioIf.canSleep();
} }
void cpuDeepSleep(uint64_t msecToWake) void cpuDeepSleep(uint32_t msecToWake)
{ {
/* /*
Some ESP32 IOs have internal pullups or pulldowns, which are enabled by default. Some ESP32 IOs have internal pullups or pulldowns, which are enabled by default.

View File

@ -155,7 +155,7 @@ void nrf52Setup()
nRFCrypto.end(); nRFCrypto.end();
} }
void cpuDeepSleep(uint64_t msecToWake) void cpuDeepSleep(uint32_t msecToWake)
{ {
// FIXME, configure RTC or button press to wake us // FIXME, configure RTC or button press to wake us
// FIXME, power down SPI, I2C, RAMs // FIXME, power down SPI, I2C, RAMs

View File

@ -16,7 +16,7 @@ void setBluetoothEnable(bool on)
// not needed // not needed
} }
void cpuDeepSleep(uint64_t msecs) void cpuDeepSleep(uint32_t msecs)
{ {
notImplemented("cpuDeepSleep"); notImplemented("cpuDeepSleep");
} }

View File

@ -7,7 +7,7 @@ void setBluetoothEnable(bool on)
// not needed // not needed
} }
void cpuDeepSleep(uint64_t msecs) void cpuDeepSleep(uint32_t msecs)
{ {
// not needed // not needed
} }

View File

@ -15,7 +15,7 @@ void getMacAddr(uint8_t *dmac)
dmac[i] = i; dmac[i] = i;
} }
void cpuDeepSleep(uint64_t msecToWake) {} void cpuDeepSleep(uint32_t msecToWake) {}
/* pacify libc_nano */ /* pacify libc_nano */
extern "C" { extern "C" {

View File

@ -201,7 +201,7 @@ void doGPSpowersave(bool on)
#endif #endif
} }
void doDeepSleep(uint64_t msecToWake) void doDeepSleep(uint32_t msecToWake)
{ {
if (INCLUDE_vTaskSuspend && (msecToWake == portMAX_DELAY)) { if (INCLUDE_vTaskSuspend && (msecToWake == portMAX_DELAY)) {
LOG_INFO("Entering deep sleep forever\n"); LOG_INFO("Entering deep sleep forever\n");

View File

@ -4,7 +4,7 @@
#include "Observer.h" #include "Observer.h"
#include "configuration.h" #include "configuration.h"
void doDeepSleep(uint64_t msecToWake), cpuDeepSleep(uint64_t msecToWake); void doDeepSleep(uint32_t msecToWake), cpuDeepSleep(uint32_t msecToWake);
#ifdef ARCH_ESP32 #ifdef ARCH_ESP32
#include "esp_sleep.h" #include "esp_sleep.h"