Async temperature usermod (#1178)

* Change Temperature usermod to use async reading to avoid blocking

* Fix comparison on wait time

* Add

* Simplify logic in the loop method

* Optimize calls to minimize latency, inform user how long till first measurement

* disable usermod if sensor not found

* Added debug statements on init, update readme

* fix spelling error of celsius
This commit is contained in:
Phil Bolduc
2020-09-13 10:26:27 -07:00
committed by GitHub
parent 63d92381ee
commit 57421d2392
5 changed files with 166 additions and 30 deletions

View File

@@ -10,7 +10,9 @@
* \/ \/ \/
*/
//#include "usermod_v2_example.h"
//#include "usermod_temperature.h"
#ifdef USERMOD_DALLASTEMPERATURE
#include "../usermods/Temperature/usermod_temperature.h"
#endif
//#include "usermod_v2_empty.h"
void registerUsermods()
@@ -21,6 +23,8 @@ void registerUsermods()
* \/ \/ \/
*/
//usermods.add(new MyExampleUsermod());
//usermods.add(new UsermodTemperature());
#ifdef USERMOD_DALLASTEMPERATURE
usermods.add(new UsermodTemperature());
#endif
//usermods.add(new UsermodRenameMe());
}