mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-23 02:36:35 +00:00
Add PMS5003 delayed discovery
This commit is contained in:
parent
454d4601b4
commit
c17b5a6178
@ -48,6 +48,7 @@ struct PMS5003 {
|
|||||||
uint8_t valid = 0;
|
uint8_t valid = 0;
|
||||||
uint8_t wake_mode = 1;
|
uint8_t wake_mode = 1;
|
||||||
uint8_t ready = 1;
|
uint8_t ready = 1;
|
||||||
|
bool discovery_triggered = false;
|
||||||
} Pms;
|
} Pms;
|
||||||
|
|
||||||
enum PmsCommands
|
enum PmsCommands
|
||||||
@ -156,6 +157,11 @@ bool PmsReadData(void)
|
|||||||
#endif // PMS_MODEL_PMS3003
|
#endif // PMS_MODEL_PMS3003
|
||||||
Pms.valid = 10;
|
Pms.valid = 10;
|
||||||
|
|
||||||
|
if (!Pms.discovery_triggered) {
|
||||||
|
TasmotaGlobal.discovery_counter = 1; // Force discovery
|
||||||
|
Pms.discovery_triggered = true;
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user