di waren verdreht

This commit is contained in:
2024-11-27 15:56:13 +01:00
parent ef10b51770
commit 646033353f
2 changed files with 11 additions and 11 deletions

View File

@@ -36,7 +36,7 @@ class CC100_HW extends IPSModule
// Timer für PT1 und PT2 einrichten
$this->RegisterTimer("ReadPTValues", 30000, 'IPS_RequestAction(' . $this->InstanceID . ', "DOUT_ReadPTValues", "");');
$this->RegisterTimer("WriteBits", 1000, 'IPS_RequestAction(' . $this->InstanceID . ', "UpdateFile", "");');
$this->RegisterTimer("WriteBits", 2000, 'IPS_RequestAction(' . $this->InstanceID . ', "UpdateFile", "");');
}
@@ -62,7 +62,7 @@ class CC100_HW extends IPSModule
private function UpdateFile()
{
$starttime = microtime(true) * 1000;
$starttime = microtime(true) * 2000;
$this->TryWriteFile($starttime);
}
@@ -100,14 +100,14 @@ class CC100_HW extends IPSModule
// Binärwerte in ein Array von booleschen Werten umwandeln
$boolValues = array_map(fn($bit) => $bit === "1", str_split($binaryString));
$this->SetValue("DI1", $boolValues[0]);
$this->SetValue("DI2", $boolValues[1]);
$this->SetValue("DI3", $boolValues[2]);
$this->SetValue("DI4", $boolValues[3]);
$this->SetValue("DI5", $boolValues[4]);
$this->SetValue("DI6", $boolValues[5]);
$this->SetValue("DI7", $boolValues[6]);
$this->SetValue("DI8", $boolValues[7]);
$this->SetValue("DI1", $boolValues[7]);
$this->SetValue("DI2", $boolValues[6]);
$this->SetValue("DI3", $boolValues[5]);
$this->SetValue("DI4", $boolValues[4]);
$this->SetValue("DI5", $boolValues[3]);
$this->SetValue("DI6", $boolValues[2]);
$this->SetValue("DI7", $boolValues[1]);
$this->SetValue("DI8", $boolValues[0]);
return $boolValues;
}