remove lastcontrol timestamp

This commit is contained in:
salam committed 2026-01-27 08:21:12 +01:00
1 parent cc8ddb544b
commit 0742b6c19f
65 files changed
+132 -313

No files matched your search

@@ -18,21 +18,38 @@ class AlarmStore
return;
}
/**
* get favorit
*/
$favorit = 100;
foreach ($oddnames as $fieldname => $oddname) {
if ($client_odds[$oddname] < $favorit) {
$favorit = $oddname;
}
}
/**
* evaluate
*/
$update_array = [];
foreach ($oddnames as $fieldname => $oddname) {
$threshold = $client_odds[$oddname] - $compare_odds[$oddname];
if ($oddname == $favorit) {
if ($threshold > $alarm_threshold[3]) {
// ROT
$update_array[$fieldname] = 3;
} elseif ($threshold > $alarm_threshold[2]) {
// ORANGE
$update_array[$fieldname] = 2;
} elseif ($threshold > $alarm_threshold[1]) {
// GRÜNE
$update_array[$fieldname] = 1;
$threshold = $client_odds[$oddname] - $compare_odds[$oddname];
if ($threshold > $alarm_threshold[3]) {
// ROT
$update_array[$fieldname] = 3;
} elseif ($threshold > $alarm_threshold[2]) {
// ORANGE
$update_array[$fieldname] = 2;
} elseif ($threshold > $alarm_threshold[1]) {
// GRÜNE
$update_array[$fieldname] = 1;
} else {
// Reset Alarm
$update_array[$fieldname] = 0;
}
} else {
// Rset Alarm
$update_array[$fieldname] = 0;
}
}