methoden mit zufriffsmodifizierer ausgestattet

This commit is contained in:
2025-02-05 15:51:31 +01:00
parent 1bbcf972a4
commit 0dde43a71f
2 changed files with 5 additions and 5 deletions

View File

@@ -81,7 +81,7 @@ class Boiler_2_Stufig_Landwirtschaft extends IPSModule
}
}
function getNextTimeAndTemperature($zeitplan) {
public function getNextTimeAndTemperature($zeitplan) {
if (empty($zeitplan)) {
return null;
}
@@ -95,7 +95,7 @@ class Boiler_2_Stufig_Landwirtschaft extends IPSModule
return $zeitplan[0];
}
function calculateRemainingTime($nextTime) {
public function calculateRemainingTime($nextTime) {
$currentTime = new DateTime();
$nextDateTime = DateTime::createFromFormat('H:i', $nextTime);
if ($nextDateTime < $currentTime) {
@@ -105,7 +105,7 @@ class Boiler_2_Stufig_Landwirtschaft extends IPSModule
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
// 1 Liter Wasser = 1000 Gramm
$specificHeatCapacity = 4.186; // J/g°C
@@ -113,7 +113,7 @@ class Boiler_2_Stufig_Landwirtschaft extends IPSModule
return $specificHeatCapacity * $waterMass * $tempDiff; // Joules
}
function canBoilerReachTemperature($boilervolumen, $boilerTemper, $nextTemp, $remainingTime, $vollleistung) {
public function canBoilerReachTemperature($boilervolumen, $boilerTemper, $nextTemp, $remainingTime, $vollleistung) {
$tempDiff = $nextTemp - $boilerTemper;
$requiredHeat = calculateRequiredHeat($boilervolumen, $tempDiff);
$availableHeat = $vollleistung * $remainingTime * 3600; // Leistung in Watt * Zeit in Sekunden

View File

@@ -6,7 +6,7 @@
"compatibility": {
"version": "7.1"
},
"version": "1.029",
"version": "1.030",
"build": 0,
"date": 0
}