mirror of
https://github.com/smxi/inxi.git
synced 2025-01-19 00:47:47 +00:00
branch one, testing adjustments on sensors
This commit is contained in:
parent
cab5a78d7c
commit
d91a563750
7
inxi
7
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: 03-b1
|
#### Patch Number: 04-b1
|
||||||
########################################################################
|
########################################################################
|
||||||
#### SPECIAL THANKS
|
#### SPECIAL THANKS
|
||||||
########################################################################
|
########################################################################
|
||||||
|
@ -8263,9 +8263,10 @@ get_sensors_data()
|
||||||
tempUnit=tempWorkingUnit
|
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]+)/ {
|
$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 ) {
|
if ( temp1 == "" || ( tempWorking > 0 && tempWorking > temp1 ) ) {
|
||||||
temp1=tempWorking
|
temp1=tempWorking
|
||||||
}
|
}
|
||||||
tempWorkingUnit=gensub( /[ \t]+\+([0-9\.]+)[ \t°]+([CF])(.*)/, "\\2", 1, $2 )
|
tempWorkingUnit=gensub( /[ \t]+\+([0-9\.]+)[ \t°]+([CF])(.*)/, "\\2", 1, $2 )
|
||||||
|
@ -8275,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 ) {
|
if ( temp2 == "" || ( tempWorking > 0 && tempWorking > temp2 ) ) {
|
||||||
temp2=tempWorking
|
temp2=tempWorking
|
||||||
}
|
}
|
||||||
tempWorkingUnit=gensub( /[ \t]+\+([0-9\.]+)[ \t°]+([CF])(.*)/, "\\2", 1, $2 )
|
tempWorkingUnit=gensub( /[ \t]+\+([0-9\.]+)[ \t°]+([CF])(.*)/, "\\2", 1, $2 )
|
||||||
|
|
Loading…
Reference in a new issue