2 Commits

Author SHA1 Message Date
Yurii
9d77256051 refactor: not initialize Bluetooth if BLE sensors are not used 2025-10-03 20:56:04 +03:00
Yurii
d3e7a13e1f fix: rollback NimBLE-Arduino from 2.3.6 to 2.3.3 2025-10-03 20:54:42 +03:00
2 changed files with 5 additions and 3 deletions

View File

@@ -98,7 +98,7 @@ board_build.partitions = esp32_partitions.csv
lib_deps =
${env.lib_deps}
laxilef/ESP32Scheduler@^1.0.1
nimble_lib = h2zero/NimBLE-Arduino@^2.3.6
nimble_lib = h2zero/NimBLE-Arduino@2.3.3
lib_ignore =
extra_scripts =
post:tools/esp32.py

View File

@@ -405,7 +405,6 @@ protected:
#if USE_BLE
void cleanBleInstances() {
#if USE_BLE
if (!NimBLEDevice::isInitialized()) {
return;
}
@@ -442,10 +441,13 @@ protected:
NimBLEDevice::deleteClient(client);
}
}
#endif
}
void pollingBleSensors() {
if (!Sensors::getAmountByType(Sensors::Type::BLUETOOTH, true)) {
return;
}
if (!NimBLEDevice::isInitialized() && millis() > 5000) {
Log.sinfoln(FPSTR(L_SENSORS_BLE), F("Initialized"));
BLEDevice::init("");