diff --git a/src/platform/esp32/main-esp32.cpp b/src/platform/esp32/main-esp32.cpp index 69b69ff68..bcd618c7e 100644 --- a/src/platform/esp32/main-esp32.cpp +++ b/src/platform/esp32/main-esp32.cpp @@ -15,6 +15,7 @@ #endif #include "esp_mac.h" +#include "freertosinc.h" #include "meshUtils.h" #include "sleep.h" #include "soc/rtc.h" @@ -276,6 +277,8 @@ void cpuDeepSleep(uint32_t msecToWake) esp_sleep_pd_config(ESP_PD_DOMAIN_RTC_PERIPH, ESP_PD_OPTION_ON); #endif - esp_sleep_enable_timer_wakeup(msecToWake * 1000ULL); // call expects usecs - esp_deep_sleep_start(); // TBD mA sleep current (battery) + // User shutdown (DELAY_FOREVER / portMAX_DELAY): no RTC timer — align with nRF52 system_off semantics. + if (msecToWake != portMAX_DELAY) + esp_sleep_enable_timer_wakeup(msecToWake * 1000ULL); // call expects usecs + esp_deep_sleep_start(); } diff --git a/variants/esp32s3/rak_wismesh_tap_v2/platformio.ini b/variants/esp32s3/rak_wismesh_tap_v2/platformio.ini index be964cc6d..66093d033 100644 --- a/variants/esp32s3/rak_wismesh_tap_v2/platformio.ini +++ b/variants/esp32s3/rak_wismesh_tap_v2/platformio.ini @@ -19,14 +19,14 @@ custom_meshtastic_support_level = 1 custom_meshtastic_display_name = RAK WisMesh Tap V2 custom_meshtastic_images = rak-wismesh-tap-v2.svg custom_meshtastic_tags = RAK -custom_meshtastic_partition_scheme = 8MB +custom_meshtastic_partition_scheme = 16MB custom_meshtastic_has_mui = true extends = esp32s3_base board = wiscore_rak3312 board_check = true upload_protocol = esptool -board_build.partitions = default_8MB.csv +board_build.partitions = default_16MB.csv build_flags = ${esp32s3_base.build_flags} diff --git a/variants/esp32s3/rak_wismesh_tap_v2/variant.h b/variants/esp32s3/rak_wismesh_tap_v2/variant.h index f8672edac..a169a1e8a 100644 --- a/variants/esp32s3/rak_wismesh_tap_v2/variant.h +++ b/variants/esp32s3/rak_wismesh_tap_v2/variant.h @@ -53,6 +53,7 @@ #define BATTERY_PIN 1 #define ADC_CHANNEL ADC_CHANNEL_0 #define ADC_MULTIPLIER 1.667 +#define OCV_ARRAY 4160, 4020, 3940, 3870, 3810, 3760, 3740, 3720, 3680, 3620, 2990 #define PIN_BUZZER 38