forked from airgradienthq/arduino
Restart device after PMS sensor read failed 10 times
This commit is contained in:
@@ -175,3 +175,33 @@ void PMS5003::handle(void) { pms.handle(); }
|
||||
* @return false Communication timeout or sensor has removed
|
||||
*/
|
||||
bool PMS5003::isFailed(void) { return pms.isFailed(); }
|
||||
|
||||
/**
|
||||
* @brief Increate number of fail
|
||||
*
|
||||
*/
|
||||
void PMS5003::updateFailCount(void) {
|
||||
pms.updateFailCount();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Reset fail count
|
||||
*
|
||||
*/
|
||||
void PMS5003::resetFailCount(void) {
|
||||
pms.resetFailCount();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get number of fail count
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
int PMS5003::getFailCount(void) { return pms.getFailCount(); }
|
||||
|
||||
/**
|
||||
* @brief Get number of fail count max
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
int PMS5003::getFailCountMax(void) { return pms.getFailCountMax(); }
|
||||
|
||||
Reference in New Issue
Block a user