Compensate periodic USB disconnects of TEMPer

This commit is contained in:
cn committed 2014-12-30 18:01:19 +01:00
1 parent 71fd2c6c64
commit abc7c11732
2 files changed
+11 -2

No files matched your search

+6 -2
View File
@@ -18,6 +18,10 @@ if [ "${1}" = "config" ]; then
echo "temp.label temperatue"
echo "temp.type GAUGE"
else
echo -n "temp.value "
${PCSENSOR} -cm | head -n1
TEMP=`${PCSENSOR} -cm`
if [[ $? != 0 ]]; then
sleep 1
TEMP=`${PCSENSOR} -cm`
fi
echo "temp.value $TEMP"
fi