branch one, sensors

This commit is contained in:
inxi-svn 2014-04-28 19:38:51 +00:00
parent d91a563750
commit 2b6b9ae04e

35
inxi
View file

@ -3,7 +3,7 @@
#### Script Name: inxi
#### Version: 2.1.23
#### Date: 2014-04-28
#### Patch Number: 04-b1
#### Patch Number: 05-b1
########################################################################
#### SPECIAL THANKS
########################################################################
@ -8266,7 +8266,7 @@ get_sensors_data()
# 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 && tempWorking > temp1 ) ) {
if ( temp1 == "" || tempWorking > 0 ) {
temp1=tempWorking
}
tempWorkingUnit=gensub( /[ \t]+\+([0-9\.]+)[ \t°]+([CF])(.*)/, "\\2", 1, $2 )
@ -8276,7 +8276,7 @@ get_sensors_data()
}
$1 ~ /^temp2$/ && $2 ~ /^[ \t]*\+([0-9]+)/ {
tempWorking=gensub( /[ \t]+\+([0-9\.]+)(.*)/, "\\1", 1, $2 )
if ( temp2 == "" || ( tempWorking > 0 && tempWorking > temp2 ) ) {
if ( temp2 == "" || tempWorking > 0 ) {
temp2=tempWorking
}
tempWorkingUnit=gensub( /[ \t]+\+([0-9\.]+)[ \t°]+([CF])(.*)/, "\\2", 1, $2 )
@ -8406,11 +8406,22 @@ get_sensors_data()
}
else {
if ( tempFanType != "" ){
# there are some weird scenarios
if ( tempFanType == 1 ){
cpuTempReal=temp1
if ( temp1 != "" && temp2 != "" && temp2 > temp1 ) {
cpuTempReal=temp2
}
else {
cpuTempReal=temp2
}
}
else {
cpuTempReal=temp2
if ( temp1 != "" && temp2 != "" && temp1 > temp2 ) {
cpuTempReal=temp1
}
else {
cpuTempReal=temp2
}
}
}
else {
@ -8439,10 +8450,20 @@ get_sensors_data()
}
else if ( tempFanType != "" ){
if ( tempFanType == 1 ) {
moboTempReal=temp2
if ( temp1 != "" && temp2 != "" && temp2 > temp1 ) {
moboTempReal=temp1
}
else {
moboTempReal=temp2
}
}
else {
moboTempReal=temp1
if ( temp1 != "" && temp2 != "" && temp1 > temp2 ) {
moboTempReal=temp2
}
else {
moboTempReal=temp1
}
}
}
else {