Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update cmd.class.php #2985

Merged
merged 2 commits into from
Nov 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions core/class/cmd.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
*/

class cmd {
/* * *************************Attributs****************************** */
/* * *************************Attributs****************************** */

protected $id;
protected $logicalId;
Expand Down Expand Up @@ -64,7 +64,7 @@ class cmd {
'Hz' => array(1000, 'Hz', 'kHz', 'MHz', 'GHz'),
'l' => array(1000, 'l', 'm<sup>3</sup>')
);
/* * ***********************Méthodes statiques*************************** */
/* * ***********************Méthodes statiques*************************** */

private static function cast($_inputs, $_eqLogic = null) {
if (is_object($_inputs) && class_exists($_inputs->getEqType() . 'Cmd')) {
Expand Down Expand Up @@ -983,7 +983,7 @@ public static function cmdAlert($_options) {
$cmd->executeAlertCmdAction();
}

/* * *********************Méthodes d'instance************************* */
/* * *********************Méthodes d'instance************************* */
public function formatValue($_value, $_quote = false) {
if (is_array($_value) || is_object($_value)) {
return '';
Expand Down Expand Up @@ -2273,7 +2273,7 @@ public function computeInfluxData($_value, $_timestamp = '') {
return $point;
}

public function getInflux($_cmdId = null) {
public static function getInflux($_cmdId = null) {
try {
if ($_cmdId) {
$cmd = cmd::byId($_cmdId);
Expand Down Expand Up @@ -2358,7 +2358,7 @@ public function historyInfluxAll() {
cmd::historyInflux('all');
}

public function sendHistoryInflux($_params) {
public static function sendHistoryInflux($_params) {
$cmds = array();
if ($_params['cmd_id'] == 'all') {
foreach (cmd::byTypeSubType('info') as $cmd) {
Expand Down Expand Up @@ -2898,7 +2898,7 @@ public function hasRight($_user = null) {
}
}

/* * **********************Getteur Setteur*************************** */
/* * **********************Getteur Setteur*************************** */

public function getId() {
return $this->id;
Expand Down