methoden mit zufriffsmodifizierer ausgestattet
This commit is contained in:
@@ -81,7 +81,7 @@ class Boiler_2_Stufig_Landwirtschaft extends IPSModule
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function getNextTimeAndTemperature($zeitplan) {
|
public function getNextTimeAndTemperature($zeitplan) {
|
||||||
if (empty($zeitplan)) {
|
if (empty($zeitplan)) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@@ -95,7 +95,7 @@ class Boiler_2_Stufig_Landwirtschaft extends IPSModule
|
|||||||
return $zeitplan[0];
|
return $zeitplan[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
function calculateRemainingTime($nextTime) {
|
public function calculateRemainingTime($nextTime) {
|
||||||
$currentTime = new DateTime();
|
$currentTime = new DateTime();
|
||||||
$nextDateTime = DateTime::createFromFormat('H:i', $nextTime);
|
$nextDateTime = DateTime::createFromFormat('H:i', $nextTime);
|
||||||
if ($nextDateTime < $currentTime) {
|
if ($nextDateTime < $currentTime) {
|
||||||
@@ -105,7 +105,7 @@ class Boiler_2_Stufig_Landwirtschaft extends IPSModule
|
|||||||
return $interval->h + ($interval->i / 60);
|
return $interval->h + ($interval->i / 60);
|
||||||
}
|
}
|
||||||
|
|
||||||
function calculateRequiredHeat($boilervolumen, $tempDiff) {
|
public function calculateRequiredHeat($boilervolumen, $tempDiff) {
|
||||||
// Annahme: spezifische Wärmekapazität von Wasser = 4.186 J/g°C
|
// Annahme: spezifische Wärmekapazität von Wasser = 4.186 J/g°C
|
||||||
// 1 Liter Wasser = 1000 Gramm
|
// 1 Liter Wasser = 1000 Gramm
|
||||||
$specificHeatCapacity = 4.186; // J/g°C
|
$specificHeatCapacity = 4.186; // J/g°C
|
||||||
@@ -113,7 +113,7 @@ class Boiler_2_Stufig_Landwirtschaft extends IPSModule
|
|||||||
return $specificHeatCapacity * $waterMass * $tempDiff; // Joules
|
return $specificHeatCapacity * $waterMass * $tempDiff; // Joules
|
||||||
}
|
}
|
||||||
|
|
||||||
function canBoilerReachTemperature($boilervolumen, $boilerTemper, $nextTemp, $remainingTime, $vollleistung) {
|
public function canBoilerReachTemperature($boilervolumen, $boilerTemper, $nextTemp, $remainingTime, $vollleistung) {
|
||||||
$tempDiff = $nextTemp - $boilerTemper;
|
$tempDiff = $nextTemp - $boilerTemper;
|
||||||
$requiredHeat = calculateRequiredHeat($boilervolumen, $tempDiff);
|
$requiredHeat = calculateRequiredHeat($boilervolumen, $tempDiff);
|
||||||
$availableHeat = $vollleistung * $remainingTime * 3600; // Leistung in Watt * Zeit in Sekunden
|
$availableHeat = $vollleistung * $remainingTime * 3600; // Leistung in Watt * Zeit in Sekunden
|
||||||
|
|||||||
+1
-1
@@ -6,7 +6,7 @@
|
|||||||
"compatibility": {
|
"compatibility": {
|
||||||
"version": "7.1"
|
"version": "7.1"
|
||||||
},
|
},
|
||||||
"version": "1.029",
|
"version": "1.030",
|
||||||
"build": 0,
|
"build": 0,
|
||||||
"date": 0
|
"date": 0
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user