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

+9 -9
View File
@@ -70,13 +70,13 @@ vector<BLEAction> BLEactions;
vector<BLEdevice*> 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();