Allow for both BT and RTL_433 Gateways at the same time. (#1491)

* Allow for both BT and RTL_433 Gateways at the same time.

* Fix linting error.
This commit is contained in:
Mark Smith authored and GitHub committed 2023-03-01 14:09:51 -06:00
1 parent 454a062b3b
commit ecd23b9680
2 files changed
+15 -15

No files matched your search

+6 -6
View File
@@ -47,9 +47,9 @@ SemaphoreHandle_t semaphorecreateOrUpdateDeviceRTL_433;
std::vector<RTL_433device*> 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
#endif