mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 15:59:52 +03:00
clear list on autodetect
This commit is contained in:
@@ -945,7 +945,7 @@ void MyESP::showSystemStats() {
|
||||
myDebug_P(PSTR(" [MEM] Firmware size: %d"), ESP.getSketchSize());
|
||||
myDebug_P(PSTR(" [MEM] Max OTA size: %d"), (ESP.getFreeSketchSpace() - 0x1000) & 0xFFFFF000);
|
||||
myDebug_P(PSTR(" [MEM] OTA Reserved: %d"), 4 * SPI_FLASH_SEC_SIZE);
|
||||
myDebug_P(PSTR(" [MEM] Free Heap: %d"), ESP.getFreeHeap());
|
||||
//myDebug_P(PSTR(" [MEM] Free Heap: %d"), ESP.getFreeHeap());
|
||||
myDebug_P(PSTR(""));
|
||||
}
|
||||
|
||||
|
||||
@@ -964,6 +964,7 @@ void startDeviceScan() {
|
||||
regularUpdatesTimer.detach();
|
||||
publishSensorValuesTimer.detach();
|
||||
scanDevices_count = 1; // starts at 1
|
||||
ems_clearDeviceList(); // empty the current list
|
||||
ems_setLogging(EMS_SYS_LOGGING_NONE);
|
||||
myDebug_P(PSTR("Starting a deep EMS device scan. This can take up to 2 minutes. Please wait..."));
|
||||
scanThermostat.attach_ms(SCANDEVICES_TIME, do_scanDevices);
|
||||
|
||||
@@ -1529,6 +1529,13 @@ void _process_RCTime(_EMS_RxTelegram * EMS_RxTelegram) {
|
||||
EMS_Thermostat.year = _toByte(0);
|
||||
}
|
||||
|
||||
/*
|
||||
* Clear devices list
|
||||
*/
|
||||
void ems_clearDeviceList() {
|
||||
Devices.clear();
|
||||
}
|
||||
|
||||
/*
|
||||
* add an EMS device to our list of detected devices
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user