mirror of
https://github.com/smxi/inxi.git
synced 2025-01-19 00:47:47 +00:00
branch one, sensors
This commit is contained in:
parent
d91a563750
commit
2b6b9ae04e
27
inxi
27
inxi
|
@ -3,7 +3,7 @@
|
||||||
#### Script Name: inxi
|
#### Script Name: inxi
|
||||||
#### Version: 2.1.23
|
#### Version: 2.1.23
|
||||||
#### Date: 2014-04-28
|
#### Date: 2014-04-28
|
||||||
#### Patch Number: 04-b1
|
#### Patch Number: 05-b1
|
||||||
########################################################################
|
########################################################################
|
||||||
#### SPECIAL THANKS
|
#### 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
|
# for temp1/2 only use temp1/2 if they are null or greater than the last ones
|
||||||
$1 ~ /^temp1$/ && $2 ~ /^[ \t]*\+([0-9]+)/ {
|
$1 ~ /^temp1$/ && $2 ~ /^[ \t]*\+([0-9]+)/ {
|
||||||
tempWorking=gensub( /[ \t]+\+([0-9\.]+)(.*)/, "\\1", 1, $2 )
|
tempWorking=gensub( /[ \t]+\+([0-9\.]+)(.*)/, "\\1", 1, $2 )
|
||||||
if ( temp1 == "" || ( tempWorking > 0 && tempWorking > temp1 ) ) {
|
if ( temp1 == "" || tempWorking > 0 ) {
|
||||||
temp1=tempWorking
|
temp1=tempWorking
|
||||||
}
|
}
|
||||||
tempWorkingUnit=gensub( /[ \t]+\+([0-9\.]+)[ \t°]+([CF])(.*)/, "\\2", 1, $2 )
|
tempWorkingUnit=gensub( /[ \t]+\+([0-9\.]+)[ \t°]+([CF])(.*)/, "\\2", 1, $2 )
|
||||||
|
@ -8276,7 +8276,7 @@ get_sensors_data()
|
||||||
}
|
}
|
||||||
$1 ~ /^temp2$/ && $2 ~ /^[ \t]*\+([0-9]+)/ {
|
$1 ~ /^temp2$/ && $2 ~ /^[ \t]*\+([0-9]+)/ {
|
||||||
tempWorking=gensub( /[ \t]+\+([0-9\.]+)(.*)/, "\\1", 1, $2 )
|
tempWorking=gensub( /[ \t]+\+([0-9\.]+)(.*)/, "\\1", 1, $2 )
|
||||||
if ( temp2 == "" || ( tempWorking > 0 && tempWorking > temp2 ) ) {
|
if ( temp2 == "" || tempWorking > 0 ) {
|
||||||
temp2=tempWorking
|
temp2=tempWorking
|
||||||
}
|
}
|
||||||
tempWorkingUnit=gensub( /[ \t]+\+([0-9\.]+)[ \t°]+([CF])(.*)/, "\\2", 1, $2 )
|
tempWorkingUnit=gensub( /[ \t]+\+([0-9\.]+)[ \t°]+([CF])(.*)/, "\\2", 1, $2 )
|
||||||
|
@ -8406,13 +8406,24 @@ get_sensors_data()
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if ( tempFanType != "" ){
|
if ( tempFanType != "" ){
|
||||||
|
# there are some weird scenarios
|
||||||
if ( tempFanType == 1 ){
|
if ( tempFanType == 1 ){
|
||||||
|
if ( temp1 != "" && temp2 != "" && temp2 > temp1 ) {
|
||||||
|
cpuTempReal=temp2
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
cpuTempReal=temp2
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if ( temp1 != "" && temp2 != "" && temp1 > temp2 ) {
|
||||||
cpuTempReal=temp1
|
cpuTempReal=temp1
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
cpuTempReal=temp2
|
cpuTempReal=temp2
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
cpuTempReal=temp1 # can be null, that is ok
|
cpuTempReal=temp1 # can be null, that is ok
|
||||||
}
|
}
|
||||||
|
@ -8439,12 +8450,22 @@ get_sensors_data()
|
||||||
}
|
}
|
||||||
else if ( tempFanType != "" ){
|
else if ( tempFanType != "" ){
|
||||||
if ( tempFanType == 1 ) {
|
if ( tempFanType == 1 ) {
|
||||||
|
if ( temp1 != "" && temp2 != "" && temp2 > temp1 ) {
|
||||||
|
moboTempReal=temp1
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
moboTempReal=temp2
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if ( temp1 != "" && temp2 != "" && temp1 > temp2 ) {
|
||||||
moboTempReal=temp2
|
moboTempReal=temp2
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
moboTempReal=temp1
|
moboTempReal=temp1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
moboTempReal=temp2
|
moboTempReal=temp2
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue