[SYS][BREAKING] Add gateway states, Offline mode and refactor sleep (#2020)

Gaterway states to improve LED management
Make the sleep function accessible outside BT
BREAKING remove sleep for ESP8266
BREAKING lowpowermode API changed to powermode and new mode definition

Co-authored-by: Florian <1technophile@users.noreply.github.com>
This commit is contained in:
FlorianandFlorian authored and GitHub committed 2024-08-23 16:55:04 -05:00
1 parent 068c2e457a
commit f9a5c6961a
16 files changed
+367 -443

No files matched your search

+7 -7
View File
@@ -387,7 +387,7 @@ build_flags =
'-DZgatewayBT="BT"'
'-DLED_SEND_RECEIVE=2'
'-DLED_SEND_RECEIVE_ON=0'
'-DARDUINO_LOOP_STACK_SIZE=15000'
'-DARDUINO_LOOP_STACK_SIZE=17500'
'-DMQTT_SECURE_DEFAULT=true'
'-DMQTT_CERT_VALIDATE_DEFAULT=true'
'-DMQTT_SECURE_SIGNED_CLIENT=true'
@@ -432,7 +432,7 @@ build_flags =
'-DLED_SEND_RECEIVE_ON=0'
'-DGateway_Name="OMG_LOLIN32LITE_BLE"'
;; Low power parameters, uncomment and fill credentials
'-DDEFAULT_LOW_POWER_MODE=2'
'-DDEFAULT_LOW_POWER_MODE=INTERVAL'
; '-DTimeBtwRead=155000'
; '-DScan_duration=2000'
; '-DAttemptBLEConnect=false'
@@ -557,7 +557,7 @@ build_flags =
'-DLED_SEND_RECEIVE_ON=1'
'-DTRIGGER_GPIO=35'
'-DIR_EMITTER_GPIO=17'
'-DDEFAULT_LOW_POWER_MODE=0'
'-DDEFAULT_LOW_POWER_MODE=ALWAYS_ON'
'-DGateway_Name="OMG_ESP32_M5STICK_BLE_IR"'
board_upload.speed = 921600
custom_description = Expandable module with BLE gateway, display, and little IR emitter
@@ -582,7 +582,7 @@ build_flags =
'-DTRIGGER_GPIO=37'
'-DSLEEP_BUTTON=38'
'-DINPUT_GPIO=39'
'-DDEFAULT_LOW_POWER_MODE=0'
'-DDEFAULT_LOW_POWER_MODE=ALWAYS_ON'
'-DGateway_Name="OMG_ESP32_M5STACK_BLE"'
board_upload.speed = 921600
custom_description = Expandable module with BLE gateway and display
@@ -632,7 +632,7 @@ build_flags =
'-DTRIGGER_GPIO=39'
'-DIR_EMITTER_INVERTED=true'
'-DIR_EMITTER_GPIO=9'
'-DDEFAULT_LOW_POWER_MODE=0'
'-DDEFAULT_LOW_POWER_MODE=ALWAYS_ON'
'-DGateway_Name="OMG_ESP32_M5STICK_C_BLE_IR"'
board_upload.speed = 1500000
custom_description = Expandable module with BLE gateway, display, and little IR emitter
@@ -663,7 +663,7 @@ build_flags =
'-DTRIGGER_GPIO=39'
'-DIR_EMITTER_INVERTED=true'
'-DIR_EMITTER_GPIO=9'
'-DDEFAULT_LOW_POWER_MODE=0'
'-DDEFAULT_LOW_POWER_MODE=ALWAYS_ON'
'-DGateway_Name="OMG_ESP32_M5STICK_CP_BLE_IR"'
board_upload.speed = 1500000
custom_description = Expandable module with BLE gateway, display, and little IR emitter
@@ -1797,5 +1797,5 @@ build_flags =
'-DLED_SEND_RECEIVE_ON=0'
'-DGateway_Name="OMG_ESP32_BLE"'
'-DUSE_BLUFI=1'
'-DARDUINO_LOOP_STACK_SIZE=16000'
'-DARDUINO_LOOP_STACK_SIZE=17500'
custom_description = Regular BLE gateway based on esp-idf with adaptive scanning activated, automatically adapts the scan parameters depending on your devices