testing versxion (bat)
This commit is contained in:
@@ -1,17 +0,0 @@
|
||||
CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_PERF=y
|
||||
CONFIG_BOOTLOADER_LOG_COLORS=y
|
||||
CONFIG_APP_RETRIEVE_LEN_ELF_SHA=16
|
||||
CONFIG_ESPTOOLPY_FLASHFREQ_20M=y
|
||||
CONFIG_ESPTOOLPY_HEADER_FLASHSIZE_UPDATE=y
|
||||
CONFIG_COMPILER_OPTIMIZATION_PERF=y
|
||||
CONFIG_BT_ENABLED=y
|
||||
CONFIG_BT_NIMBLE_ENABLED=y
|
||||
CONFIG_PM_ENABLE=y
|
||||
CONFIG_PM_DFS_INIT_AUTO=y
|
||||
CONFIG_PM_POWER_DOWN_PERIPHERAL_IN_LIGHT_SLEEP=y
|
||||
CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ_80=y
|
||||
CONFIG_LOG_VERSION_2=y
|
||||
CONFIG_LOG_COLORS=y
|
||||
CONFIG_LWIP_TCP_SND_BUF_DEFAULT=5744
|
||||
CONFIG_LWIP_TCP_WND_DEFAULT=5744
|
||||
CONFIG_LWIP_HOOK_IP6_INPUT_NONE=y
|
||||
@@ -44,17 +44,17 @@ menu "PrincessPiTracker Config"
|
||||
help
|
||||
Enable this option to use a random MAC address for BLE advertising instead of the public MAC address.
|
||||
|
||||
config DEEP_SLEEP_BURST_MODE
|
||||
configT_MODE
|
||||
bool "Enable Deep Sleep Burst Mode"
|
||||
default y
|
||||
help
|
||||
Enable this option to wake up, send multiple advertisements in a burst, then go back to deep sleep.
|
||||
|
||||
config DEEP_SLEEP_BURST_COUNT
|
||||
configT_COUNT
|
||||
int "Number of Advertisements per Burst"
|
||||
default 4
|
||||
range 1 100
|
||||
depends on DEEP_SLEEP_BURST_MODE
|
||||
depends onT_MODE
|
||||
help
|
||||
Int number of advertisements to send per burst min 1 max 100
|
||||
|
||||
@@ -62,7 +62,7 @@ menu "PrincessPiTracker Config"
|
||||
int "Deep Sleep Duration in seconds"
|
||||
default 120
|
||||
range 0 86400
|
||||
depends on DEEP_SLEEP_BURST_MODE
|
||||
depends onT_MODE
|
||||
help
|
||||
Int number of seconds (s) to deep sleep between advertisement cycles min 0 max 86400 (24 hours)
|
||||
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
#include "freertos/FreeRTOS.h" // freertosbullshit
|
||||
#include "freertos/task.h"
|
||||
|
||||
// calculate da burst delay and burst delay microseconds
|
||||
#define DEEP_SLEEP_BURST_DELAY ((CONFIG_DEEP_SLEEP_BURST_COUNT * CONFIG_ADVERTISEMENT_INTERVAL) + CONFIG_ADVERTISEMENT_INTERVAL) // +CONFIG_ADVERTISEMENT_INTERVAL so the silly thing will be sure to boadcast dem all and not die before, using CONFIG_ADVERTISEMENT_INTERVAL because presumably it'll keep the extra time in rough check with the interval ig
|
||||
// calculate da burst delay live and burst delay microseconds
|
||||
#define DEEP_SLEEP_BURST_DELAY_LIVE_MS ((CONFIG_DEEP_SLEEP_BURST_COUNT * CONFIG_ADVERTISEMENT_INTERVAL) + ((CONFIG_DEEP_SLEEP_BURST_COUNT + 1) * CONFIG_ADVERTISEMENT_INTERVAL_JITTER_MS)) // +CONFIG_ADVERTISEMENT_INTERVAL so the silly thing will be sure to boadcast dem all and not die before, using CONFIG_ADVERTISEMENT_INTERVAL because presumably it'll keep the extra time in rough check with the interval ig
|
||||
#define DEEP_SLEEP_BURST_DELAY_MICROS (CONFIG_DEEP_SLEEP_DURATION_S * 1000000)
|
||||
#endif
|
||||
|
||||
@@ -208,7 +208,7 @@ static void deep_sleep_register_rtc_timer_wakeup(void) {
|
||||
|
||||
static void deep_sleep_wait_to_sleep() {
|
||||
vTaskDelay(pdMS_TO_TICKS(DEEP_SLEEP_BURST_DELAY));
|
||||
ESP_LOGI(TAG, "Waited %d ms, preparing to enter deep sleep\n", DEEP_SLEEP_BURST_DELAY);
|
||||
ESP_LOGI(TAG, "Waited %d ms, preparing to enter deep sleep\n", DEEP_SLEEP_BURST_DELAY_LIVE_MS);
|
||||
|
||||
ESP_LOGI(TAG, "Deiniting BTLE before deep sleep");
|
||||
ble_deinit();
|
||||
|
||||
Reference in New Issue
Block a user