From e7f376196c6e77052ff063659cf4e8883ada3cfc Mon Sep 17 00:00:00 2001 From: Andrey Klimov Date: Sat, 9 Feb 2019 22:38:47 +0300 Subject: [PATCH] Improved logic to threat unknown 1-wire device (some PnP) artnet disabled by default for due since some execution blocking in artnet->read() --- check_custom_build_flags_due-5500.sh | 2 +- lighthub/main.cpp | 21 ++++++++++++--------- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/check_custom_build_flags_due-5500.sh b/check_custom_build_flags_due-5500.sh index c03a0ac..371c9af 100755 --- a/check_custom_build_flags_due-5500.sh +++ b/check_custom_build_flags_due-5500.sh @@ -1,6 +1,6 @@ #! /bin/bash export FLAGS="$FLAGS -DWiz5500" -export FLAGS="$FLAGS -DARTNET_ENABLE" +#export FLAGS="$FLAGS -DARTNET_ENABLE" CUSTOM_BUILD_FLAGS_FILE=custom-build-flags/build_flags_due-5500.sh if [ -f $CUSTOM_BUILD_FLAGS_FILE ]; then source $CUSTOM_BUILD_FLAGS_FILE diff --git a/lighthub/main.cpp b/lighthub/main.cpp index 3e0aee1..aae8539 100644 --- a/lighthub/main.cpp +++ b/lighthub/main.cpp @@ -673,15 +673,16 @@ void Changed(int i, DeviceAddress addr, float currentTemp) { SetBytes(addr, 8, addrstr); addrstr[17] = 0; + printFloatValueToStr(currentTemp,valstr); + debugSerial<valuestring; - - if (owEmitString) { - printFloatValueToStr(currentTemp,valstr); - debugSerial<")<valuestring; if (owItem) thermoSetCurTemp(owItem, currentTemp); ///TODO: Refactore using Items interface + } // if valid temperature + } // if Address in config + else debugSerial<")< HAVE_IP_ADDRESS) { mqttClient.loop(); #ifdef _artnet - if (artnet) artnet->read(); + if (artnet) artnet->read(); ///hung #endif }