From f9c1eab7de584f666de66e22792a5526f4c87250 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Sat, 9 Mar 2024 23:47:39 -0600 Subject: [PATCH] Update power.inc.sh --- inc/power.inc.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/inc/power.inc.sh b/inc/power.inc.sh index afa292a3..65ab9a53 100644 --- a/inc/power.inc.sh +++ b/inc/power.inc.sh @@ -348,11 +348,13 @@ CHECKPOWER(){ TOTAL_MISC_WATTS=0; TOTAL_MISC_AMPS=0 for mSENSOR in "${!OFFSITE_MISC[@]}"; do IFS=: read -r AMP WATT VOLT <<< ${OFFSITE_MISC[${mSENSOR}]}; unset IFS + echo "HERE: ${AMP}-${WATT}" + TOTAL_MISC_WATTS=$(expr ${TOTAL_MISC_WATTS} + ${WATT}) + TOTAL_MISC_AMPS=$(expr ${TOTAL_MISC_AMPS} + ${AMP}) AD1="${PW_MISCSENSOR_DESC[${mSENSOR}]}"; c=0; spc1=''; spca=`expr 25 - ${#AD1}`; until [ ${c} = ${spca} ]; do spc1="${spc1} "; ((c++)); done AD2=$(IDS_NUMBER_FORMAT ${AMP} 2 yes); c=0; spc2=''; spca=`expr ${wspc} - ${#AD2}`; until [ ${c} = ${spca} ]; do spc2="${spc2} "; ((c++)); done AD3=$(IDS_NUMBER_FORMAT ${WATT} 2 yes) - TOTAL_MISC_WATTS=$(expr ${TOTAL_MISC_WATTS} + ${WATT}) - TOTAL_MISC_AMPS=$(expr ${TOTAL_MISC_AMPS} + ${AMP}) + echo -en "${idsCL[Default]}${AD1}${spc1}: ${idsCL[Green]}${AD2}'A${spc2}${AD3}'W" if [ "${avgdays}" == "" ]; then