Codefehler
This commit is contained in:
+31
-31
@@ -164,42 +164,42 @@ class Batterie extends IPSModule
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
public function CheckIdle($power)
|
|
||||||
{
|
|
||||||
$lastpower = GetValue("Aktuelle_Leistung");
|
|
||||||
if ($lastpower != GetValue("Aktuelle_Leistung")) {
|
|
||||||
$this->SetValue("Idle", false);
|
|
||||||
$this->SetValue(
|
|
||||||
"IdleCounter",
|
|
||||||
$this->ReadPropertyInteger("IdleCounterMax")
|
|
||||||
);
|
|
||||||
}
|
|
||||||
// IdleCounter auslesen und verarbeiten
|
|
||||||
$idleCounter = $this->GetValue("IdleCounter");
|
|
||||||
if ($idleCounter > 0) {
|
|
||||||
$this->SetValue("Idle", false);
|
|
||||||
$this->SetValue("IdleCounter", $idleCounter - 1);
|
|
||||||
} else {
|
|
||||||
$this->SetValue("Idle", true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public function ProcessIdleCounter()
|
|
||||||
{
|
|
||||||
// IdleCounter auslesen und verarbeiten
|
|
||||||
$idleCounter = $this->GetValue("IdleCounter");
|
|
||||||
if ($idleCounter > 0) {
|
|
||||||
$this->SetValue("Idle", false);
|
|
||||||
$this->SetValue("IdleCounter", $idleCounter - 1);
|
|
||||||
} else {
|
|
||||||
$this->SetValue("Idle", true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
private function CheckIdle($power)
|
||||||
|
{
|
||||||
|
$lastpower = GetValue("Aktuelle_Leistung");
|
||||||
|
if ($lastpower != GetValue("Aktuelle_Leistung")) {
|
||||||
|
$this->SetValue("Idle", false);
|
||||||
|
$this->SetValue(
|
||||||
|
"IdleCounter",
|
||||||
|
$this->ReadPropertyInteger("IdleCounterMax")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
// IdleCounter auslesen und verarbeiten
|
||||||
|
$idleCounter = $this->GetValue("IdleCounter");
|
||||||
|
if ($idleCounter > 0) {
|
||||||
|
$this->SetValue("Idle", false);
|
||||||
|
$this->SetValue("IdleCounter", $idleCounter - 1);
|
||||||
|
} else {
|
||||||
|
$this->SetValue("Idle", true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private function ProcessIdleCounter()
|
||||||
|
{
|
||||||
|
// IdleCounter auslesen und verarbeiten
|
||||||
|
$idleCounter = $this->GetValue("IdleCounter");
|
||||||
|
if ($idleCounter > 0) {
|
||||||
|
$this->SetValue("Idle", false);
|
||||||
|
$this->SetValue("IdleCounter", $idleCounter - 1);
|
||||||
|
} else {
|
||||||
|
$this->SetValue("Idle", true);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
+1
-1
@@ -6,7 +6,7 @@
|
|||||||
"compatibility": {
|
"compatibility": {
|
||||||
"version": "7.1"
|
"version": "7.1"
|
||||||
},
|
},
|
||||||
"version": "0.177",
|
"version": "0.178",
|
||||||
"build": 0,
|
"build": 0,
|
||||||
"date": 0
|
"date": 0
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user