Fix PMS5003 input range

This commit is contained in:
Theo Arends 2020-04-12 14:54:06 +02:00
parent b2f03d3197
commit 42d82fdc97
3 changed files with 3 additions and 3 deletions

View File

@ -74,6 +74,7 @@ The following binary downloads have been compiled with ESP8266/Arduino library c
- Add command ``SetOption91 1`` to enable fading at startup / power on - Add command ``SetOption91 1`` to enable fading at startup / power on
- Add command ``Sensor10 0/1/2`` to control BH1750 resolution - 0 = High (default), 1 = High2, 2 = Low (#8016) - Add command ``Sensor10 0/1/2`` to control BH1750 resolution - 0 = High (default), 1 = High2, 2 = Low (#8016)
- Add command ``Sensor10 31..254`` to control BH1750 measurement time which defaults to 69 (#8016) - Add command ``Sensor10 31..254`` to control BH1750 measurement time which defaults to 69 (#8016)
- Add command ``Sensor18 0..32000`` to control PMS5003 sensor interval to extend lifetime by Gene Ruebsamen (#8128)
- Add command ``DevGroupName`` to specify up to four Device Group Names (#8087) - Add command ``DevGroupName`` to specify up to four Device Group Names (#8087)
- Add command ``DevGroupSend`` to send an update to a Device Group (#8093) - Add command ``DevGroupSend`` to send an update to a Device Group (#8093)
- Add command ``Ping`` (#7176) - Add command ``Ping`` (#7176)
@ -87,4 +88,3 @@ The following binary downloads have been compiled with ESP8266/Arduino library c
- Add console command history (#7483, #8015) - Add console command history (#7483, #8015)
- Add quick wifi reconnect using saved AP parameters when ``SetOption56 0`` (#3189) - Add quick wifi reconnect using saved AP parameters when ``SetOption56 0`` (#3189)
- Add more accuracy to GPS NTP server (#8088) - Add more accuracy to GPS NTP server (#8088)
- Add interval to PMS5003 sensor to extend lifetime (#8128)

View File

@ -16,6 +16,7 @@
- Add command ``SetOption90 1`` to disable non-json MQTT messages (#8044) - Add command ``SetOption90 1`` to disable non-json MQTT messages (#8044)
- Add command ``Sensor10 0/1/2`` to control BH1750 resolution - 0 = High (default), 1 = High2, 2 = Low (#8016) - Add command ``Sensor10 0/1/2`` to control BH1750 resolution - 0 = High (default), 1 = High2, 2 = Low (#8016)
- Add command ``Sensor10 31..254`` to control BH1750 measurement time which defaults to 69 (#8016) - Add command ``Sensor10 31..254`` to control BH1750 measurement time which defaults to 69 (#8016)
- Add command ``Sensor18 0..32000`` to control PMS5003 sensor interval to extend lifetime by Gene Ruebsamen (#8128)
- Add command ``SetOption91 1`` to enable fading at startup / power on - Add command ``SetOption91 1`` to enable fading at startup / power on
- Add command ``SetOption41 <x>`` to force sending gratuitous ARP every <x> seconds - Add command ``SetOption41 <x>`` to force sending gratuitous ARP every <x> seconds
- Add command ``DevGroupName`` to specify up to four Device Group Names (#8087) - Add command ``DevGroupName`` to specify up to four Device Group Names (#8087)
@ -26,7 +27,6 @@
- Add support for an iAQ sensor (#8107) - Add support for an iAQ sensor (#8107)
- Add support for Seven Segment display using HT16K33 (#8116) - Add support for Seven Segment display using HT16K33 (#8116)
- Add support for AS3935 Lightning Sensor by device111 (#8130) - Add support for AS3935 Lightning Sensor by device111 (#8130)
- Add interval to PMS5003 sensor to extend lifetime (#8128)
### 8.2.0.2 20200328 ### 8.2.0.2 20200328

View File

@ -171,7 +171,7 @@ bool PmsReadData(void)
bool PmsCommandSensor(void) bool PmsCommandSensor(void)
{ {
if ((pin[GPIO_PMS5003_TX] < 99) && (XdrvMailbox.payload >= 0) && (XdrvMailbox.payload < 65536)) { if ((pin[GPIO_PMS5003_TX] < 99) && (XdrvMailbox.payload >= 0) && (XdrvMailbox.payload < 32001)) {
if (XdrvMailbox.payload < MIN_INTERVAL_PERIOD) { if (XdrvMailbox.payload < MIN_INTERVAL_PERIOD) {
// Set Active Mode if interval is less than 60 seconds // Set Active Mode if interval is less than 60 seconds
Settings.pms_wake_interval = 0; Settings.pms_wake_interval = 0;