Mutate relevant compilation variables into config (#1256)
* Move minRssi in config_BT.h Move var definitions next to compilation var definitions * Introduce UseExtDecoder when is def MQTTDecodeTopic Replace #ifdef MQTTDecodeTopic by #if UseExtDecoder * Rename AttemptBLECOnnect to AttemptBLEConnect * Create a struct (BTConfig_s) for BT configuration data Create a default config for BTConfig_s (BTConfig_default) based on defines Create a global variable (BTConfig) to hold live BT configuration data and initialize it Move bleConnect to BTConfig * Move BLEscanBeforeConnect in BTConfig * Move BLEinterval in BTConfig * Move PublishOnlySensors in BTConfig * Move hassPresence in BTConfig * Move minRssi into BTConfig * Introduce presenceTopic into BTConfig * Move MQTTDecodeTopic as extDecoderTopic into BTConfig * Mutate UseExtDecoder as runtime var BTConfig.extDecoderTopic * Remove ServicedataMinLength (unused) Always declare AttemptBLEConnect & BLE_FILTER_CONNECTABLE * Mutate BLE_FILTER_CONNECTABLE as runtime parameter BTConfig.filterConnectable * Mutate pubKnownBLEServiceData as runtime var in BTConfig Mutate pubUnknownBLEServiceData as runtime var in BTConfig Mutate pubBLEManufacturerData as runtime var in BTConfig Mutate pubUnknownBLEManufacturerData as runtime var in BTConfig Mutate pubBLEServiceUUID as runtime var in BTConfig * Mutate useBeaconUuidForTopic as runtime var in BTConfig Mutate useBeaconUuidForPresence as runtime var in BTConfig * Small optimization * Formatting of config_BT Co-authored-by: Florian <1technophile@users.noreply.github.com>
This commit is contained in:
1 parent
8f9db357e9
commit
9120d06932
4 files changed
+137
-112
No files matched your search
+2
-2
@@ -482,7 +482,7 @@ build_flags =
|
||||
'-DGateway_Name="OpenMQTTGateway_ESP32_BLE_C"'
|
||||
'-DTimeBtwRead=0'
|
||||
'-DScan_duration=1000'
|
||||
'-DAttemptBLECOnnect=false'
|
||||
'-DAttemptBLEConnect=false'
|
||||
|
||||
[env:esp32feather-ble]
|
||||
platform = ${com.esp32_platform}
|
||||
@@ -519,7 +519,7 @@ build_flags =
|
||||
; '-DDEFAULT_LOW_POWER_MODE=2'
|
||||
; '-DTimeBtwRead=155000'
|
||||
; '-DScan_duration=2000'
|
||||
; '-DAttemptBLECOnnect=false'
|
||||
; '-DAttemptBLEConnect=false'
|
||||
; '-DActiveBLEScan=false'
|
||||
; '-DESPWifiManualSetup=true'
|
||||
; '-DMQTT_USER="lolin-esp32"'
|
||||
|
||||
Reference in new issue
Block a user