Subversion Repositories ALCASAR

Compare Revisions

Ignore whitespace Rev 3036 → Rev 3037

/web/acc/phpsysinfo/includes/mb/class.pitemp.inc.php
22,11 → 22,11
CommonFunctions::rfts('/sys/class/thermal/thermal_zone0/temp', $temp, 1);
CommonFunctions::rfts('/sys/class/thermal/thermal_zone0/trip_point_0_temp', $temp_max, 1, 4096, PSI_DEBUG);
}
if (!is_null($temp) && (($temp = trim($temp)) != "")) {
if (($temp !== null) && (($temp = trim($temp)) != "")) {
$dev = new SensorDevice();
$dev->setName("CPU 1");
$dev->setValue($temp / 1000);
if (!is_null($temp_max) && (($temp_max = trim($temp_max)) != "") && ($temp_max > 0)) {
if (($temp_max !== null) && (($temp_max = trim($temp_max)) != "") && ($temp_max > 0)) {
$dev->setMax($temp_max / 1000);
}
$this->mbinfo->setMbTemp($dev);
36,7 → 36,7
private function _voltage()
{
$volt = null;
if (CommonFunctions::rfts('/sys/devices/platform/sunxi-i2c.0/i2c-0/0-0034/axp20-supplyer.28/power_supply/ac/voltage_now', $volt, 1, 4096, false) && !is_null($volt) && (($volt = trim($volt)) != "")) { // Banana Pi
if (CommonFunctions::rfts('/sys/devices/platform/sunxi-i2c.0/i2c-0/0-0034/axp20-supplyer.28/power_supply/ac/voltage_now', $volt, 1, 4096, false) && ($volt !== null) && (($volt = trim($volt)) != "")) { // Banana Pi
$dev = new SensorDevice();
$dev->setName("Voltage 1");
$dev->setValue($volt / 1000000);
47,7 → 47,7
private function _current()
{
$current = null;
if (CommonFunctions::rfts('/sys/devices/platform/sunxi-i2c.0/i2c-0/0-0034/axp20-supplyer.28/power_supply/ac/current_now', $current, 1, 4096, false) && !is_null($current) && (($current = trim($current)) != "")) { // Banana Pi
if (CommonFunctions::rfts('/sys/devices/platform/sunxi-i2c.0/i2c-0/0-0034/axp20-supplyer.28/power_supply/ac/current_now', $current, 1, 4096, false) && ($current !== null) && (($current = trim($current)) != "")) { // Banana Pi
$dev = new SensorDevice();
$dev->setName("Current 1");
$dev->setValue($current / 1000000);