From 34c618db728d3d442eab30ccd1a8ab4dd185f696 Mon Sep 17 00:00:00 2001 From: Andrey Klimov Date: Sat, 30 Jun 2018 13:46:22 +0300 Subject: [PATCH] polling of contacts fixed --- lighthub/inputs.cpp | 9 ++++++--- platformio.ini | 2 ++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/lighthub/inputs.cpp b/lighthub/inputs.cpp index b1a5dd8..9a512af 100644 --- a/lighthub/inputs.cpp +++ b/lighthub/inputs.cpp @@ -88,10 +88,13 @@ void Input::Parse() int Input::poll() { if (!isValid()) return -1; - if (inType & IN_PUSH_ON) - contactPoll(); - else if (inType & IN_DHT22) + if (inType & IN_DHT22) dht22Poll(); +/* example + else if (inType & IN_ANALOG) + analogPoll(); */ + else + contactPoll(); return 0; } diff --git a/platformio.ini b/platformio.ini index 14c55c4..679d3d3 100644 --- a/platformio.ini +++ b/platformio.ini @@ -117,6 +117,8 @@ lib_deps = https://github.com/knolleary/pubsubclient.git https://github.com/anklimov/Artnet.git FastLED + Adafruit Unified Sensor + DHT sensor library [env:due-5500] platform = atmelsam