* Mon May 12 2025 Brian Read <brianr@koozali.org> 11.0.0-1.sme
- Adding SM2 panel [SME: 13004] - Upgrade to phpsysinfo 3.4.4 - Add code to delete inline styles and add css to make it look better. - version saved / built uses the static version, which means no drops downs and choices.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* K8Temp sensor class
|
||||
* K8Temp sensor class, getting information from k8temp
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
@@ -8,18 +8,7 @@
|
||||
* @package PSI_Sensor
|
||||
* @author Michael Cramer <BigMichi1@users.sourceforge.net>
|
||||
* @copyright 2009 phpSysInfo
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License
|
||||
* @version SVN: $Id: class.k8temp.inc.php 661 2012-08-27 11:26:39Z namiltd $
|
||||
* @link http://phpsysinfo.sourceforge.net
|
||||
*/
|
||||
/**
|
||||
* getting information from k8temp
|
||||
*
|
||||
* @category PHP
|
||||
* @package PSI_Sensor
|
||||
* @author Michael Cramer <BigMichi1@users.sourceforge.net>
|
||||
* @copyright 2009 phpSysInfo
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License version 2, or (at your option) any later version
|
||||
* @version Release: 3.0
|
||||
* @link http://phpsysinfo.sourceforge.net
|
||||
*/
|
||||
@@ -38,20 +27,19 @@ class K8Temp extends Sensors
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
switch (strtolower(PSI_SENSOR_ACCESS)) {
|
||||
if ((PSI_OS != 'WINNT') && (!defined('PSI_EMU_HOSTNAME') || defined('PSI_EMU_PORT'))) switch (defined('PSI_SENSOR_K8TEMP_ACCESS')?strtolower(PSI_SENSOR_K8TEMP_ACCESS):'command') {
|
||||
case 'command':
|
||||
$lines = "";
|
||||
CommonFunctions::executeProgram('k8temp', '', $lines);
|
||||
$this->_lines = preg_split("/\n/", $lines, -1, PREG_SPLIT_NO_EMPTY);
|
||||
break;
|
||||
case 'file':
|
||||
if (CommonFunctions::rfts(APP_ROOT.'/data/k8temp.txt', $lines)) {
|
||||
case 'data':
|
||||
if (!defined('PSI_EMU_PORT') && CommonFunctions::rftsdata('k8temp.tmp', $lines)) {
|
||||
$this->_lines = preg_split("/\n/", $lines, -1, PREG_SPLIT_NO_EMPTY);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
$this->error->addConfigError('__construct()', 'PSI_SENSOR_ACCESS');
|
||||
break;
|
||||
$this->error->addConfigError('__construct()', '[sensor_k8temp] ACCESS');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,7 +55,7 @@ class K8Temp extends Sensors
|
||||
if ($data[2] > 0) {
|
||||
$dev = new SensorDevice();
|
||||
$dev->setName($data[1]);
|
||||
$dev->setMax('70.0');
|
||||
// $dev->setMax('70.0');
|
||||
if ($data[2] < 250) {
|
||||
$dev->setValue($data[2]);
|
||||
}
|
||||
@@ -82,7 +70,7 @@ class K8Temp extends Sensors
|
||||
*
|
||||
* @see PSI_Interface_Sensor::build()
|
||||
*
|
||||
* @return Void
|
||||
* @return void
|
||||
*/
|
||||
public function build()
|
||||
{
|
||||
|
Reference in New Issue
Block a user