[DISC] Whitelist immediate change (#2133)
* When updating a device from UNKNOWN force a new scan * update the sensorModel_id and handle if white-list is updated * Restore unduly deleted documentation
This commit is contained in:
1 parent
7fa00dd593
commit
312b4bcf17
2 files changed
+7
-3
No files matched your search
+7
-1
@@ -388,10 +388,16 @@ void createOrUpdateDevice(const char* mac, uint8_t flags, int model, int mac_typ
|
||||
device->connect = true;
|
||||
}
|
||||
|
||||
if (model != UNKWNON_MODEL) {
|
||||
if (model != UNKWNON_MODEL && device->sensorModel_id == UNKWNON_MODEL) {
|
||||
newDevices++;
|
||||
device->isDisc = false;
|
||||
device->sensorModel_id = model;
|
||||
}
|
||||
|
||||
// If a device has been added to the white-list, flag it so it can be auto-detected
|
||||
if (!device->isWhtL && flags & device_flags_isWhiteL) {
|
||||
newDevices++;
|
||||
}
|
||||
if (flags & device_flags_isWhiteL || flags & device_flags_isBlackL) {
|
||||
device->isWhtL = flags & device_flags_isWhiteL;
|
||||
device->isBlkL = flags & device_flags_isBlackL;
|
||||
|
||||
Reference in new issue
Block a user