diff --git a/inxi b/inxi index a303433..957f932 100755 --- a/inxi +++ b/inxi @@ -3,7 +3,7 @@ #### Script Name: inxi #### Version: 2.1.23 #### Date: 2014-04-28 -#### Patch Number: 03-b1 +#### Patch Number: 04-b1 ######################################################################## #### SPECIAL THANKS ######################################################################## @@ -8263,9 +8263,10 @@ get_sensors_data() tempUnit=tempWorkingUnit } } + # for temp1/2 only use temp1/2 if they are null or greater than the last ones $1 ~ /^temp1$/ && $2 ~ /^[ \t]*\+([0-9]+)/ { tempWorking=gensub( /[ \t]+\+([0-9\.]+)(.*)/, "\\1", 1, $2 ) - if ( temp1 == "" || tempWorking > 0 ) { + if ( temp1 == "" || ( tempWorking > 0 && tempWorking > temp1 ) ) { temp1=tempWorking } tempWorkingUnit=gensub( /[ \t]+\+([0-9\.]+)[ \t°]+([CF])(.*)/, "\\2", 1, $2 ) @@ -8275,7 +8276,7 @@ get_sensors_data() } $1 ~ /^temp2$/ && $2 ~ /^[ \t]*\+([0-9]+)/ { tempWorking=gensub( /[ \t]+\+([0-9\.]+)(.*)/, "\\1", 1, $2 ) - if ( temp2 == "" || tempWorking > 0 ) { + if ( temp2 == "" || ( tempWorking > 0 && tempWorking > temp2 ) ) { temp2=tempWorking } tempWorkingUnit=gensub( /[ \t]+\+([0-9\.]+)[ \t°]+([CF])(.*)/, "\\2", 1, $2 )