-Further fix formula manipulation flaw for non-type-1 sensors
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@2194 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
cc8ee4d81f
commit
41700ddcb0
@ -332,8 +332,12 @@ sub translate_sensor {
|
||||
my $lformat;
|
||||
my $per;
|
||||
$unitdesc = $units{$sdr->sensor_units_2};
|
||||
$value = (($sdr->M * $reading) + ($sdr->B * (10**$sdr->B_exp))) * (10**$sdr->R_exp);
|
||||
if($sdr->linearization == 0) {
|
||||
if ($sdr->rec_type == 1) {
|
||||
$value = (($sdr->M * $reading) + ($sdr->B * (10**$sdr->B_exp))) * (10**$sdr->R_exp);
|
||||
} else {
|
||||
$value = $reading;
|
||||
}
|
||||
if($sdr->rec_type !=1 or $sdr->linearization == 0) {
|
||||
$reading = $value;
|
||||
if($value == int($value)) {
|
||||
$lformat = "%-30s%8d%-20s";
|
||||
|
Loading…
Reference in New Issue
Block a user