diff --git a/main/ZgatewayBT.ino b/main/ZgatewayBT.ino index 21d4c5cb64..11c540faa5 100644 --- a/main/ZgatewayBT.ino +++ b/main/ZgatewayBT.ino @@ -70,13 +70,13 @@ vector BLEactions; vector devices; int newDevices = 0; -static BLEdevice NO_DEVICE_FOUND = {{0}, - 0, - false, - false, - false, - false, - TheengsDecoder::BLE_ID_NUM::UNKNOWN_MODEL}; +static BLEdevice NO_BT_DEVICE_FOUND = {{0}, + 0, + false, + false, + false, + false, + TheengsDecoder::BLE_ID_NUM::UNKNOWN_MODEL}; static bool oneWhite = false; void BTConfig_init() { @@ -361,7 +361,7 @@ BLEdevice* getDeviceByMac(const char* mac) { return *it; } } - return &NO_DEVICE_FOUND; + return &NO_BT_DEVICE_FOUND; } bool updateWorB(JsonObject& BTdata, bool isWhite) { @@ -388,7 +388,7 @@ void createOrUpdateDevice(const char* mac, uint8_t flags, int model, int mac_typ } BLEdevice* device = getDeviceByMac(mac); - if (device == &NO_DEVICE_FOUND) { + if (device == &NO_BT_DEVICE_FOUND) { Log.trace(F("add %s" CR), mac); //new device device = new BLEdevice(); diff --git a/main/ZgatewayRTL_433.ino b/main/ZgatewayRTL_433.ino index 84fad06a48..197eef7ffd 100644 --- a/main/ZgatewayRTL_433.ino +++ b/main/ZgatewayRTL_433.ino @@ -47,9 +47,9 @@ SemaphoreHandle_t semaphorecreateOrUpdateDeviceRTL_433; std::vector RTL_433devices; int newRTL_433Devices = 0; -static RTL_433device NO_DEVICE_FOUND = {{0}, - 0, - false}; +static RTL_433device NO_RTL_433_DEVICE_FOUND = {{0}, + 0, + false}; RTL_433device* getDeviceById(const char* id); // Declared here to avoid pre-compilation issue (misplaced auto declaration by pio) RTL_433device* getDeviceById(const char* id) { @@ -60,7 +60,7 @@ RTL_433device* getDeviceById(const char* id) { return *it; } } - return &NO_DEVICE_FOUND; + return &NO_RTL_433_DEVICE_FOUND; } void dumpRTL_433Devices() { @@ -79,7 +79,7 @@ void createOrUpdateDeviceRTL_433(const char* id, const char* model, uint8_t flag } RTL_433device* device = getDeviceById(id); - if (device == &NO_DEVICE_FOUND) { + if (device == &NO_RTL_433_DEVICE_FOUND) { Log.trace(F("add %s" CR), id); //new device device = new RTL_433device(); @@ -360,4 +360,4 @@ extern int getOOKThresh() { } # endif -#endif \ No newline at end of file +#endif