PMS5003 use active mode if TX pin not connected

This commit is contained in:
gururise 2020-04-08 12:36:44 -07:00
parent ad673bec6c
commit 9516f339d6
1 changed files with 6 additions and 0 deletions

View File

@ -183,6 +183,12 @@ bool PmsCommandSensor(void)
wake_mode = 0;
pms_ready = 0;
}
if (pin[GPIO_PMS5003_TX] >= 99)
{
// setting interval not supported if TX pin not connected
Settings.novasds_startingoffset = 0;
}
Response_P(S_JSON_SENSOR_INDEX_NVALUE, XSNS_18, Settings.novasds_startingoffset);