Skip to content

Commit

Permalink
Update 12d11506
Browse files Browse the repository at this point in the history
  • Loading branch information
4IceG authored Jul 13, 2021
1 parent 39b181d commit bb38156
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,9 @@ then
fi

# Temperature
T=$(echo "$O" | awk -F[,:] '/^\^CHIPTEMP/ {t=0;for(i=2;i<=NF;i++)if($i!=65535){if($i>100){$i=$i/10};if($i>t){t=$i}};printf "%.1f", t}')
T=$(echo "$O" | awk -F[,:] '/^\^CHIPTEMP/ {gsub(/[ \r]/,"");t=0;for(i=2;i<=NF;i++)if($i!=65535){if($i>100){$i=$i/10};if($i>t){t=$i}};printf "%.1f", t}')
if [ "x$T" != "x0.0" ]; then
# [ -n "$ADDON" ] && ADDON="$ADDON,"
# ADDON="$ADDON"'{"Temperatura":"'$T' &deg;C"}'
TA=$(echo $T | cut -c 1-2)
TB=$(echo $T | cut -c 5-6)
TEMP="$TA &deg;C"
[ -n "$ADDON" ] && ADDON="$ADDON,"
TEMP="$T &deg;C"
#ADDON="$ADDON"'{"Temperatura":"'$T' &deg;C"}'
fi

0 comments on commit bb38156

Please sign in to comment.