Compare commits
12
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2d8f70ae37 | ||
|
|
537f1d4c20 | ||
|
|
2cf375a2b4 | ||
|
|
e33de56edc | ||
|
|
9b91543435 | ||
|
|
6dd3f1eaf2 | ||
|
|
b6155acafe | ||
|
|
4cc9ceea7c | ||
|
|
881acec3df | ||
|
|
bc78a10505 | ||
|
|
1f8cce48aa | ||
|
|
1933a41e64 |
@@ -1,3 +1,75 @@
|
|||||||
|
Version 5.4.0:
|
||||||
|
- Cold Extraction hat eine eigene Seite: /Cold-Extraction, eigener Eintrag im Menü. Auf /Brew-Control
|
||||||
|
steht nur noch ein Verweis darauf - die Seite war mit dem angehängten Block unübersichtlich geworden.
|
||||||
|
- Die neue Seite ist in Abschnitte gegliedert (Grundeinstellung, Vorbenetzung, Hauptbezug, Bezugsende,
|
||||||
|
Pumpenschutz), jeder mit einer kurzen Erklärung, warum der Wert so eingestellt gehört.
|
||||||
|
- Wichtig für bestehende Installationen: Ein Speichern auf /Brew-Control fasst die Cold-Extraction-
|
||||||
|
Einstellungen nicht mehr an. Vorher wertete dieser Handler die cx-Felder mit aus; nach dem Verschieben
|
||||||
|
hätte ein Speichern dort die Freischaltung abgeschaltet, weil die Checkbox im Formular fehlt.
|
||||||
|
- Das UART-Kommando "saveBrew" akzeptiert jetzt zusätzlich die Cold-Extraction-Felder (cxEnabled,
|
||||||
|
cxMaxTemp, cxPreInf, cxPreInfDuty, cxPulseMs, cxDuty, cxTarget, cxMaxSecs, cxPumpMaxRun, cxPumpRest) -
|
||||||
|
damit lässt sich die Funktion auch am Touch-Display vollständig einstellen.
|
||||||
|
- Das State-JSON liefert die restlichen Parameter mit (cxPreInfDuty, cxDuty, cxPulseMs, cxPumpMaxRun,
|
||||||
|
cxPumpRest), damit das Display seine Eingabefelder vorbelegen kann.
|
||||||
|
|
||||||
|
Version 5.3.6:
|
||||||
|
- Cold Extraction: Die Vorbenetzung läuft nicht mehr mit voller Pumpenleistung, sondern gepulst mit
|
||||||
|
eigener, niedriger Leistung (neue Einstellung „Pumpenleistung Vorbenetzung", Standard 10 %).
|
||||||
|
Messung an der Maschine: Nach 7 s Vorbenetzung kommen heiß 1-2 Tropfen, kalt bei voller Leistung
|
||||||
|
rund 10 g dünne Brühe ohne Crema - etwa zehnfacher Durchfluss trotz dreifacher Viskosität.
|
||||||
|
Ursache ist nicht die Viskosität, sondern das Kaffeebett: Kaltes Mehl quillt nicht, ist schlecht
|
||||||
|
benetzbar, es wandert kein Feinanteil und es lösen sich kaum Feststoffe, die das Bett verdichten.
|
||||||
|
Volle Leistung auf den trockenen kalten Puck legt deshalb sofort Kanäle an, die sich - anders als
|
||||||
|
bei heißem Bezug - nie wieder schließen; der restliche Bezug läuft daran vorbei statt zu extrahieren.
|
||||||
|
- Standard der Pumpenleistung im Hauptbezug von 30 % auf 20 % gesenkt (gleicher Grund: das kalte Bett
|
||||||
|
ist erheblich durchlässiger als ein heißes). Bestehende Installationen behalten ihren Wert.
|
||||||
|
- Der Erklärtext auf /Brew-Control benennt den Zusammenhang jetzt und weist darauf hin, dass die
|
||||||
|
Vorbenetzung deutlich schwächer eingestellt sein sollte als der Hauptbezug.
|
||||||
|
|
||||||
|
Version 5.3.5:
|
||||||
|
- Cold Extraction lässt sich jetzt auch im Standby und bei noch warmem Kessel scharf schalten.
|
||||||
|
Bisher galt „Standby aktiv" und „Kessel zu warm" auch fürs Aktivieren - das war falsch herum
|
||||||
|
gedacht: Der Modus schaltet die Heizung AB, man kam aber erst an den Schalter, nachdem die
|
||||||
|
Maschine aufgeweckt war und bereits zu heizen begonnen hatte. Genau der Ablauf, den die
|
||||||
|
Funktion vermeiden soll.
|
||||||
|
- Scharfschalten und Beziehen sind jetzt zwei getrennte Bedingungen:
|
||||||
|
- Scharfschalten (neues State-Feld „cxArmable"): blockiert nur durch fehlende Freischaltung,
|
||||||
|
Wartungsmodus, Reinigungsassistent, PID-Tuning oder einen laufenden Bezug/Spülvorgang.
|
||||||
|
- Bezug (unverändert „cxAllowed"): zusätzlich kein Standby, Kessel unter der Freigabeschwelle,
|
||||||
|
gültiger Sensorwert.
|
||||||
|
Ist der Modus scharf, der Bezug aber noch gesperrt, sagen Web-UI und Display das jetzt
|
||||||
|
ausdrücklich („Modus aktiv, Bezug noch gesperrt: …").
|
||||||
|
- Wird bei warmem Kessel aktiviert, geht die Wasserheizung sofort aus und der Kessel kühlt ab;
|
||||||
|
die Rückmeldung weist darauf hin, dass Bezüge bis zum Unterschreiten der Schwelle gesperrt sind.
|
||||||
|
|
||||||
|
Version 5.3.4:
|
||||||
|
- Cold Extraction weist jetzt deutlich darauf hin, wenn keine Waage aktiv/verbunden ist. Ohne Waage
|
||||||
|
greifen weder das Zielgewicht noch die Stillstands-Erkennung - der Bezug endet dann erst nach der
|
||||||
|
maximalen Bezugsdauer, die damit faktisch zur Dosierung wird. Bisher passierte das stillschweigend.
|
||||||
|
- Die Funktion bleibt ohne Waage bewusst nutzbar (Zeitsteuerung als Rückfallebene): Ein kurzzeitig
|
||||||
|
abgemeldeter HX711 soll die kalte Extraktion nicht komplett blockieren.
|
||||||
|
- Angezeigt wird das an vier Stellen: dauerhafter Warnhinweis auf /Brew-Control (dort ist das
|
||||||
|
Zielgewicht-Feld zusätzlich als „nur mit Waage wirksam" beschriftet), Hinweiszeile unter dem
|
||||||
|
Dashboard-Schalter, Statustext „Cold Extraction bereit (ohne Waage: Zeitsteuerung)" sowie eine
|
||||||
|
einmalige Meldung beim Aktivieren.
|
||||||
|
- Neuer Code im UART-Feld cxNotice: 4 = ohne Waage aktiviert (additiv, Protokoll bleibt v2).
|
||||||
|
|
||||||
|
Version 5.3.3:
|
||||||
|
- Bug-Fix (Cold Extraction, hätte die Funktion mit Waage komplett unbrauchbar gemacht): Die
|
||||||
|
Stillstands-Erkennung lief bereits während der Vorbenetzung mit. In dieser Phase sättigt der Puck
|
||||||
|
aber erst, es kommt naturgemäß nichts in der Tasse an - bei einer Vorbenetzung länger als die
|
||||||
|
15 s Stillstands-Zeit wurde deshalb JEDER kalte Bezug mit „kein Zulauf" abgebrochen. Mit dem
|
||||||
|
bisherigen Standard von 30 s Vorbenetzung wäre das immer passiert. Die Erkennung startet jetzt
|
||||||
|
erst mit dem Hauptbezug.
|
||||||
|
- Standard der Vorbenetzung von 30 s auf 10 s gesenkt. In dieser Phase läuft die Pumpe bewusst
|
||||||
|
ungepulst auf voller Leistung; bei heißem Bezug kommt der erste Tropfen nach etwa 7 s, kalt
|
||||||
|
(rund dreifache Viskosität) entsprechend später. 30 s wären also längst voller Bezug bei vollem
|
||||||
|
Druck gewesen, und die Hälfte des Pumpen-Laufzeitbudgets wäre vor dem eigentlichen Bezug
|
||||||
|
verbraucht. Bestehende Installationen behalten ihren gespeicherten Wert - dort ggf. auf
|
||||||
|
/Brew-Control nachziehen.
|
||||||
|
- Die Beschriftung auf /Brew-Control sagt jetzt ausdrücklich, dass die Pumpe während der
|
||||||
|
Vorbenetzung durchläuft und erst im Hauptbezug gepulst wird.
|
||||||
|
|
||||||
Version 5.3.2:
|
Version 5.3.2:
|
||||||
- Cold Extraction sendet den Sperrgrund jetzt als Code („cxBlock") statt als Klartext („cxMessage"),
|
- Cold Extraction sendet den Sperrgrund jetzt als Code („cxBlock") statt als Klartext („cxMessage"),
|
||||||
dazu eine transiente Meldung als Code („cxNotice") und die Vorbenetzungsdauer („cxPreInf").
|
dazu eine transiente Meldung als Code („cxNotice") und die Vorbenetzungsdauer („cxPreInf").
|
||||||
|
|||||||
@@ -323,17 +323,29 @@ Alle gültigen `action`-Strings aus `executeDashboardAction()` (Stand v4.8.1, Ze
|
|||||||
| `stopColdExtraction` | — | Modus beenden |
|
| `stopColdExtraction` | — | Modus beenden |
|
||||||
| `toggleColdExtraction` | — | Modus umschalten |
|
| `toggleColdExtraction` | — | Modus umschalten |
|
||||||
|
|
||||||
Alle drei Aktionen werden abgewiesen (`ok:false` + `message`), solange die Bedingungen nicht
|
Für das Bedienelement zählt `cxArmable`, **nicht** `cxAllowed`: Der Modus schaltet die
|
||||||
erfüllt sind — Hauptfall ist ein zu warmer Wasserkessel (`cxAllowed:false`). Der Modus ist
|
Wasserheizung ab und muss deshalb auch im Standby und bei noch warmem Kessel scharf zu
|
||||||
|
stellen sein — sonst heizt die Maschine nach dem Aufwecken an, bevor man an den Schalter
|
||||||
|
kommt. `cxAllowed` gilt nur für den einzelnen Bezug; ist der Modus scharf und `cxAllowed`
|
||||||
|
false, sollte die UI „Modus aktiv, Bezug noch gesperrt" zeigen.
|
||||||
|
|
||||||
|
Ein Aufwecken direkt in die kalte Extraktion sendet `startColdExtraction` **vor**
|
||||||
|
`deactivateStandby` — in dieser Reihenfolge, damit der Wasserkreis gar nicht erst anheizt.
|
||||||
|
|
||||||
|
Die Aktionen werden abgewiesen (`ok:false` + `message`), solange die Bedingungen nicht
|
||||||
|
erfüllt sind. Der Modus ist
|
||||||
**persistent** (EEPROM) und überlebt Standby und Neustart; er endet nur durch explizites
|
**persistent** (EEPROM) und überlebt Standby und Neustart; er endet nur durch explizites
|
||||||
Ausschalten, durch Entzug der Freischaltung auf `/Brew-Control` oder durch einen Werksreset.
|
Ausschalten, durch Entzug der Freischaltung auf `/Brew-Control` oder durch einen Werksreset.
|
||||||
Das P4-UI sollte `cxActive` deshalb dauerhaft sichtbar spiegeln — sonst wundert sich der
|
Das P4-UI sollte `cxActive` deshalb dauerhaft sichtbar spiegeln — sonst wundert sich der
|
||||||
Benutzer, warum die Maschine nicht heizt. Ein laufender Bezug wird nie abgebrochen,
|
Benutzer, warum die Maschine nicht heizt. Ein laufender Bezug wird nie abgebrochen,
|
||||||
`stopColdExtraction` schlägt dann fehl.
|
`stopColdExtraction` schlägt dann fehl.
|
||||||
|
|
||||||
Die Parameter der kalten Extraktion (Schwelle, Vorbenetzung, Pulsperiode, Pumpenleistung,
|
Die Parameter der kalten Extraktion sind ab S3 5.4.0 über `saveBrew` einstellbar (zusätzlich
|
||||||
Zielgewicht, Timeout, Pumpenschutz) sind bewusst **nicht** über `saveBrew` erreichbar, sondern
|
zur Web-Seite `/Cold-Extraction`). Zulässige Felder: `cxEnabled` (bool), `cxMaxTemp`,
|
||||||
nur über die Web-Seite `/Brew-Control`. Das Display schaltet den Modus, konfiguriert ihn nicht.
|
`cxPreInf`, `cxPreInfDuty`, `cxPulseMs`, `cxDuty`, `cxTarget`, `cxMaxSecs`, `cxPumpMaxRun`,
|
||||||
|
`cxPumpRest`. Es werden nur die tatsächlich gesendeten Felder übernommen; Grenzwerte prüft
|
||||||
|
die S3. Die aktuellen Werte stehen alle im `state`, damit das Display seine Eingabefelder
|
||||||
|
vorbelegen kann.
|
||||||
|
|
||||||
**Persistente Toggles**
|
**Persistente Toggles**
|
||||||
|
|
||||||
@@ -383,11 +395,17 @@ Aus `getTouchUartStatus()`. Für sprach-unabhängige UI-Logik/Icons auf dem P4 v
|
|||||||
| `cxEnabled` | bool | Funktion in der Web-UI freigeschaltet (sonst Bedienelement ausblenden) |
|
| `cxEnabled` | bool | Funktion in der Web-UI freigeschaltet (sonst Bedienelement ausblenden) |
|
||||||
| `cxActive` | bool | Modus scharf: Wasserkreis heizt nicht |
|
| `cxActive` | bool | Modus scharf: Wasserkreis heizt nicht |
|
||||||
| `cxShot` | bool | Der laufende Bezug ist eine kalte Extraktion |
|
| `cxShot` | bool | Der laufende Bezug ist eine kalte Extraktion |
|
||||||
| `cxAllowed` | bool | Freigabe **jetzt** (Wasserkessel kalt genug, kein Standby/Wartung/Tuning) |
|
| `cxAllowed` | bool | **Bezug** jetzt möglich (Wasserkessel kalt genug, kein Standby/Wartung/Tuning) |
|
||||||
|
| `cxArmable` | bool | **Modus umschaltbar** — auch im Standby und bei warmem Kessel (ab S3 5.3.5) |
|
||||||
| `cxResting` | bool | Zwangspause des Pumpenschutzes läuft (Bezug läuft weiter) |
|
| `cxResting` | bool | Zwangspause des Pumpenschutzes läuft (Bezug läuft weiter) |
|
||||||
| `cxMaxTemp` | float | Freigabeschwelle in °C (für eigene Hinweistexte am Display) |
|
| `cxMaxTemp` | float | Freigabeschwelle in °C (für eigene Hinweistexte am Display) |
|
||||||
| `cxTarget` | float | Zielgewicht in g |
|
| `cxTarget` | float | Zielgewicht in g |
|
||||||
| `cxPreInf` | float | Vorbenetzung in s (für die Phasenleiste des kalten Bezugs) |
|
| `cxPreInf` | float | Vorbenetzung in s (auch für die Phasenleiste des kalten Bezugs) |
|
||||||
|
| `cxPreInfDuty` | float | Pumpenleistung Vorbenetzung in % (ab S3 5.4.0) |
|
||||||
|
| `cxDuty` | float | Pumpenleistung Hauptbezug in % (ab S3 5.4.0) |
|
||||||
|
| `cxPulseMs` | uint16 | Pulsperiode in ms (ab S3 5.4.0) |
|
||||||
|
| `cxPumpMaxRun` | float | Pumpenschutz: max. kumulierte Laufzeit in s (ab S3 5.4.0) |
|
||||||
|
| `cxPumpRest` | float | Pumpenschutz: Zwangspause in s (ab S3 5.4.0) |
|
||||||
| `cxMaxSecs` | float | Sicherheits-Timeout des Bezugs in s |
|
| `cxMaxSecs` | float | Sicherheits-Timeout des Bezugs in s |
|
||||||
| `cxBlock` | uint8 | Sperrgrund (siehe unten), `0` = frei |
|
| `cxBlock` | uint8 | Sperrgrund (siehe unten), `0` = frei |
|
||||||
| `cxNotice` | uint8 | transiente Meldung, `0` = keine (läuft nach ~6 s selbst ab) |
|
| `cxNotice` | uint8 | transiente Meldung, `0` = keine (läuft nach ~6 s selbst ab) |
|
||||||
@@ -396,7 +414,13 @@ Aus `getTouchUartStatus()`. Für sprach-unabhängige UI-Logik/Icons auf dem P4 v
|
|||||||
`4` Reinigungsassistent, `5` PID-Tuning, `6` Sensorfehler, `7` Wasserkessel zu warm.
|
`4` Reinigungsassistent, `5` PID-Tuning, `6` Sensorfehler, `7` Wasserkessel zu warm.
|
||||||
|
|
||||||
`cxNotice`: `0` keine, `1` Start abgewiesen (Grund steht in `cxBlock`), `2` Bezug wegen
|
`cxNotice`: `0` keine, `1` Start abgewiesen (Grund steht in `cxBlock`), `2` Bezug wegen
|
||||||
fehlenden Zulaufs beendet, `3` Umschalten während eines Bezugs abgelehnt.
|
fehlenden Zulaufs beendet, `3` Umschalten während eines Bezugs abgelehnt, `4` ohne Waage
|
||||||
|
aktiviert (ab S3 5.3.4).
|
||||||
|
|
||||||
|
**Ohne Waage** (`scaleEnabled`/`scaleConnected` false) läuft die kalte Extraktion rein
|
||||||
|
zeitgesteuert: `cxTarget` ist wirkungslos und die Stillstands-Erkennung ist inaktiv, es
|
||||||
|
bleibt `cxMaxSecs` als Ende. Das ist Absicht (ein kurz abgemeldeter HX711 soll die Funktion
|
||||||
|
nicht blockieren) und **kein** Sperrgrund — das Display sollte es aber dauerhaft anzeigen.
|
||||||
|
|
||||||
Bewusst **Codes statt Klartext**: Die State-Zeile muss unter dem Zeilenlimit des P4 bleiben
|
Bewusst **Codes statt Klartext**: Die State-Zeile muss unter dem Zeilenlimit des P4 bleiben
|
||||||
(`PROTO_RX_LINE_MAX`; sie liegt real bereits bei ~2,1 KB), und die Texte gehören ins Display —
|
(`PROTO_RX_LINE_MAX`; sie liegt real bereits bei ~2,1 KB), und die Texte gehören ins Display —
|
||||||
|
|||||||
+336
-90
@@ -369,7 +369,7 @@ Adafruit_SH1106G display = Adafruit_SH1106G(128, 64, &Wire);
|
|||||||
* Firmware-Informationen
|
* Firmware-Informationen
|
||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
String version = "5.3.2";
|
String version = "5.4.0";
|
||||||
String versionHersteller = "Thomas Müller";
|
String versionHersteller = "Thomas Müller";
|
||||||
String versionHerstellerMail =
|
String versionHerstellerMail =
|
||||||
"<a href='mailto:thomas@mueller.black' class='info-link'>thomas@mueller.black</a>";
|
"<a href='mailto:thomas@mueller.black' class='info-link'>thomas@mueller.black</a>";
|
||||||
@@ -782,9 +782,10 @@ bool flowGuardPumpPulseActive = false;
|
|||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
bool coldExtractionEnabled = false; // Funktion in der Web-UI freigeschaltet
|
bool coldExtractionEnabled = false; // Funktion in der Web-UI freigeschaltet
|
||||||
float coldExtractionMaxTempC = 30.0f; // Freigabeschwelle Wasserkessel
|
float coldExtractionMaxTempC = 30.0f; // Freigabeschwelle Wasserkessel
|
||||||
float coldExtractionPreInfusionSeconds = 30.0f; // Vorbenetzung (Pumpe laeuft ungepulst)
|
float coldExtractionPreInfusionSeconds = 10.0f; // Vorbenetzung (gepulst, eigene Leistung)
|
||||||
|
float coldExtractionPreInfDutyPercent = 10.0f; // Pumpenleistung waehrend der Vorbenetzung
|
||||||
uint16_t coldExtractionPulsePeriodMs = 2000; // Pulsperiode der Pumpe im Hauptbezug
|
uint16_t coldExtractionPulsePeriodMs = 2000; // Pulsperiode der Pumpe im Hauptbezug
|
||||||
float coldExtractionDutyPercent = 30.0f; // Pumpen-Duty im Hauptbezug
|
float coldExtractionDutyPercent = 20.0f; // Pumpen-Duty im Hauptbezug
|
||||||
float coldExtractionTargetGrams = 60.0f; // Zielgewicht (ca. 1:3 auf 18 g)
|
float coldExtractionTargetGrams = 60.0f; // Zielgewicht (ca. 1:3 auf 18 g)
|
||||||
float coldExtractionMaxSeconds = 300.0f; // Sicherheits-Timeout des Bezugs
|
float coldExtractionMaxSeconds = 300.0f; // Sicherheits-Timeout des Bezugs
|
||||||
float coldExtractionPumpMaxRunSec = 60.0f; // kumulierte Pumpenlaufzeit bis zur Zwangspause
|
float coldExtractionPumpMaxRunSec = 60.0f; // kumulierte Pumpenlaufzeit bis zur Zwangspause
|
||||||
@@ -792,9 +793,17 @@ float coldExtractionPumpRestSec = 20.0f; // Dauer der Zwangspause
|
|||||||
|
|
||||||
const bool defaultColdExtractionEnabled = false;
|
const bool defaultColdExtractionEnabled = false;
|
||||||
const float defaultColdExtractionMaxTempC = 30.0f;
|
const float defaultColdExtractionMaxTempC = 30.0f;
|
||||||
const float defaultColdExtractionPreInfusionSeconds = 30.0f;
|
const float defaultColdExtractionPreInfusionSeconds = 10.0f;
|
||||||
|
// Die Vorbenetzung laeuft bewusst SEHR sanft. Messung an der Maschine: heiss kommen nach
|
||||||
|
// 7 s Vorbenetzung 1-2 Tropfen, kalt bei voller Pumpenleistung rund 10 g duenne Bruehe -
|
||||||
|
// etwa zehnfacher Durchfluss trotz dreifacher Viskositaet. Kaltes Mehl quillt nicht und ist
|
||||||
|
// schlecht benetzbar; volle Leistung auf den trockenen Puck legt sofort Kanaele an, die sich
|
||||||
|
// - anders als heiss - nie wieder zudruecken. Der restliche Bezug laeuft dann daran vorbei.
|
||||||
|
const float defaultColdExtractionPreInfDutyPercent = 10.0f;
|
||||||
const uint16_t defaultColdExtractionPulsePeriodMs = 2000;
|
const uint16_t defaultColdExtractionPulsePeriodMs = 2000;
|
||||||
const float defaultColdExtractionDutyPercent = 30.0f;
|
// 20 % statt 30 %: Das kalte Kaffeebett ist deutlich durchlaessiger als ein heisses
|
||||||
|
// (kein Quellen, keine Feinanteil-Wanderung, keine geloesten Feststoffe, die es verdichten).
|
||||||
|
const float defaultColdExtractionDutyPercent = 20.0f;
|
||||||
const float defaultColdExtractionTargetGrams = 60.0f;
|
const float defaultColdExtractionTargetGrams = 60.0f;
|
||||||
const float defaultColdExtractionMaxSeconds = 300.0f;
|
const float defaultColdExtractionMaxSeconds = 300.0f;
|
||||||
const float defaultColdExtractionPumpMaxRunSec = 60.0f;
|
const float defaultColdExtractionPumpMaxRunSec = 60.0f;
|
||||||
@@ -853,12 +862,13 @@ enum ColdExtractionBlock : uint8_t {
|
|||||||
COLDEX_BLOCK_TOO_WARM = 7
|
COLDEX_BLOCK_TOO_WARM = 7
|
||||||
};
|
};
|
||||||
// Transiente Meldung (cxNotice): 0=keine, 1=Start abgewiesen, 2=Bezug wegen fehlenden
|
// Transiente Meldung (cxNotice): 0=keine, 1=Start abgewiesen, 2=Bezug wegen fehlenden
|
||||||
// Zulaufs beendet, 3=Umschalten waehrend eines Bezugs abgelehnt
|
// Zulaufs beendet, 3=Umschalten waehrend eines Bezugs abgelehnt, 4=ohne Waage aktiviert
|
||||||
enum ColdExtractionNotice : uint8_t {
|
enum ColdExtractionNotice : uint8_t {
|
||||||
COLDEX_NOTICE_NONE = 0,
|
COLDEX_NOTICE_NONE = 0,
|
||||||
COLDEX_NOTICE_START_REJECTED = 1,
|
COLDEX_NOTICE_START_REJECTED = 1,
|
||||||
COLDEX_NOTICE_NO_FLOW = 2,
|
COLDEX_NOTICE_NO_FLOW = 2,
|
||||||
COLDEX_NOTICE_BUSY = 3
|
COLDEX_NOTICE_BUSY = 3,
|
||||||
|
COLDEX_NOTICE_NO_SCALE = 4
|
||||||
};
|
};
|
||||||
uint8_t coldExtractionNotice = COLDEX_NOTICE_NONE;
|
uint8_t coldExtractionNotice = COLDEX_NOTICE_NONE;
|
||||||
|
|
||||||
@@ -1062,7 +1072,8 @@ const int EEPROM_ADDR_COLDEX_MAX_SECONDS = 965; // 4 Bytes (float) -> Ende
|
|||||||
const int EEPROM_ADDR_COLDEX_PUMP_MAX_RUN = 969; // 4 Bytes (float) -> Ende 972
|
const int EEPROM_ADDR_COLDEX_PUMP_MAX_RUN = 969; // 4 Bytes (float) -> Ende 972
|
||||||
const int EEPROM_ADDR_COLDEX_PUMP_REST = 973; // 4 Bytes (float) -> Ende 976
|
const int EEPROM_ADDR_COLDEX_PUMP_REST = 973; // 4 Bytes (float) -> Ende 976
|
||||||
const int EEPROM_ADDR_COLDEX_MODE_ACTIVE = 977; // 1 Byte (uint8_t) -> Ende 977
|
const int EEPROM_ADDR_COLDEX_MODE_ACTIVE = 977; // 1 Byte (uint8_t) -> Ende 977
|
||||||
// Naechste freie Adresse: 978 (Innerhalb EEPROM_SIZE=1024)
|
const int EEPROM_ADDR_COLDEX_PREINF_DUTY = 978; // 4 Bytes (float) -> Ende 981
|
||||||
|
// Naechste freie Adresse: 982 (Innerhalb EEPROM_SIZE=1024)
|
||||||
|
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* Eco-Mode Variablen
|
* Eco-Mode Variablen
|
||||||
@@ -2018,6 +2029,7 @@ static const char commonNav[] PROGMEM = R"rawliteral(
|
|||||||
<a href="/Profile">Profile</a>
|
<a href="/Profile">Profile</a>
|
||||||
<a href="/Timer">Timer</a>
|
<a href="/Timer">Timer</a>
|
||||||
<a href="/Brew-Control">Brew Control</a>
|
<a href="/Brew-Control">Brew Control</a>
|
||||||
|
<a href="/Cold-Extraction">Cold Extraction</a>
|
||||||
<a href="/Chart">Chart</a>
|
<a href="/Chart">Chart</a>
|
||||||
<a href="/Sensoren">Sensoren</a>
|
<a href="/Sensoren">Sensoren</a>
|
||||||
<a href="/Fast-Heat-Up">Fast-Heat-Up</a>
|
<a href="/Fast-Heat-Up">Fast-Heat-Up</a>
|
||||||
@@ -3049,6 +3061,7 @@ void resetToDefaults() {
|
|||||||
EEPROM.put(EEPROM_ADDR_COLDEX_PREINF_SEC, defaultColdExtractionPreInfusionSeconds);
|
EEPROM.put(EEPROM_ADDR_COLDEX_PREINF_SEC, defaultColdExtractionPreInfusionSeconds);
|
||||||
EEPROM.put(EEPROM_ADDR_COLDEX_PULSE_PERIOD_MS, defaultColdExtractionPulsePeriodMs);
|
EEPROM.put(EEPROM_ADDR_COLDEX_PULSE_PERIOD_MS, defaultColdExtractionPulsePeriodMs);
|
||||||
EEPROM.put(EEPROM_ADDR_COLDEX_DUTY, defaultColdExtractionDutyPercent);
|
EEPROM.put(EEPROM_ADDR_COLDEX_DUTY, defaultColdExtractionDutyPercent);
|
||||||
|
EEPROM.put(EEPROM_ADDR_COLDEX_PREINF_DUTY, defaultColdExtractionPreInfDutyPercent);
|
||||||
EEPROM.put(EEPROM_ADDR_COLDEX_TARGET_GRAMS, defaultColdExtractionTargetGrams);
|
EEPROM.put(EEPROM_ADDR_COLDEX_TARGET_GRAMS, defaultColdExtractionTargetGrams);
|
||||||
EEPROM.put(EEPROM_ADDR_COLDEX_MAX_SECONDS, defaultColdExtractionMaxSeconds);
|
EEPROM.put(EEPROM_ADDR_COLDEX_MAX_SECONDS, defaultColdExtractionMaxSeconds);
|
||||||
EEPROM.put(EEPROM_ADDR_COLDEX_PUMP_MAX_RUN, defaultColdExtractionPumpMaxRunSec);
|
EEPROM.put(EEPROM_ADDR_COLDEX_PUMP_MAX_RUN, defaultColdExtractionPumpMaxRunSec);
|
||||||
@@ -3137,6 +3150,7 @@ void resetToDefaults() {
|
|||||||
coldExtractionPreInfusionSeconds = defaultColdExtractionPreInfusionSeconds;
|
coldExtractionPreInfusionSeconds = defaultColdExtractionPreInfusionSeconds;
|
||||||
coldExtractionPulsePeriodMs = defaultColdExtractionPulsePeriodMs;
|
coldExtractionPulsePeriodMs = defaultColdExtractionPulsePeriodMs;
|
||||||
coldExtractionDutyPercent = defaultColdExtractionDutyPercent;
|
coldExtractionDutyPercent = defaultColdExtractionDutyPercent;
|
||||||
|
coldExtractionPreInfDutyPercent = defaultColdExtractionPreInfDutyPercent;
|
||||||
coldExtractionTargetGrams = defaultColdExtractionTargetGrams;
|
coldExtractionTargetGrams = defaultColdExtractionTargetGrams;
|
||||||
coldExtractionMaxSeconds = defaultColdExtractionMaxSeconds;
|
coldExtractionMaxSeconds = defaultColdExtractionMaxSeconds;
|
||||||
coldExtractionPumpMaxRunSec = defaultColdExtractionPumpMaxRunSec;
|
coldExtractionPumpMaxRunSec = defaultColdExtractionPumpMaxRunSec;
|
||||||
@@ -4046,6 +4060,13 @@ bool coldExtractionTemperatureOk() {
|
|||||||
return (InputWasser < (double)limit);
|
return (InputWasser < (double)limit);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Steht eine nutzbare Waage bereit? Ohne sie laeuft die kalte Extraktion rein zeitgesteuert:
|
||||||
|
// Zielgewicht und Stillstands-Erkennung greifen nicht, es bleibt nur die maximale Bezugsdauer.
|
||||||
|
// Bewusst kein Sperrgrund - ein kurz abgemeldeter HX711 soll die Funktion nicht blockieren.
|
||||||
|
bool coldExtractionScaleUsable() {
|
||||||
|
return scaleEnabled && scaleConnected;
|
||||||
|
}
|
||||||
|
|
||||||
// Allokationsfreie Freigabepruefung - wird in den JSON-Pushes (2x/s) verwendet.
|
// Allokationsfreie Freigabepruefung - wird in den JSON-Pushes (2x/s) verwendet.
|
||||||
bool coldExtractionConditionsOk() {
|
bool coldExtractionConditionsOk() {
|
||||||
return coldExtractionEnabled &&
|
return coldExtractionEnabled &&
|
||||||
@@ -4107,7 +4128,7 @@ bool setColdExtractionMode(bool enable, String& message) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (enable) {
|
if (enable) {
|
||||||
String reason = coldExtractionBlockReason();
|
String reason = coldExtractionArmBlockReason();
|
||||||
if (reason.length() > 0) {
|
if (reason.length() > 0) {
|
||||||
message = reason;
|
message = reason;
|
||||||
return false;
|
return false;
|
||||||
@@ -4120,6 +4141,22 @@ bool setColdExtractionMode(bool enable, String& message) {
|
|||||||
resetColdExtractionRuntime();
|
resetColdExtractionRuntime();
|
||||||
persistColdExtractionMode();
|
persistColdExtractionMode();
|
||||||
message = "Cold Extraction aktiviert - Wasserkreis heizt nicht (bleibt auch nach Standby/Neustart aktiv).";
|
message = "Cold Extraction aktiviert - Wasserkreis heizt nicht (bleibt auch nach Standby/Neustart aktiv).";
|
||||||
|
if (standbyModeActive) {
|
||||||
|
message += " Nach dem Aufwecken bleibt der Wasserkreis aus.";
|
||||||
|
} else if (!coldExtractionTemperatureOk()) {
|
||||||
|
// Scharfschalten bei warmem Kessel ist erlaubt (Heizung geht sofort aus), ein
|
||||||
|
// Bezug aber erst, wenn der Kessel unter die Schwelle gefallen ist.
|
||||||
|
message += " Der Kessel ist noch zu warm - er kuehlt jetzt ab, Bezuege sind bis dahin gesperrt.";
|
||||||
|
}
|
||||||
|
if (!coldExtractionScaleUsable()) {
|
||||||
|
// Ohne Waage faellt die Dosierung auf die maximale Bezugsdauer zurueck - das
|
||||||
|
// muss der Benutzer wissen, sonst wundert er sich ueber das Ergebnis.
|
||||||
|
message += " Achtung: keine Waage - Zielgewicht und Stillstands-Erkennung greifen nicht,"
|
||||||
|
" der Bezug endet erst nach der maximalen Bezugsdauer.";
|
||||||
|
coldExtractionBlockMessage = "Keine Waage: Bezug endet nach Zeit, nicht nach Gewicht.";
|
||||||
|
coldExtractionBlockMessageUntilMs = millis() + COLDEX_BLOCK_MESSAGE_MS;
|
||||||
|
coldExtractionNotice = COLDEX_NOTICE_NO_SCALE;
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4139,6 +4176,37 @@ bool coldExtractionShotAllowed() {
|
|||||||
return coldExtractionModeActive && coldExtractionConditionsOk();
|
return coldExtractionModeActive && coldExtractionConditionsOk();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/************************************************************************************
|
||||||
|
* Scharfschalten vs. Beziehen - bewusst zwei verschiedene Bedingungen
|
||||||
|
************************************************************************************
|
||||||
|
* Der Modus schaltet die Wasserheizung AB. Das an Standby oder an die Kesseltemperatur
|
||||||
|
* zu koppeln waere falsch herum: Im Standby kaeme man gar nicht an den Schalter, und
|
||||||
|
* nach dem Aufwecken heizt die Maschine sofort los - man muesste erst aufheizen lassen,
|
||||||
|
* um danach auf das Abkuehlen zu warten. Genau der Fall, den die Funktion vermeiden soll.
|
||||||
|
* Deshalb: Scharfschalten ist im Standby und bei warmem Kessel erlaubt; ueber den
|
||||||
|
* einzelnen Bezug entscheidet weiterhin coldExtractionShotAllowed().
|
||||||
|
************************************************************************************/
|
||||||
|
bool coldExtractionArmable() {
|
||||||
|
return coldExtractionEnabled && !wartungsModusAktiv && !cleaningAssistantActive &&
|
||||||
|
!autoTuneWasserActive && !autoTuneDampfActive;
|
||||||
|
}
|
||||||
|
|
||||||
|
String coldExtractionArmBlockReason() {
|
||||||
|
if (!coldExtractionEnabled) {
|
||||||
|
return "Cold Extraction ist nicht freigeschaltet.";
|
||||||
|
}
|
||||||
|
if (wartungsModusAktiv) {
|
||||||
|
return "Cold Extraction nicht moeglich: Wartungsmodus aktiv.";
|
||||||
|
}
|
||||||
|
if (cleaningAssistantActive) {
|
||||||
|
return "Cold Extraction nicht moeglich: Reinigungsassistent aktiv.";
|
||||||
|
}
|
||||||
|
if (autoTuneWasserActive || autoTuneDampfActive) {
|
||||||
|
return "Cold Extraction nicht moeglich: PID-Tuning laeuft.";
|
||||||
|
}
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
// Pumpensteuerung des kalten Bezugs: Vorbenetzung ungepulst, danach Puls-Duty.
|
// Pumpensteuerung des kalten Bezugs: Vorbenetzung ungepulst, danach Puls-Duty.
|
||||||
// Zusaetzlich Pumpenschutz ueber die kumulierte Einschaltzeit (Zwangspause) - die Olab
|
// Zusaetzlich Pumpenschutz ueber die kumulierte Einschaltzeit (Zwangspause) - die Olab
|
||||||
// hat zwar einen Thermoschutz, ein Auslösen mitten im Bezug wuerde aber den Shot
|
// hat zwar einen Thermoschutz, ein Auslösen mitten im Bezug wuerde aber den Shot
|
||||||
@@ -4171,10 +4239,12 @@ void applyColdExtractionPumpControl(unsigned long currentShotTimeMillis) {
|
|||||||
bool pumpOn;
|
bool pumpOn;
|
||||||
if (coldExtractionPumpResting) {
|
if (coldExtractionPumpResting) {
|
||||||
pumpOn = false;
|
pumpOn = false;
|
||||||
} else if (currentPreInfusionState == PI_PRE_BREW) {
|
|
||||||
pumpOn = true; // Vorbenetzung: volle Pumpenleistung
|
|
||||||
} else {
|
} else {
|
||||||
float duty = coldExtractionDutyPercent / 100.0f;
|
// Vorbenetzung und Hauptbezug pulsen beide - nur mit unterschiedlicher Leistung.
|
||||||
|
// Volle Leistung auf den trockenen kalten Puck legt Kanaele an, die sich mangels
|
||||||
|
// Quellung nie wieder schliessen (siehe Kommentar bei den Defaults).
|
||||||
|
float duty = ((currentPreInfusionState == PI_PRE_BREW) ? coldExtractionPreInfDutyPercent
|
||||||
|
: coldExtractionDutyPercent) / 100.0f;
|
||||||
duty = constrain(duty, COLDEX_DUTY_MIN / 100.0f, 1.0f);
|
duty = constrain(duty, COLDEX_DUTY_MIN / 100.0f, 1.0f);
|
||||||
uint16_t periodMs = coldExtractionPulsePeriodMs;
|
uint16_t periodMs = coldExtractionPulsePeriodMs;
|
||||||
if (periodMs < COLDEX_PULSE_PERIOD_MIN_MS || periodMs > COLDEX_PULSE_PERIOD_MAX_MS) {
|
if (periodMs < COLDEX_PULSE_PERIOD_MIN_MS || periodMs > COLDEX_PULSE_PERIOD_MAX_MS) {
|
||||||
@@ -4202,8 +4272,12 @@ bool coldExtractionStallDetected(float netWeight) {
|
|||||||
coldExtractionStallSinceMs = 0;
|
coldExtractionStallSinceMs = 0;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (coldExtractionPumpResting) {
|
// Waehrend der Vorbenetzung saettigt der Puck erst - da kommt naturgemaess nichts in
|
||||||
coldExtractionStallSinceMs = 0; // Pause ist kein Stillstand
|
// der Tasse an. Ohne diese Ausnahme wuerde die Erkennung jeden kalten Bezug abbrechen,
|
||||||
|
// sobald die Vorbenetzung laenger als COLDEX_STALL_TIMEOUT_MS dauert. Der Zaehler
|
||||||
|
// startet damit erst mit dem Hauptbezug.
|
||||||
|
if (coldExtractionPumpResting || currentPreInfusionState == PI_PRE_BREW) {
|
||||||
|
coldExtractionStallSinceMs = 0; // Pause/Vorbenetzung ist kein Stillstand
|
||||||
coldExtractionStallLastWeight = netWeight;
|
coldExtractionStallLastWeight = netWeight;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -4635,6 +4709,7 @@ void setup() {
|
|||||||
EEPROM.get(EEPROM_ADDR_COLDEX_PREINF_SEC, coldExtractionPreInfusionSeconds);
|
EEPROM.get(EEPROM_ADDR_COLDEX_PREINF_SEC, coldExtractionPreInfusionSeconds);
|
||||||
EEPROM.get(EEPROM_ADDR_COLDEX_PULSE_PERIOD_MS, coldExtractionPulsePeriodMs);
|
EEPROM.get(EEPROM_ADDR_COLDEX_PULSE_PERIOD_MS, coldExtractionPulsePeriodMs);
|
||||||
EEPROM.get(EEPROM_ADDR_COLDEX_DUTY, coldExtractionDutyPercent);
|
EEPROM.get(EEPROM_ADDR_COLDEX_DUTY, coldExtractionDutyPercent);
|
||||||
|
EEPROM.get(EEPROM_ADDR_COLDEX_PREINF_DUTY, coldExtractionPreInfDutyPercent);
|
||||||
EEPROM.get(EEPROM_ADDR_COLDEX_TARGET_GRAMS, coldExtractionTargetGrams);
|
EEPROM.get(EEPROM_ADDR_COLDEX_TARGET_GRAMS, coldExtractionTargetGrams);
|
||||||
EEPROM.get(EEPROM_ADDR_COLDEX_MAX_SECONDS, coldExtractionMaxSeconds);
|
EEPROM.get(EEPROM_ADDR_COLDEX_MAX_SECONDS, coldExtractionMaxSeconds);
|
||||||
EEPROM.get(EEPROM_ADDR_COLDEX_PUMP_MAX_RUN, coldExtractionPumpMaxRunSec);
|
EEPROM.get(EEPROM_ADDR_COLDEX_PUMP_MAX_RUN, coldExtractionPumpMaxRunSec);
|
||||||
@@ -4651,6 +4726,10 @@ void setup() {
|
|||||||
if (!isfinite(coldExtractionDutyPercent) || coldExtractionDutyPercent < COLDEX_DUTY_MIN || coldExtractionDutyPercent > COLDEX_DUTY_MAX) {
|
if (!isfinite(coldExtractionDutyPercent) || coldExtractionDutyPercent < COLDEX_DUTY_MIN || coldExtractionDutyPercent > COLDEX_DUTY_MAX) {
|
||||||
coldExtractionDutyPercent = defaultColdExtractionDutyPercent;
|
coldExtractionDutyPercent = defaultColdExtractionDutyPercent;
|
||||||
}
|
}
|
||||||
|
// Beim Update aus <= 5.3.5 steht hier 0xFFFFFFFF (NaN) -> Default greift automatisch
|
||||||
|
if (!isfinite(coldExtractionPreInfDutyPercent) || coldExtractionPreInfDutyPercent < COLDEX_DUTY_MIN || coldExtractionPreInfDutyPercent > COLDEX_DUTY_MAX) {
|
||||||
|
coldExtractionPreInfDutyPercent = defaultColdExtractionPreInfDutyPercent;
|
||||||
|
}
|
||||||
if (!isfinite(coldExtractionTargetGrams) || coldExtractionTargetGrams < COLDEX_TARGET_GRAMS_MIN || coldExtractionTargetGrams > COLDEX_TARGET_GRAMS_MAX) {
|
if (!isfinite(coldExtractionTargetGrams) || coldExtractionTargetGrams < COLDEX_TARGET_GRAMS_MIN || coldExtractionTargetGrams > COLDEX_TARGET_GRAMS_MAX) {
|
||||||
coldExtractionTargetGrams = defaultColdExtractionTargetGrams;
|
coldExtractionTargetGrams = defaultColdExtractionTargetGrams;
|
||||||
}
|
}
|
||||||
@@ -5097,6 +5176,8 @@ void setup() {
|
|||||||
// Routen für Brew Control
|
// Routen für Brew Control
|
||||||
asyncServer.on("/Brew-Control", HTTP_GET, handleBrewControl);
|
asyncServer.on("/Brew-Control", HTTP_GET, handleBrewControl);
|
||||||
asyncServer.on("/saveBrewControl", HTTP_POST, handleSaveBrewControl);
|
asyncServer.on("/saveBrewControl", HTTP_POST, handleSaveBrewControl);
|
||||||
|
asyncServer.on("/Cold-Extraction", HTTP_GET, handleColdExtraction);
|
||||||
|
asyncServer.on("/saveColdExtraction", HTTP_POST, handleSaveColdExtraction);
|
||||||
|
|
||||||
dashboardWs.onEvent(onDashboardWsEvent);
|
dashboardWs.onEvent(onDashboardWsEvent);
|
||||||
asyncServer.addHandler(&dashboardWs);
|
asyncServer.addHandler(&dashboardWs);
|
||||||
@@ -7138,34 +7219,70 @@ static const char brewControlPI_Fields[] PROGMEM = R"rawliteral(
|
|||||||
)rawliteral";
|
)rawliteral";
|
||||||
|
|
||||||
// --- Cold Extraction (CX) Chunks ---
|
// --- Cold Extraction (CX) Chunks ---
|
||||||
static const char brewControlCX_H3[] PROGMEM = R"rawliteral(<h3>Cold Extraction (kalte Extraktion)</h3>)rawliteral";
|
// Cold Extraction hat eine eigene Seite (/Cold-Extraction); auf /Brew-Control steht nur der Verweis.
|
||||||
|
static const char brewControlCX_Link[] PROGMEM = R"rawliteral(
|
||||||
|
<h3>Cold Extraction (kalte Extraktion)</h3>
|
||||||
|
Die Einstellungen der kalten Extraktion stehen auf einer <a href="/Cold-Extraction">eigenen Seite</a>.<br><br>
|
||||||
|
)rawliteral";
|
||||||
|
|
||||||
|
static const char coldExHead[] PROGMEM = R"rawliteral(
|
||||||
|
<!DOCTYPE html><html><head><title>Cold Extraction</title><meta name='theme-color' content='#000000'><meta name='viewport' content='width=device-width, initial-scale=1.0'>
|
||||||
|
)rawliteral";
|
||||||
|
static const char coldExHeadEnd[] PROGMEM = R"rawliteral(</head>)rawliteral";
|
||||||
|
static const char coldExBodyStart[] PROGMEM = R"rawliteral(
|
||||||
|
<body><h1>Cold Extraction</h1>
|
||||||
|
<form action='/saveColdExtraction' method='POST'>
|
||||||
|
Kalte Extraktion: Bezug mit kaltem Wasser, gepulster Pumpe und Bezugszeiten im Minutenbereich.<br>
|
||||||
|
Die Maschine hat keinen Bypass um den Wasserkessel - kaltes Wasser kommt nur bei kaltem Kessel am Puck an.
|
||||||
|
Deshalb ist die Funktion nur unterhalb der Freigabetemperatur beziehbar, praktisch also aus dem kalten
|
||||||
|
Zustand heraus. Solange der Modus aktiv ist, heizt der Wasserkreis nicht; der Dampfkreis bleibt unberührt.<br>
|
||||||
|
Ein- und ausgeschaltet wird der Modus auf dem Dashboard oder am Touch-Display - hier stehen nur die Parameter.<br><br>
|
||||||
|
)rawliteral";
|
||||||
|
static const char coldExCX_H3[] PROGMEM = R"rawliteral(<h3>Grundeinstellung</h3>)rawliteral";
|
||||||
static const char brewControlCX_ToggleContainerStart[] PROGMEM = R"rawliteral(<div class="toggle-switch-container"><span class="toggle-switch-label-text">Freischalten:</span><label class="toggle-switch"><input type="checkbox" id="cxEnabled" name="cxEnabled" value="1")rawliteral";
|
static const char brewControlCX_ToggleContainerStart[] PROGMEM = R"rawliteral(<div class="toggle-switch-container"><span class="toggle-switch-label-text">Freischalten:</span><label class="toggle-switch"><input type="checkbox" id="cxEnabled" name="cxEnabled" value="1")rawliteral";
|
||||||
static const char brewControlCX_ToggleContainerEnd[] PROGMEM = R"rawliteral(><span class="toggle-slider"></span></label></div>)rawliteral";
|
static const char brewControlCX_ToggleContainerEnd[] PROGMEM = R"rawliteral(><span class="toggle-slider"></span></label></div>)rawliteral";
|
||||||
|
static const char coldExFormEnd[] PROGMEM = R"rawliteral(
|
||||||
|
<input type='submit' value='Einstellungen speichern'>
|
||||||
|
</form>
|
||||||
|
</body></html>
|
||||||
|
)rawliteral";
|
||||||
static const char brewControlCX_Fields[] PROGMEM = R"rawliteral(
|
static const char brewControlCX_Fields[] PROGMEM = R"rawliteral(
|
||||||
<label for='cxMaxTemp'>Freigabe bis Wassertemperatur (°C):</label>
|
<label for='cxMaxTemp'>Freigabe bis Wassertemperatur (°C):</label>
|
||||||
<input type='number' min='10.0' max='40.0' step='0.5' id='cxMaxTemp' name='cxMaxTemp' value='{CX_MAX_TEMP}' required>
|
<input type='number' min='10.0' max='40.0' step='0.5' id='cxMaxTemp' name='cxMaxTemp' value='{CX_MAX_TEMP}' required>
|
||||||
<label for='cxPreInf'>Vorbenetzung (Sekunden):</label>
|
<small class="toggle-description-input">(Oberhalb dieser Temperatur bleibt der Modus zwar schaltbar, Bezüge sind aber gesperrt.)</small>
|
||||||
|
{CX_STATUS_MSG}
|
||||||
|
|
||||||
|
<h3>Vorbenetzung</h3>
|
||||||
|
<label for='cxPreInf'>Dauer (Sekunden):</label>
|
||||||
<input type='number' min='0.0' max='120.0' step='1.0' id='cxPreInf' name='cxPreInf' value='{CX_PREINF}' required>
|
<input type='number' min='0.0' max='120.0' step='1.0' id='cxPreInf' name='cxPreInf' value='{CX_PREINF}' required>
|
||||||
|
<label for='cxPreInfDuty'>Pumpenleistung (%):</label>
|
||||||
|
<input type='number' min='5.0' max='100.0' step='1.0' id='cxPreInfDuty' name='cxPreInfDuty' value='{CX_PREINF_DUTY}' required>
|
||||||
|
<small class="toggle-description-input">(Deutlich schwächer einstellen als den Hauptbezug: Kaltes Kaffeemehl quillt nicht und
|
||||||
|
ist schlecht benetzbar. Volle Leistung auf den trockenen Puck legt sofort Kanäle an, die sich - anders als bei
|
||||||
|
heißem Bezug - nie wieder schließen; der restliche Bezug läuft dann daran vorbei statt zu extrahieren.)</small>
|
||||||
|
|
||||||
|
<h3>Hauptbezug</h3>
|
||||||
<label for='cxPulseMs'>Pulsperiode (ms):</label>
|
<label for='cxPulseMs'>Pulsperiode (ms):</label>
|
||||||
<input type='number' min='200' max='5000' step='50' id='cxPulseMs' name='cxPulseMs' value='{CX_PULSE_MS}' required>
|
<input type='number' min='200' max='5000' step='50' id='cxPulseMs' name='cxPulseMs' value='{CX_PULSE_MS}' required>
|
||||||
<label for='cxDuty'>Pumpenleistung (%):</label>
|
<label for='cxDuty'>Pumpenleistung (%):</label>
|
||||||
<input type='number' min='5.0' max='100.0' step='1.0' id='cxDuty' name='cxDuty' value='{CX_DUTY}' required>
|
<input type='number' min='5.0' max='100.0' step='1.0' id='cxDuty' name='cxDuty' value='{CX_DUTY}' required>
|
||||||
<label for='cxTarget'>Zielgewicht (Gramm):</label>
|
<small class="toggle-description-input">(Das kalte Kaffeebett ist erheblich durchlässiger als ein heißes - niedrige Werte
|
||||||
|
sind normal. Läuft der Bezug zu schnell durch: Leistung senken und feiner mahlen.)</small>
|
||||||
|
|
||||||
|
<h3>Bezugsende</h3>
|
||||||
|
<label for='cxTarget'>Zielgewicht (Gramm, nur mit Waage wirksam):</label>
|
||||||
<input type='number' min='10.0' max='300.0' step='1.0' id='cxTarget' name='cxTarget' value='{CX_TARGET}' required>
|
<input type='number' min='10.0' max='300.0' step='1.0' id='cxTarget' name='cxTarget' value='{CX_TARGET}' required>
|
||||||
<label for='cxMaxSecs'>Maximale Bezugsdauer (Sekunden):</label>
|
<label for='cxMaxSecs'>Maximale Bezugsdauer (Sekunden):</label>
|
||||||
<input type='number' min='30.0' max='900.0' step='5.0' id='cxMaxSecs' name='cxMaxSecs' value='{CX_MAX_SECS}' required>
|
<input type='number' min='30.0' max='900.0' step='5.0' id='cxMaxSecs' name='cxMaxSecs' value='{CX_MAX_SECS}' required>
|
||||||
<label for='cxPumpMaxRun'>Pumpenschutz: max. Laufzeit (Sekunden):</label>
|
<small class="toggle-description-input">(Ohne Waage ist das Zielgewicht wirkungslos und die maximale Bezugsdauer wird zur Dosierung.)</small>
|
||||||
|
|
||||||
|
<h3>Pumpenschutz</h3>
|
||||||
|
<label for='cxPumpMaxRun'>Max. Laufzeit (Sekunden):</label>
|
||||||
<input type='number' min='10.0' max='300.0' step='5.0' id='cxPumpMaxRun' name='cxPumpMaxRun' value='{CX_PUMP_MAX_RUN}' required>
|
<input type='number' min='10.0' max='300.0' step='5.0' id='cxPumpMaxRun' name='cxPumpMaxRun' value='{CX_PUMP_MAX_RUN}' required>
|
||||||
<label for='cxPumpRest'>Pumpenschutz: Zwangspause (Sekunden):</label>
|
<label for='cxPumpRest'>Zwangspause (Sekunden):</label>
|
||||||
<input type='number' min='0.0' max='120.0' step='1.0' id='cxPumpRest' name='cxPumpRest' value='{CX_PUMP_REST}' required>
|
<input type='number' min='0.0' max='120.0' step='1.0' id='cxPumpRest' name='cxPumpRest' value='{CX_PUMP_REST}' required>
|
||||||
<small class="toggle-description-input">(Die Maschine hat keinen Bypass um den Wasserkessel: Kaltes Wasser kommt nur bei kaltem
|
<small class="toggle-description-input">(Gezählt wird die kumulierte Einschaltzeit der Pumpe, nicht die Bezugsdauer. Nach Ablauf
|
||||||
Kessel am Puck an. Deshalb ist die kalte Extraktion nur unterhalb der Freigabetemperatur möglich, praktisch also
|
legt die Steuerung eine Zwangspause ein; der Bezug läuft dabei weiter.)</small>
|
||||||
aus dem kalten Zustand heraus. Solange der Modus aktiv ist, heizt der Wasserkreis nicht - der Dampfkreis bleibt
|
|
||||||
unberührt und darf weiter heizen. Die Pumpenlaufzeit wird kumuliert gezählt; nach der eingestellten
|
|
||||||
Laufzeit legt die Steuerung eine Zwangspause ein. Der Modus selbst wird auf dem Dashboard bzw. am Touch-Display
|
|
||||||
ein- und ausgeschaltet und bleibt über Standby und Neustart hinweg aktiv, bis er dort wieder ausgeschaltet
|
|
||||||
wird - solange heizt der Wasserkreis nicht.)</small>
|
|
||||||
{CX_STATUS_MSG}
|
|
||||||
<br>
|
<br>
|
||||||
)rawliteral";
|
)rawliteral";
|
||||||
|
|
||||||
@@ -7280,42 +7397,8 @@ void handleBrewControl(AsyncWebServerRequest *request) {
|
|||||||
response->print(piFieldsHtml);
|
response->print(piFieldsHtml);
|
||||||
yield();
|
yield();
|
||||||
|
|
||||||
// --- Cold Extraction Sektion ---
|
// Cold Extraction hat eine eigene Seite (/Cold-Extraction) - hier nur der Verweis
|
||||||
response->print(FPSTR(brewControlCX_H3));
|
response->print(FPSTR(brewControlCX_Link));
|
||||||
response->print(FPSTR(brewControlCX_ToggleContainerStart));
|
|
||||||
if (coldExtractionEnabled) {
|
|
||||||
response->print(F(" checked"));
|
|
||||||
}
|
|
||||||
response->print(FPSTR(brewControlCX_ToggleContainerEnd));
|
|
||||||
|
|
||||||
String cxFieldsHtml = FPSTR(brewControlCX_Fields);
|
|
||||||
snprintf(buffer, sizeof(buffer), "%.1f", coldExtractionMaxTempC);
|
|
||||||
cxFieldsHtml.replace("{CX_MAX_TEMP}", buffer);
|
|
||||||
snprintf(buffer, sizeof(buffer), "%.1f", coldExtractionPreInfusionSeconds);
|
|
||||||
cxFieldsHtml.replace("{CX_PREINF}", buffer);
|
|
||||||
snprintf(buffer, sizeof(buffer), "%u", (unsigned int)coldExtractionPulsePeriodMs);
|
|
||||||
cxFieldsHtml.replace("{CX_PULSE_MS}", buffer);
|
|
||||||
snprintf(buffer, sizeof(buffer), "%.1f", coldExtractionDutyPercent);
|
|
||||||
cxFieldsHtml.replace("{CX_DUTY}", buffer);
|
|
||||||
snprintf(buffer, sizeof(buffer), "%.1f", coldExtractionTargetGrams);
|
|
||||||
cxFieldsHtml.replace("{CX_TARGET}", buffer);
|
|
||||||
snprintf(buffer, sizeof(buffer), "%.1f", coldExtractionMaxSeconds);
|
|
||||||
cxFieldsHtml.replace("{CX_MAX_SECS}", buffer);
|
|
||||||
snprintf(buffer, sizeof(buffer), "%.1f", coldExtractionPumpMaxRunSec);
|
|
||||||
cxFieldsHtml.replace("{CX_PUMP_MAX_RUN}", buffer);
|
|
||||||
snprintf(buffer, sizeof(buffer), "%.1f", coldExtractionPumpRestSec);
|
|
||||||
cxFieldsHtml.replace("{CX_PUMP_REST}", buffer);
|
|
||||||
if (coldExtractionEnabled) {
|
|
||||||
String cxStatus = coldExtractionBlockReason();
|
|
||||||
if (cxStatus.length() > 0) {
|
|
||||||
cxFieldsHtml.replace("{CX_STATUS_MSG}", "<br><b><small style='color: #FFCC00;'>" + cxStatus + "</small></b>");
|
|
||||||
} else {
|
|
||||||
cxFieldsHtml.replace("{CX_STATUS_MSG}", "<br><b><small style='color: #66CC66;'>Kalte Extraktion derzeit möglich.</small></b>");
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
cxFieldsHtml.replace("{CX_STATUS_MSG}", "");
|
|
||||||
}
|
|
||||||
response->print(cxFieldsHtml);
|
|
||||||
yield();
|
yield();
|
||||||
|
|
||||||
// --- Dampf-Timer Sektion ---
|
// --- Dampf-Timer Sektion ---
|
||||||
@@ -7386,6 +7469,8 @@ struct BrewControlUpdate {
|
|||||||
uint16_t cxPulseMs = 0;
|
uint16_t cxPulseMs = 0;
|
||||||
bool hasCXDuty = false;
|
bool hasCXDuty = false;
|
||||||
float cxDuty = 0.0f;
|
float cxDuty = 0.0f;
|
||||||
|
bool hasCXPreInfDuty = false;
|
||||||
|
float cxPreInfDuty = 0.0f;
|
||||||
bool hasCXTarget = false;
|
bool hasCXTarget = false;
|
||||||
float cxTarget = 0.0f;
|
float cxTarget = 0.0f;
|
||||||
bool hasCXMaxSecs = false;
|
bool hasCXMaxSecs = false;
|
||||||
@@ -7551,6 +7636,14 @@ bool applyBrewControlUpdate(const BrewControlUpdate& update) {
|
|||||||
coldExtractionConfigChanged = true;
|
coldExtractionConfigChanged = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (update.hasCXPreInfDuty) {
|
||||||
|
float v = update.cxPreInfDuty;
|
||||||
|
if (isfinite(v) && v >= COLDEX_DUTY_MIN && v <= COLDEX_DUTY_MAX && fabs(v - coldExtractionPreInfDutyPercent) > 0.01f) {
|
||||||
|
coldExtractionPreInfDutyPercent = v;
|
||||||
|
EEPROM.put(EEPROM_ADDR_COLDEX_PREINF_DUTY, coldExtractionPreInfDutyPercent);
|
||||||
|
coldExtractionConfigChanged = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
if (update.hasCXTarget) {
|
if (update.hasCXTarget) {
|
||||||
float v = update.cxTarget;
|
float v = update.cxTarget;
|
||||||
if (isfinite(v) && v >= COLDEX_TARGET_GRAMS_MIN && v <= COLDEX_TARGET_GRAMS_MAX && fabs(v - coldExtractionTargetGrams) > 0.01f) {
|
if (isfinite(v) && v >= COLDEX_TARGET_GRAMS_MIN && v <= COLDEX_TARGET_GRAMS_MAX && fabs(v - coldExtractionTargetGrams) > 0.01f) {
|
||||||
@@ -7596,6 +7689,106 @@ bool applyBrewControlUpdate(const BrewControlUpdate& update) {
|
|||||||
return changed || flowGuardConfigChanged || coldExtractionConfigChanged;
|
return changed || flowGuardConfigChanged || coldExtractionConfigChanged;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/************************************************************************************
|
||||||
|
* Cold Extraction: eigene Seite (GET /Cold-Extraction, POST /saveColdExtraction)
|
||||||
|
* Bewusst getrennt von /Brew-Control - die Parameter gehoeren logisch zusammen und die
|
||||||
|
* Brew-Control-Seite war mit dem Block darunter unuebersichtlich geworden.
|
||||||
|
************************************************************************************/
|
||||||
|
void handleColdExtraction(AsyncWebServerRequest *request) {
|
||||||
|
char buffer[16];
|
||||||
|
AsyncResponseStream *response = request->beginResponseStream("text/html; charset=utf-8");
|
||||||
|
|
||||||
|
response->print(FPSTR(coldExHead));
|
||||||
|
response->print(FPSTR(commonStyle));
|
||||||
|
response->print(FPSTR(coldExHeadEnd));
|
||||||
|
response->print(FPSTR(commonNav));
|
||||||
|
response->print(FPSTR(coldExBodyStart));
|
||||||
|
yield();
|
||||||
|
|
||||||
|
response->print(FPSTR(coldExCX_H3));
|
||||||
|
response->print(FPSTR(brewControlCX_ToggleContainerStart));
|
||||||
|
if (coldExtractionEnabled) {
|
||||||
|
response->print(F(" checked"));
|
||||||
|
}
|
||||||
|
response->print(FPSTR(brewControlCX_ToggleContainerEnd));
|
||||||
|
|
||||||
|
String cxFieldsHtml = FPSTR(brewControlCX_Fields);
|
||||||
|
snprintf(buffer, sizeof(buffer), "%.1f", coldExtractionMaxTempC);
|
||||||
|
cxFieldsHtml.replace("{CX_MAX_TEMP}", buffer);
|
||||||
|
snprintf(buffer, sizeof(buffer), "%.1f", coldExtractionPreInfusionSeconds);
|
||||||
|
cxFieldsHtml.replace("{CX_PREINF}", buffer);
|
||||||
|
snprintf(buffer, sizeof(buffer), "%.1f", coldExtractionPreInfDutyPercent);
|
||||||
|
cxFieldsHtml.replace("{CX_PREINF_DUTY}", buffer);
|
||||||
|
snprintf(buffer, sizeof(buffer), "%u", (unsigned int)coldExtractionPulsePeriodMs);
|
||||||
|
cxFieldsHtml.replace("{CX_PULSE_MS}", buffer);
|
||||||
|
snprintf(buffer, sizeof(buffer), "%.1f", coldExtractionDutyPercent);
|
||||||
|
cxFieldsHtml.replace("{CX_DUTY}", buffer);
|
||||||
|
snprintf(buffer, sizeof(buffer), "%.1f", coldExtractionTargetGrams);
|
||||||
|
cxFieldsHtml.replace("{CX_TARGET}", buffer);
|
||||||
|
snprintf(buffer, sizeof(buffer), "%.1f", coldExtractionMaxSeconds);
|
||||||
|
cxFieldsHtml.replace("{CX_MAX_SECS}", buffer);
|
||||||
|
snprintf(buffer, sizeof(buffer), "%.1f", coldExtractionPumpMaxRunSec);
|
||||||
|
cxFieldsHtml.replace("{CX_PUMP_MAX_RUN}", buffer);
|
||||||
|
snprintf(buffer, sizeof(buffer), "%.1f", coldExtractionPumpRestSec);
|
||||||
|
cxFieldsHtml.replace("{CX_PUMP_REST}", buffer);
|
||||||
|
|
||||||
|
if (coldExtractionEnabled) {
|
||||||
|
String cxStatus;
|
||||||
|
// Waagen-Hinweis zuerst: er gilt unabhaengig von der Temperatur-Freigabe und
|
||||||
|
// erklaert, warum das Zielgewicht weiter unten wirkungslos ist.
|
||||||
|
if (!coldExtractionScaleUsable()) {
|
||||||
|
cxStatus += "<br><b><small style='color: #FFCC00;'>Keine Waage aktiv/verbunden: Zielgewicht und "
|
||||||
|
"Stillstands-Erkennung greifen nicht. Der Bezug endet erst nach der maximalen "
|
||||||
|
"Bezugsdauer - diesen Wert dann als Dosierung verstehen.</small></b>";
|
||||||
|
}
|
||||||
|
String reason = coldExtractionBlockReason();
|
||||||
|
if (reason.length() > 0) {
|
||||||
|
cxStatus += "<br><b><small style='color: #FFCC00;'>" + reason + "</small></b>";
|
||||||
|
} else {
|
||||||
|
cxStatus += "<br><b><small style='color: #66CC66;'>Kalte Extraktion derzeit möglich.</small></b>";
|
||||||
|
}
|
||||||
|
cxFieldsHtml.replace("{CX_STATUS_MSG}", cxStatus);
|
||||||
|
} else {
|
||||||
|
cxFieldsHtml.replace("{CX_STATUS_MSG}", "");
|
||||||
|
}
|
||||||
|
response->print(cxFieldsHtml);
|
||||||
|
yield();
|
||||||
|
|
||||||
|
response->print(FPSTR(coldExFormEnd));
|
||||||
|
request->send(response);
|
||||||
|
}
|
||||||
|
|
||||||
|
void handleSaveColdExtraction(AsyncWebServerRequest *request) {
|
||||||
|
BrewControlUpdate update; // nur die cx-Felder setzen, alles andere bleibt unangetastet
|
||||||
|
|
||||||
|
update.hasCXEnabled = true;
|
||||||
|
update.cxEnabled = request->hasArg("cxEnabled");
|
||||||
|
update.hasCXMaxTemp = request->hasArg("cxMaxTemp");
|
||||||
|
if (update.hasCXMaxTemp) { update.cxMaxTemp = request->arg("cxMaxTemp").toFloat(); }
|
||||||
|
update.hasCXPreInf = request->hasArg("cxPreInf");
|
||||||
|
if (update.hasCXPreInf) { update.cxPreInf = request->arg("cxPreInf").toFloat(); }
|
||||||
|
update.hasCXPreInfDuty = request->hasArg("cxPreInfDuty");
|
||||||
|
if (update.hasCXPreInfDuty) { update.cxPreInfDuty = request->arg("cxPreInfDuty").toFloat(); }
|
||||||
|
update.hasCXPulseMs = request->hasArg("cxPulseMs");
|
||||||
|
if (update.hasCXPulseMs) { update.cxPulseMs = (uint16_t)request->arg("cxPulseMs").toInt(); }
|
||||||
|
update.hasCXDuty = request->hasArg("cxDuty");
|
||||||
|
if (update.hasCXDuty) { update.cxDuty = request->arg("cxDuty").toFloat(); }
|
||||||
|
update.hasCXTarget = request->hasArg("cxTarget");
|
||||||
|
if (update.hasCXTarget) { update.cxTarget = request->arg("cxTarget").toFloat(); }
|
||||||
|
update.hasCXMaxSecs = request->hasArg("cxMaxSecs");
|
||||||
|
if (update.hasCXMaxSecs) { update.cxMaxSecs = request->arg("cxMaxSecs").toFloat(); }
|
||||||
|
update.hasCXPumpMaxRun = request->hasArg("cxPumpMaxRun");
|
||||||
|
if (update.hasCXPumpMaxRun) { update.cxPumpMaxRun = request->arg("cxPumpMaxRun").toFloat(); }
|
||||||
|
update.hasCXPumpRest = request->hasArg("cxPumpRest");
|
||||||
|
if (update.hasCXPumpRest) { update.cxPumpRest = request->arg("cxPumpRest").toFloat(); }
|
||||||
|
|
||||||
|
applyBrewControlUpdate(update);
|
||||||
|
|
||||||
|
AsyncWebServerResponse *response = request->beginResponse(303);
|
||||||
|
response->addHeader("Location", "/Cold-Extraction");
|
||||||
|
request->send(response);
|
||||||
|
}
|
||||||
|
|
||||||
void handleSaveBrewControl(AsyncWebServerRequest *request) {
|
void handleSaveBrewControl(AsyncWebServerRequest *request) {
|
||||||
BrewControlUpdate update;
|
BrewControlUpdate update;
|
||||||
|
|
||||||
@@ -7631,25 +7824,9 @@ void handleSaveBrewControl(AsyncWebServerRequest *request) {
|
|||||||
update.hasSBTSecs = request->hasArg("sbtSecs");
|
update.hasSBTSecs = request->hasArg("sbtSecs");
|
||||||
if (update.hasSBTSecs) { update.sbtSecs = request->arg("sbtSecs").toFloat(); }
|
if (update.hasSBTSecs) { update.sbtSecs = request->arg("sbtSecs").toFloat(); }
|
||||||
|
|
||||||
update.hasCXEnabled = true;
|
// Cold Extraction wird hier bewusst NICHT angefasst - die Felder stehen auf
|
||||||
update.cxEnabled = request->hasArg("cxEnabled");
|
// /Cold-Extraction. Wuerde man sie hier weiter auswerten, wuerde ein Speichern auf
|
||||||
update.hasCXMaxTemp = request->hasArg("cxMaxTemp");
|
// dieser Seite die Freischaltung abschalten (Checkbox fehlt im Formular = "aus").
|
||||||
if (update.hasCXMaxTemp) { update.cxMaxTemp = request->arg("cxMaxTemp").toFloat(); }
|
|
||||||
update.hasCXPreInf = request->hasArg("cxPreInf");
|
|
||||||
if (update.hasCXPreInf) { update.cxPreInf = request->arg("cxPreInf").toFloat(); }
|
|
||||||
update.hasCXPulseMs = request->hasArg("cxPulseMs");
|
|
||||||
if (update.hasCXPulseMs) { update.cxPulseMs = (uint16_t)request->arg("cxPulseMs").toInt(); }
|
|
||||||
update.hasCXDuty = request->hasArg("cxDuty");
|
|
||||||
if (update.hasCXDuty) { update.cxDuty = request->arg("cxDuty").toFloat(); }
|
|
||||||
update.hasCXTarget = request->hasArg("cxTarget");
|
|
||||||
if (update.hasCXTarget) { update.cxTarget = request->arg("cxTarget").toFloat(); }
|
|
||||||
update.hasCXMaxSecs = request->hasArg("cxMaxSecs");
|
|
||||||
if (update.hasCXMaxSecs) { update.cxMaxSecs = request->arg("cxMaxSecs").toFloat(); }
|
|
||||||
update.hasCXPumpMaxRun = request->hasArg("cxPumpMaxRun");
|
|
||||||
if (update.hasCXPumpMaxRun) { update.cxPumpMaxRun = request->arg("cxPumpMaxRun").toFloat(); }
|
|
||||||
update.hasCXPumpRest = request->hasArg("cxPumpRest");
|
|
||||||
if (update.hasCXPumpRest) { update.cxPumpRest = request->arg("cxPumpRest").toFloat(); }
|
|
||||||
|
|
||||||
applyBrewControlUpdate(update);
|
applyBrewControlUpdate(update);
|
||||||
|
|
||||||
AsyncWebServerResponse *response = request->beginResponse(303);
|
AsyncWebServerResponse *response = request->beginResponse(303);
|
||||||
@@ -14975,17 +15152,28 @@ static const char dashboardJavaScript[] PROGMEM = R"rawliteral(
|
|||||||
if (coldexRow) { coldexRow.style.display = (data.cxEnabled === true) ? '' : 'none'; }
|
if (coldexRow) { coldexRow.style.display = (data.cxEnabled === true) ? '' : 'none'; }
|
||||||
if (coldexToggleEl) {
|
if (coldexToggleEl) {
|
||||||
updateToggleState(coldexToggleEl, data.cxActive);
|
updateToggleState(coldexToggleEl, data.cxActive);
|
||||||
coldexToggleEl.disabled = (data.cxEnabled !== true) || (data.cxActive !== true && data.cxAllowed !== true);
|
// Umschalten haengt an cxArmable, NICHT an cxAllowed: Der Modus muss auch im
|
||||||
|
// Standby und bei noch warmem Kessel scharf zu stellen sein.
|
||||||
|
coldexToggleEl.disabled = (data.cxEnabled !== true) || (data.cxArmable !== true);
|
||||||
}
|
}
|
||||||
if (coldexHint) {
|
if (coldexHint) {
|
||||||
let hintText = '';
|
let hintText = '';
|
||||||
if (data.cxEnabled === true && data.cxAllowed !== true && data.cxActive !== true) {
|
if (data.cxEnabled === true && data.cxAllowed !== true) {
|
||||||
if (typeof data.tempW === 'number' && typeof data.cxMaxTemp === 'number' && data.tempW >= data.cxMaxTemp) {
|
// Gilt auch bei aktivem Modus: dann ist er scharf, aber der Bezug noch gesperrt
|
||||||
hintText = 'Wasserkessel zu warm (' + data.tempW.toFixed(1) + ' °C, benötigt < ' + data.cxMaxTemp.toFixed(1) + ' °C).';
|
const prefix = (data.cxActive === true) ? 'Modus aktiv, Bezug noch gesperrt: ' : '';
|
||||||
|
if (data.standbyActive === true) {
|
||||||
|
hintText = prefix + 'Standby aktiv - Bezug erst nach dem Aufwecken.';
|
||||||
|
} else if (typeof data.tempW === 'number' && typeof data.cxMaxTemp === 'number' && data.tempW >= data.cxMaxTemp) {
|
||||||
|
hintText = prefix + 'Wasserkessel zu warm (' + data.tempW.toFixed(1) + ' °C, benötigt < ' + data.cxMaxTemp.toFixed(1) + ' °C).';
|
||||||
} else {
|
} else {
|
||||||
hintText = 'Cold Extraction derzeit nicht möglich.';
|
hintText = prefix + 'Bezug derzeit nicht möglich.';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Waagen-Hinweis gilt zusätzlich und unabhängig von der Temperatur-Freigabe
|
||||||
|
if (data.cxEnabled === true && (data.scaleEnabled !== true || data.scaleConnected !== true)) {
|
||||||
|
if (hintText) { hintText += ' '; }
|
||||||
|
hintText += 'Ohne Waage: Bezug endet nach Zeit, nicht nach Gewicht.';
|
||||||
|
}
|
||||||
coldexHint.textContent = hintText;
|
coldexHint.textContent = hintText;
|
||||||
coldexHint.style.display = hintText ? '' : 'none';
|
coldexHint.style.display = hintText ? '' : 'none';
|
||||||
}
|
}
|
||||||
@@ -16031,7 +16219,9 @@ void buildDashboardJson(char *buffer, size_t bufferSize) {
|
|||||||
}
|
}
|
||||||
statusKey = "brewing";
|
statusKey = "brewing";
|
||||||
} else if (coldExtractionModeActive) {
|
} else if (coldExtractionModeActive) {
|
||||||
statusText = "Cold Extraction bereit (Wasserkreis heizt nicht)";
|
statusText = coldExtractionScaleUsable()
|
||||||
|
? "Cold Extraction bereit (Wasserkreis heizt nicht)"
|
||||||
|
: "Cold Extraction bereit (ohne Waage: Zeitsteuerung)";
|
||||||
statusKey = "coldextraction";
|
statusKey = "coldextraction";
|
||||||
} else if (ecoModeAktiv && ecoSwitchActive) {
|
} else if (ecoModeAktiv && ecoSwitchActive) {
|
||||||
statusText = dynamicEcoActive ? "Eco+ Modus aktiv (Schalter)" : "Eco Modus aktiv (Schalter)";
|
statusText = dynamicEcoActive ? "Eco+ Modus aktiv (Schalter)" : "Eco Modus aktiv (Schalter)";
|
||||||
@@ -16148,6 +16338,8 @@ void buildDashboardJson(char *buffer, size_t bufferSize) {
|
|||||||
offset += snprintf(buffer + offset, bufferSize - offset, "\"cxEnabled\":%s,", coldExtractionEnabled ? "true" : "false");
|
offset += snprintf(buffer + offset, bufferSize - offset, "\"cxEnabled\":%s,", coldExtractionEnabled ? "true" : "false");
|
||||||
offset += snprintf(buffer + offset, bufferSize - offset, "\"cxActive\":%s,", coldExtractionModeActive ? "true" : "false");
|
offset += snprintf(buffer + offset, bufferSize - offset, "\"cxActive\":%s,", coldExtractionModeActive ? "true" : "false");
|
||||||
offset += snprintf(buffer + offset, bufferSize - offset, "\"cxAllowed\":%s,", coldExtractionConditionsOk() ? "true" : "false");
|
offset += snprintf(buffer + offset, bufferSize - offset, "\"cxAllowed\":%s,", coldExtractionConditionsOk() ? "true" : "false");
|
||||||
|
// cxArmable = Modus umschaltbar (auch im Standby und bei warmem Kessel); cxAllowed = Bezug moeglich
|
||||||
|
offset += snprintf(buffer + offset, bufferSize - offset, "\"cxArmable\":%s,", coldExtractionArmable() ? "true" : "false");
|
||||||
dtostrf(coldExtractionMaxTempC, 4, 1, floatBuf); offset += snprintf(buffer + offset, bufferSize - offset, "\"cxMaxTemp\":%s,", floatBuf);
|
dtostrf(coldExtractionMaxTempC, 4, 1, floatBuf); offset += snprintf(buffer + offset, bufferSize - offset, "\"cxMaxTemp\":%s,", floatBuf);
|
||||||
offset += snprintf(buffer + offset, bufferSize - offset, "\"scaleModeActive\":%s,", scaleModeActive ? "true" : "false");
|
offset += snprintf(buffer + offset, bufferSize - offset, "\"scaleModeActive\":%s,", scaleModeActive ? "true" : "false");
|
||||||
dtostrf(brewByTimeTargetSeconds, 4, 1, floatBuf); offset += snprintf(buffer + offset, bufferSize - offset, "\"bbtSecs\":%s,", floatBuf);
|
dtostrf(brewByTimeTargetSeconds, 4, 1, floatBuf); offset += snprintf(buffer + offset, bufferSize - offset, "\"bbtSecs\":%s,", floatBuf);
|
||||||
@@ -16278,7 +16470,8 @@ static void getTouchUartStatus(String& statusText, String& statusKey) {
|
|||||||
}
|
}
|
||||||
statusKey = "brewing";
|
statusKey = "brewing";
|
||||||
} else if (coldExtractionModeActive) {
|
} else if (coldExtractionModeActive) {
|
||||||
statusText = "Cold Extraction bereit";
|
statusText = coldExtractionScaleUsable() ? "Cold Extraction bereit"
|
||||||
|
: "Cold Extraction bereit (Zeitsteuerung)";
|
||||||
statusKey = "coldextraction";
|
statusKey = "coldextraction";
|
||||||
} else if (ecoModeAktiv) {
|
} else if (ecoModeAktiv) {
|
||||||
statusText = dynamicEcoActive ? "Eco+ Modus aktiv" : "Eco Modus aktiv";
|
statusText = dynamicEcoActive ? "Eco+ Modus aktiv" : "Eco Modus aktiv";
|
||||||
@@ -16473,10 +16666,18 @@ static void buildTouchUartStateJson(char *buffer, size_t bufferSize) {
|
|||||||
offset += snprintf(buffer + offset, bufferSize - offset, "\"cxActive\":%s,", coldExtractionModeActive ? "true" : "false");
|
offset += snprintf(buffer + offset, bufferSize - offset, "\"cxActive\":%s,", coldExtractionModeActive ? "true" : "false");
|
||||||
offset += snprintf(buffer + offset, bufferSize - offset, "\"cxShot\":%s,", coldExtractionShotActive ? "true" : "false");
|
offset += snprintf(buffer + offset, bufferSize - offset, "\"cxShot\":%s,", coldExtractionShotActive ? "true" : "false");
|
||||||
offset += snprintf(buffer + offset, bufferSize - offset, "\"cxAllowed\":%s,", coldExtractionConditionsOk() ? "true" : "false");
|
offset += snprintf(buffer + offset, bufferSize - offset, "\"cxAllowed\":%s,", coldExtractionConditionsOk() ? "true" : "false");
|
||||||
|
// cxArmable = Modus umschaltbar (auch im Standby und bei warmem Kessel); cxAllowed = Bezug moeglich
|
||||||
|
offset += snprintf(buffer + offset, bufferSize - offset, "\"cxArmable\":%s,", coldExtractionArmable() ? "true" : "false");
|
||||||
offset += snprintf(buffer + offset, bufferSize - offset, "\"cxResting\":%s,", coldExtractionPumpResting ? "true" : "false");
|
offset += snprintf(buffer + offset, bufferSize - offset, "\"cxResting\":%s,", coldExtractionPumpResting ? "true" : "false");
|
||||||
dtostrf(coldExtractionMaxTempC, 4, 1, floatBuf); offset += snprintf(buffer + offset, bufferSize - offset, "\"cxMaxTemp\":%s,", floatBuf);
|
dtostrf(coldExtractionMaxTempC, 4, 1, floatBuf); offset += snprintf(buffer + offset, bufferSize - offset, "\"cxMaxTemp\":%s,", floatBuf);
|
||||||
dtostrf(coldExtractionTargetGrams, 4, 1, floatBuf); offset += snprintf(buffer + offset, bufferSize - offset, "\"cxTarget\":%s,", floatBuf);
|
dtostrf(coldExtractionTargetGrams, 4, 1, floatBuf); offset += snprintf(buffer + offset, bufferSize - offset, "\"cxTarget\":%s,", floatBuf);
|
||||||
dtostrf(coldExtractionPreInfusionSeconds, 4, 1, floatBuf); offset += snprintf(buffer + offset, bufferSize - offset, "\"cxPreInf\":%s,", floatBuf);
|
dtostrf(coldExtractionPreInfusionSeconds, 4, 1, floatBuf); offset += snprintf(buffer + offset, bufferSize - offset, "\"cxPreInf\":%s,", floatBuf);
|
||||||
|
// Restliche Parameter fuer die Einstellseite am Display (seit S3 5.4.0)
|
||||||
|
dtostrf(coldExtractionPreInfDutyPercent, 4, 1, floatBuf); offset += snprintf(buffer + offset, bufferSize - offset, "\"cxPreInfDuty\":%s,", floatBuf);
|
||||||
|
dtostrf(coldExtractionDutyPercent, 4, 1, floatBuf); offset += snprintf(buffer + offset, bufferSize - offset, "\"cxDuty\":%s,", floatBuf);
|
||||||
|
offset += snprintf(buffer + offset, bufferSize - offset, "\"cxPulseMs\":%u,", (unsigned int)coldExtractionPulsePeriodMs);
|
||||||
|
dtostrf(coldExtractionPumpMaxRunSec, 4, 1, floatBuf); offset += snprintf(buffer + offset, bufferSize - offset, "\"cxPumpMaxRun\":%s,", floatBuf);
|
||||||
|
dtostrf(coldExtractionPumpRestSec, 4, 1, floatBuf); offset += snprintf(buffer + offset, bufferSize - offset, "\"cxPumpRest\":%s,", floatBuf);
|
||||||
dtostrf(coldExtractionMaxSeconds, 5, 1, floatBuf); offset += snprintf(buffer + offset, bufferSize - offset, "\"cxMaxSecs\":%s,", floatBuf);
|
dtostrf(coldExtractionMaxSeconds, 5, 1, floatBuf); offset += snprintf(buffer + offset, bufferSize - offset, "\"cxMaxSecs\":%s,", floatBuf);
|
||||||
// Sperrgrund + transiente Meldung als Codes (kein Freitext - die State-Zeile muss kurz
|
// Sperrgrund + transiente Meldung als Codes (kein Freitext - die State-Zeile muss kurz
|
||||||
// bleiben, der P4 begrenzt eingehende Zeilen; Texte rendert das Display selbst).
|
// bleiben, der P4 begrenzt eingehende Zeilen; Texte rendert das Display selbst).
|
||||||
@@ -17158,9 +17359,54 @@ static bool touchUartHandleCommandLine(const String& line) {
|
|||||||
update.sbtSecs = floatVal;
|
update.sbtSecs = floatVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// --- Cold Extraction (seit S3 5.4.0 auch ueber saveBrew einstellbar) ---
|
||||||
|
if (jsonGetBoolValue(line, "cxEnabled", boolVal)) {
|
||||||
|
update.hasCXEnabled = true;
|
||||||
|
update.cxEnabled = boolVal;
|
||||||
|
}
|
||||||
|
if (jsonGetFloatValue(line, "cxMaxTemp", floatVal)) {
|
||||||
|
update.hasCXMaxTemp = true;
|
||||||
|
update.cxMaxTemp = floatVal;
|
||||||
|
}
|
||||||
|
if (jsonGetFloatValue(line, "cxPreInf", floatVal)) {
|
||||||
|
update.hasCXPreInf = true;
|
||||||
|
update.cxPreInf = floatVal;
|
||||||
|
}
|
||||||
|
if (jsonGetFloatValue(line, "cxPreInfDuty", floatVal)) {
|
||||||
|
update.hasCXPreInfDuty = true;
|
||||||
|
update.cxPreInfDuty = floatVal;
|
||||||
|
}
|
||||||
|
if (jsonGetFloatValue(line, "cxPulseMs", floatVal)) {
|
||||||
|
update.hasCXPulseMs = true;
|
||||||
|
update.cxPulseMs = (uint16_t)floatVal;
|
||||||
|
}
|
||||||
|
if (jsonGetFloatValue(line, "cxDuty", floatVal)) {
|
||||||
|
update.hasCXDuty = true;
|
||||||
|
update.cxDuty = floatVal;
|
||||||
|
}
|
||||||
|
if (jsonGetFloatValue(line, "cxTarget", floatVal)) {
|
||||||
|
update.hasCXTarget = true;
|
||||||
|
update.cxTarget = floatVal;
|
||||||
|
}
|
||||||
|
if (jsonGetFloatValue(line, "cxMaxSecs", floatVal)) {
|
||||||
|
update.hasCXMaxSecs = true;
|
||||||
|
update.cxMaxSecs = floatVal;
|
||||||
|
}
|
||||||
|
if (jsonGetFloatValue(line, "cxPumpMaxRun", floatVal)) {
|
||||||
|
update.hasCXPumpMaxRun = true;
|
||||||
|
update.cxPumpMaxRun = floatVal;
|
||||||
|
}
|
||||||
|
if (jsonGetFloatValue(line, "cxPumpRest", floatVal)) {
|
||||||
|
update.hasCXPumpRest = true;
|
||||||
|
update.cxPumpRest = floatVal;
|
||||||
|
}
|
||||||
|
|
||||||
if (!update.hasBBTEnabled && !update.hasBBTSecs && !update.hasBBWEnabled && !update.hasBBWTarget &&
|
if (!update.hasBBTEnabled && !update.hasBBTSecs && !update.hasBBWEnabled && !update.hasBBWTarget &&
|
||||||
!update.hasBBWOffset && !update.hasPIEnabled && !update.hasPIDurSecs && !update.hasPIPauseSecs &&
|
!update.hasBBWOffset && !update.hasPIEnabled && !update.hasPIDurSecs && !update.hasPIPauseSecs &&
|
||||||
!update.hasSBTEnabled && !update.hasSBTSecs) {
|
!update.hasSBTEnabled && !update.hasSBTSecs &&
|
||||||
|
!update.hasCXEnabled && !update.hasCXMaxTemp && !update.hasCXPreInf && !update.hasCXPreInfDuty &&
|
||||||
|
!update.hasCXPulseMs && !update.hasCXDuty && !update.hasCXTarget && !update.hasCXMaxSecs &&
|
||||||
|
!update.hasCXPumpMaxRun && !update.hasCXPumpRest) {
|
||||||
touchUartSendError(id, "Keine Brew-Felder");
|
touchUartSendError(id, "Keine Brew-Felder");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,53 @@
|
|||||||
|
Version 1.2.0:
|
||||||
|
- Neue Seite „Cold Extraction" mit eigenem Menüeintrag (braucht S3-Firmware ab 5.4.0). Dort stehen jetzt
|
||||||
|
alle Parameter der kalten Extraktion und lassen sich direkt am Display ändern: Freigabetemperatur,
|
||||||
|
Vorbenetzung (Dauer + Pumpenleistung), Hauptbezug (Pulsperiode + Pumpenleistung), Zielgewicht,
|
||||||
|
maximale Bezugsdauer sowie der Pumpenschutz. Gespeichert wird über das erweiterte saveBrew-Kommando.
|
||||||
|
- Der Modus-Schalter ist von der Temperatur-Seite auf die neue Seite umgezogen (eine Stelle statt zwei).
|
||||||
|
Der Knopf „Aufwecken mit Cold Extraction" im Standby-Dialog bleibt unverändert.
|
||||||
|
- Brew-Control-Seite neu gegliedert: Statt einer durchlaufenden Liste unter Zwischenüberschriften liegt
|
||||||
|
jede Funktion (Pre-Infusion, Brew-by-Time, Brew-by-Weight, Dampf-Timer) jetzt in einer eigenen Karte
|
||||||
|
mit Titel und einer Zeile, die erklärt, was sie tut. Die neue Cold-Extraction-Seite nutzt dieselbe
|
||||||
|
Gliederung.
|
||||||
|
- Eingabefelder werden nur beim Öffnen der Seite aus dem Zustand gefüllt, damit laufende State-Pushes
|
||||||
|
eine begonnene Eingabe nicht überschreiben (gleiches Verhalten wie auf der Brew-Control-Seite).
|
||||||
|
|
||||||
|
Version 1.1.3:
|
||||||
|
- Aufweck-Dialog hat einen dritten Knopf: „Aufwecken mit Cold Extraction" (braucht S3 ab 5.3.5).
|
||||||
|
Er stellt den Modus scharf und beendet erst danach den Standby - in dieser Reihenfolge, damit
|
||||||
|
der Wasserkreis gar nicht erst anheizt. Ohne diesen Weg musste man normal aufwecken (Maschine
|
||||||
|
heizt an) und den Modus danach umschalten. Der Knopf erscheint nur, wenn die Funktion
|
||||||
|
freigeschaltet und umschaltbar ist und der Modus nicht ohnehin schon läuft.
|
||||||
|
- Der Schalter „Cold Extraction" auf der Temperatur-Seite hängt jetzt am neuen State-Feld
|
||||||
|
cxArmable statt an cxAllowed: umschaltbar auch im Standby und bei warmem Kessel, gesperrt nur
|
||||||
|
während eines laufenden kalten Bezugs. Bei älterer S3-Firmware fällt das Feld auf cxEnabled
|
||||||
|
zurück, der Schalter bleibt also bedienbar.
|
||||||
|
- Erklärzeile im Standby: „Nach dem Aufwecken bleibt der Wasserkreis aus."
|
||||||
|
|
||||||
|
Version 1.1.2:
|
||||||
|
- Cold Extraction: Fehlt eine nutzbare Waage, weist das Display jetzt dauerhaft darauf hin.
|
||||||
|
Ohne Waage greifen weder Zielgewicht noch Stillstands-Erkennung, der Bezug endet erst nach der
|
||||||
|
maximalen Bezugsdauer (braucht S3-Firmware ab 5.3.4).
|
||||||
|
- Statuszeile: „Cold Extraction aktiv - ohne Waage, Ende nach Zeit" (gelb) statt des blauen
|
||||||
|
Normalhinweises; beim Aktivieren zusätzlich kurz die Meldung zum neuen cxNotice-Code 4.
|
||||||
|
- Erklärzeile unter dem Schalter und die Parameter-Anzeige auf der Brew-Seite ergänzen den
|
||||||
|
Hinweis; bei aktivem Modus ohne Waage nennt die Zeile die Zeit statt des Zielgewichts.
|
||||||
|
|
||||||
|
Version 1.1.1:
|
||||||
|
- Compiler-Warnungen des P4-Builds aufgeräumt (rein technisch, keine Funktionsänderung):
|
||||||
|
- „LV_FS_DEFAULT_DRIVE_LETTER is deprecated": Die Option heißt ab LVGL 9.3
|
||||||
|
LV_FS_DEFAULT_DRIVER_LETTER. Der alte Name funktionierte zwar noch, löste aber in
|
||||||
|
lv_api_map_v9_1.h ein #warning aus - und zwar in JEDER Übersetzungseinheit, die lvgl.h
|
||||||
|
einbindet. Das allein waren rund 60 Warnungen pro Build, die alles andere zugedeckt haben.
|
||||||
|
In lv_conf.h umbenannt.
|
||||||
|
- „bitwise operation between different enumeration types is deprecated": LV_PART_* und
|
||||||
|
LV_STATE_* sind in LVGL 9 zwei verschiedene Enum-Typen; sie direkt mit | zu verknüpfen ist
|
||||||
|
in C++20 abgekündigt. Neues Makro TH_SEL(part, state) in theme.h castet beide auf
|
||||||
|
lv_style_selector_t (ohnehin uint32_t). Betraf 5 Stellen in ui.cpp und theme.h.
|
||||||
|
- Bug-Fix: Der Puffer für die Cold-Extraction-Infozeile auf der Brew-Seite war mit 192 Bytes
|
||||||
|
zu klein - der Text ist rund 205 Zeichen lang (das „°" zählt als zwei Bytes), die letzte
|
||||||
|
Zeile wurde also abgeschnitten. Jetzt 256 Bytes.
|
||||||
|
|
||||||
Version 1.1.0:
|
Version 1.1.0:
|
||||||
- Cold Extraction am Display bedienbar (braucht S3-Firmware ab 5.3.2):
|
- Cold Extraction am Display bedienbar (braucht S3-Firmware ab 5.3.2):
|
||||||
- Neuer Schalter „Cold Extraction" auf der Seite „Temperaturen" unter „Modi", darunter eine
|
- Neuer Schalter „Cold Extraction" auf der Seite „Temperaturen" unter „Modi", darunter eine
|
||||||
|
|||||||
@@ -65,7 +65,7 @@
|
|||||||
// -------------------------------------------------------------------------------------
|
// -------------------------------------------------------------------------------------
|
||||||
// Firmware
|
// Firmware
|
||||||
// -------------------------------------------------------------------------------------
|
// -------------------------------------------------------------------------------------
|
||||||
#define DISPLAY_FW_VERSION "1.1.0" // Firmware-Stand der P4-Display-Steuerung (Info-Seite)
|
#define DISPLAY_FW_VERSION "1.2.0" // Firmware-Stand der P4-Display-Steuerung (Info-Seite)
|
||||||
|
|
||||||
// -------------------------------------------------------------------------------------
|
// -------------------------------------------------------------------------------------
|
||||||
// Protokoll
|
// Protokoll
|
||||||
|
|||||||
@@ -727,7 +727,10 @@
|
|||||||
/*File system interfaces for common APIs */
|
/*File system interfaces for common APIs */
|
||||||
|
|
||||||
/*Setting a default driver letter allows skipping the driver prefix in filepaths*/
|
/*Setting a default driver letter allows skipping the driver prefix in filepaths*/
|
||||||
#define LV_FS_DEFAULT_DRIVE_LETTER '\0'
|
/* Ab LVGL 9.3 heisst die Option LV_FS_DEFAULT_DRIVER_LETTER. Der alte Name wird zwar noch
|
||||||
|
uebersetzt, loest aber in lv_api_map_v9_1.h ein #warning aus - und zwar in JEDER
|
||||||
|
Uebersetzungseinheit, die lvgl.h einbindet (~60 Warnungen pro Build). */
|
||||||
|
#define LV_FS_DEFAULT_DRIVER_LETTER '\0'
|
||||||
|
|
||||||
/*API for fopen, fread, etc*/
|
/*API for fopen, fread, etc*/
|
||||||
#define LV_USE_FS_STDIO 0
|
#define LV_USE_FS_STDIO 0
|
||||||
|
|||||||
@@ -72,11 +72,18 @@ struct MachineState {
|
|||||||
bool cxEnabled = false; // Funktion auf der S3 freigeschaltet (sonst Bedienelement ausblenden)
|
bool cxEnabled = false; // Funktion auf der S3 freigeschaltet (sonst Bedienelement ausblenden)
|
||||||
bool cxActive = false; // Modus scharf: Wasserkreis heizt nicht (persistent, seit S3 5.3.1)
|
bool cxActive = false; // Modus scharf: Wasserkreis heizt nicht (persistent, seit S3 5.3.1)
|
||||||
bool cxShot = false; // der laufende Bezug ist eine kalte Extraktion
|
bool cxShot = false; // der laufende Bezug ist eine kalte Extraktion
|
||||||
bool cxAllowed = false; // Freigabe jetzt (Wasserkessel kalt genug, kein Standby/Wartung/Tuning)
|
bool cxAllowed = false; // Bezug jetzt moeglich (Wasserkessel kalt genug, kein Standby/Wartung/Tuning)
|
||||||
|
bool cxArmable = false; // Modus umschaltbar - auch im Standby und bei warmem Kessel (seit S3 5.3.5)
|
||||||
bool cxResting = false; // Zwangspause des Pumpenschutzes laeuft (Bezug laeuft weiter)
|
bool cxResting = false; // Zwangspause des Pumpenschutzes laeuft (Bezug laeuft weiter)
|
||||||
float cxMaxTemp = 0; // Freigabeschwelle in C
|
float cxMaxTemp = 0; // Freigabeschwelle in C
|
||||||
float cxTarget = 0; // Zielgewicht in g
|
float cxTarget = 0; // Zielgewicht in g
|
||||||
float cxPreInfSec = 0; // Vorbenetzung in s (fuer die Phasenleiste des kalten Bezugs)
|
float cxPreInfSec = 0; // Vorbenetzung in s (fuer die Phasenleiste des kalten Bezugs)
|
||||||
|
// Restliche Parameter fuer die Einstellseite am Display (seit S3 5.4.0)
|
||||||
|
float cxPreInfDuty = 0; // Pumpenleistung Vorbenetzung in %
|
||||||
|
float cxDuty = 0; // Pumpenleistung Hauptbezug in %
|
||||||
|
uint16_t cxPulseMs = 0; // Pulsperiode in ms
|
||||||
|
float cxPumpMaxRun = 0; // Pumpenschutz: max. kumulierte Laufzeit in s
|
||||||
|
float cxPumpRest = 0; // Pumpenschutz: Zwangspause in s
|
||||||
float cxMaxSecs = 0; // Sicherheits-Timeout des Bezugs in s
|
float cxMaxSecs = 0; // Sicherheits-Timeout des Bezugs in s
|
||||||
// Sperrgrund: 0=frei, 1=nicht freigeschaltet, 2=Standby, 3=Wartung, 4=Reinigungsassistent,
|
// Sperrgrund: 0=frei, 1=nicht freigeschaltet, 2=Standby, 3=Wartung, 4=Reinigungsassistent,
|
||||||
// 5=PID-Tuning, 6=Sensorfehler, 7=Wasserkessel zu warm
|
// 5=PID-Tuning, 6=Sensorfehler, 7=Wasserkessel zu warm
|
||||||
|
|||||||
@@ -225,10 +225,17 @@ void ProtocolClient::applyState(const String& json) {
|
|||||||
s.cxActive = doc["cxActive"] | false;
|
s.cxActive = doc["cxActive"] | false;
|
||||||
s.cxShot = doc["cxShot"] | false;
|
s.cxShot = doc["cxShot"] | false;
|
||||||
s.cxAllowed = doc["cxAllowed"] | false;
|
s.cxAllowed = doc["cxAllowed"] | false;
|
||||||
|
// Fehlt bei S3-FW < 5.3.5 -> auf cxEnabled zurueckfallen, sonst waere der Schalter tot
|
||||||
|
s.cxArmable = doc["cxArmable"] | (doc["cxEnabled"] | false);
|
||||||
s.cxResting = doc["cxResting"] | false;
|
s.cxResting = doc["cxResting"] | false;
|
||||||
s.cxMaxTemp = doc["cxMaxTemp"] | s.cxMaxTemp;
|
s.cxMaxTemp = doc["cxMaxTemp"] | s.cxMaxTemp;
|
||||||
s.cxTarget = doc["cxTarget"] | s.cxTarget;
|
s.cxTarget = doc["cxTarget"] | s.cxTarget;
|
||||||
s.cxPreInfSec= doc["cxPreInf"] | s.cxPreInfSec;
|
s.cxPreInfSec= doc["cxPreInf"] | s.cxPreInfSec;
|
||||||
|
s.cxPreInfDuty = doc["cxPreInfDuty"] | s.cxPreInfDuty;
|
||||||
|
s.cxDuty = doc["cxDuty"] | s.cxDuty;
|
||||||
|
s.cxPulseMs = doc["cxPulseMs"] | s.cxPulseMs;
|
||||||
|
s.cxPumpMaxRun = doc["cxPumpMaxRun"] | s.cxPumpMaxRun;
|
||||||
|
s.cxPumpRest = doc["cxPumpRest"] | s.cxPumpRest;
|
||||||
s.cxMaxSecs = doc["cxMaxSecs"] | s.cxMaxSecs;
|
s.cxMaxSecs = doc["cxMaxSecs"] | s.cxMaxSecs;
|
||||||
s.cxBlock = doc["cxBlock"] | (uint8_t)0;
|
s.cxBlock = doc["cxBlock"] | (uint8_t)0;
|
||||||
s.cxNotice = doc["cxNotice"] | (uint8_t)0;
|
s.cxNotice = doc["cxNotice"] | (uint8_t)0;
|
||||||
|
|||||||
@@ -25,6 +25,11 @@
|
|||||||
#define COL_BORDER lv_color_hex(0x555555)
|
#define COL_BORDER lv_color_hex(0x555555)
|
||||||
#define COL_INPUT_BG lv_color_hex(0x101010)
|
#define COL_INPUT_BG lv_color_hex(0x101010)
|
||||||
|
|
||||||
|
// Style-Selektor aus Part + State. LV_PART_* und LV_STATE_* sind in LVGL 9 zwei
|
||||||
|
// verschiedene Enum-Typen; sie direkt mit | zu verknuepfen ist in C++20 deprecated
|
||||||
|
// (-Wdeprecated-enum-enum-conversion). Der Zieltyp ist ohnehin uint32_t.
|
||||||
|
#define TH_SEL(part, state) ((lv_style_selector_t)(part) | (lv_style_selector_t)(state))
|
||||||
|
|
||||||
// ---- Karte (dunkel, abgerundet) ----
|
// ---- Karte (dunkel, abgerundet) ----
|
||||||
static inline lv_obj_t* th_card(lv_obj_t* parent) {
|
static inline lv_obj_t* th_card(lv_obj_t* parent) {
|
||||||
lv_obj_t* c = lv_obj_create(parent);
|
lv_obj_t* c = lv_obj_create(parent);
|
||||||
@@ -61,7 +66,7 @@ static inline lv_obj_t* th_textarea(lv_obj_t* parent, bool oneLine) {
|
|||||||
lv_textarea_set_one_line(ta, oneLine);
|
lv_textarea_set_one_line(ta, oneLine);
|
||||||
lv_obj_set_style_bg_color(ta, COL_INPUT_BG, 0);
|
lv_obj_set_style_bg_color(ta, COL_INPUT_BG, 0);
|
||||||
lv_obj_set_style_border_color(ta, COL_BORDER, 0);
|
lv_obj_set_style_border_color(ta, COL_BORDER, 0);
|
||||||
lv_obj_set_style_border_color(ta, COL_ACCENT, LV_PART_MAIN | LV_STATE_FOCUSED);
|
lv_obj_set_style_border_color(ta, COL_ACCENT, TH_SEL(LV_PART_MAIN, LV_STATE_FOCUSED));
|
||||||
lv_obj_set_style_border_width(ta, 1, 0);
|
lv_obj_set_style_border_width(ta, 1, 0);
|
||||||
lv_obj_set_style_radius(ta, 8, 0);
|
lv_obj_set_style_radius(ta, 8, 0);
|
||||||
lv_obj_set_style_text_color(ta, COL_TEXT, 0);
|
lv_obj_set_style_text_color(ta, COL_TEXT, 0);
|
||||||
|
|||||||
+209
-55
@@ -38,6 +38,7 @@ static lv_timer_t* g_toastTimer = nullptr;
|
|||||||
static lv_obj_t* g_standbyScreen = nullptr; // Vollbild-Overlay im Standby (Uhr)
|
static lv_obj_t* g_standbyScreen = nullptr; // Vollbild-Overlay im Standby (Uhr)
|
||||||
static lv_obj_t* g_standbyClock = nullptr;
|
static lv_obj_t* g_standbyClock = nullptr;
|
||||||
static lv_obj_t* g_wakeConfirm = nullptr; // Bestaetigungsdialog "Aus dem Standby aufwecken?"
|
static lv_obj_t* g_wakeConfirm = nullptr; // Bestaetigungsdialog "Aus dem Standby aufwecken?"
|
||||||
|
static lv_obj_t* g_wakeColdBtn = nullptr; // "Aufwecken mit Cold Extraction" (nur wenn freigeschaltet)
|
||||||
static bool g_wakeDialogOpen = false; // Dialog sichtbar -> Display hell schalten (lesbar)
|
static bool g_wakeDialogOpen = false; // Dialog sichtbar -> Display hell schalten (lesbar)
|
||||||
static bool g_standbyShown = false; // Standby-Uhr-Overlay zuletzt als sichtbar geschaltet (fuer Ein-/Ausblend-Uebergang)
|
static bool g_standbyShown = false; // Standby-Uhr-Overlay zuletzt als sichtbar geschaltet (fuer Ein-/Ausblend-Uebergang)
|
||||||
|
|
||||||
@@ -49,8 +50,8 @@ static lv_obj_t* g_otaStatus = nullptr;
|
|||||||
static lv_obj_t* g_otaBytes = nullptr;
|
static lv_obj_t* g_otaBytes = nullptr;
|
||||||
|
|
||||||
// Navigation
|
// Navigation
|
||||||
enum { PG_DASH = 0, PG_CHART, PG_STATS, PG_TEMP, PG_BREW, PG_SERVICE, PG_PROFILE, PG_LIGHT, PG_WIFI, PG_INFO, PG_COUNT };
|
enum { PG_DASH = 0, PG_CHART, PG_STATS, PG_TEMP, PG_BREW, PG_COLDEX, PG_SERVICE, PG_PROFILE, PG_LIGHT, PG_WIFI, PG_INFO, PG_COUNT };
|
||||||
static const char* PAGE_NAMES[PG_COUNT] = { "Dashboard", "Verlauf", "Statistik", "Temperatur", "Brew-Control", "Reinigung/Wartung", "Profile", "Licht", "WiFi", "Info" };
|
static const char* PAGE_NAMES[PG_COUNT] = { "Dashboard", "Verlauf", "Statistik", "Temperatur", "Brew-Control", "Cold Extraction", "Reinigung/Wartung", "Profile", "Licht", "WiFi", "Info" };
|
||||||
static lv_obj_t* g_content = nullptr;
|
static lv_obj_t* g_content = nullptr;
|
||||||
static lv_obj_t* g_pages[PG_COUNT] = { nullptr };
|
static lv_obj_t* g_pages[PG_COUNT] = { nullptr };
|
||||||
static lv_obj_t* g_drawer = nullptr;
|
static lv_obj_t* g_drawer = nullptr;
|
||||||
@@ -250,7 +251,15 @@ static lv_obj_t* swPI; static lv_obj_t* taPiDur; static lv_obj_t* taPiPause;
|
|||||||
static lv_obj_t* swBBT; static lv_obj_t* taBbtSecs;
|
static lv_obj_t* swBBT; static lv_obj_t* taBbtSecs;
|
||||||
static lv_obj_t* swBBW; static lv_obj_t* taBbwTarget; static lv_obj_t* taBbwOffset;
|
static lv_obj_t* swBBW; static lv_obj_t* taBbwTarget; static lv_obj_t* taBbwOffset;
|
||||||
static lv_obj_t* swSBT; static lv_obj_t* taSbtSecs;
|
static lv_obj_t* swSBT; static lv_obj_t* taSbtSecs;
|
||||||
static lv_obj_t* lblBrewColdEx = nullptr; // Cold-Extraction-Parameter (nur Anzeige)
|
// Cold-Extraction-Seite (eigener Menuepunkt)
|
||||||
|
static lv_obj_t* taCxMaxTemp = nullptr; static lv_obj_t* taCxPreInf = nullptr;
|
||||||
|
static lv_obj_t* taCxPreInfDuty = nullptr; static lv_obj_t* taCxPulseMs = nullptr;
|
||||||
|
static lv_obj_t* taCxDuty = nullptr; static lv_obj_t* taCxTarget = nullptr;
|
||||||
|
static lv_obj_t* taCxMaxSecs = nullptr; static lv_obj_t* taCxPumpMaxRun = nullptr;
|
||||||
|
static lv_obj_t* taCxPumpRest = nullptr;
|
||||||
|
static lv_obj_t* swCxEnabled = nullptr; // Freischaltung (entspricht dem Web-Toggle)
|
||||||
|
static lv_obj_t* lblCxPageHint = nullptr;
|
||||||
|
static uint32_t g_cxEditMs = 0; // waehrend der Eingabe die Felder nicht ueberschreiben
|
||||||
|
|
||||||
// WiFi
|
// WiFi
|
||||||
static lv_obj_t* wifiStatusLbl; static lv_obj_t* wifiHintLbl; static lv_obj_t* wifiList;
|
static lv_obj_t* wifiStatusLbl; static lv_obj_t* wifiHintLbl; static lv_obj_t* wifiList;
|
||||||
@@ -389,7 +398,7 @@ static lv_obj_t* row(lv_obj_t* parent, const char* label) {
|
|||||||
static lv_obj_t* add_switch(lv_obj_t* parent, const char* label) {
|
static lv_obj_t* add_switch(lv_obj_t* parent, const char* label) {
|
||||||
lv_obj_t* r = row(parent, label);
|
lv_obj_t* r = row(parent, label);
|
||||||
lv_obj_t* sw = lv_switch_create(r);
|
lv_obj_t* sw = lv_switch_create(r);
|
||||||
lv_obj_set_style_bg_color(sw, COL_ACCENT, LV_PART_INDICATOR | LV_STATE_CHECKED);
|
lv_obj_set_style_bg_color(sw, COL_ACCENT, TH_SEL(LV_PART_INDICATOR, LV_STATE_CHECKED));
|
||||||
return sw;
|
return sw;
|
||||||
}
|
}
|
||||||
static lv_obj_t* add_num(lv_obj_t* parent, const char* label) {
|
static lv_obj_t* add_num(lv_obj_t* parent, const char* label) {
|
||||||
@@ -399,6 +408,29 @@ static lv_obj_t* add_num(lv_obj_t* parent, const char* label) {
|
|||||||
attach_kb(ta, false);
|
attach_kb(ta, false);
|
||||||
return ta;
|
return ta;
|
||||||
}
|
}
|
||||||
|
// Gruppen-Karte: abgesetzter Block mit Titel, in den Zeilen (row/add_switch/add_num)
|
||||||
|
// gelegt werden. Deutlich uebersichtlicher als eine lange Liste gleich aussehender
|
||||||
|
// Zeilen unter Zwischenueberschriften.
|
||||||
|
static lv_obj_t* group_card(lv_obj_t* parent, const char* title, const char* subtitle = nullptr) {
|
||||||
|
lv_obj_t* c = th_card(parent);
|
||||||
|
lv_obj_set_width(c, LV_PCT(100));
|
||||||
|
lv_obj_set_height(c, LV_SIZE_CONTENT);
|
||||||
|
lv_obj_set_flex_flow(c, LV_FLEX_FLOW_COLUMN);
|
||||||
|
lv_obj_set_style_pad_row(c, 2, 0);
|
||||||
|
lv_obj_clear_flag(c, LV_OBJ_FLAG_SCROLLABLE);
|
||||||
|
lv_obj_t* t = lv_label_create(c);
|
||||||
|
lv_label_set_text(t, title);
|
||||||
|
lv_obj_set_style_text_color(t, COL_ACCENT, 0);
|
||||||
|
lv_obj_set_style_text_font(t, &lv_font_maven_pro_18, 0);
|
||||||
|
if (subtitle) {
|
||||||
|
lv_obj_t* s = lv_label_create(c);
|
||||||
|
lv_label_set_long_mode(s, LV_LABEL_LONG_WRAP);
|
||||||
|
lv_obj_set_width(s, LV_PCT(100));
|
||||||
|
lv_label_set_text(s, subtitle);
|
||||||
|
lv_obj_set_style_text_color(s, COL_TEXT_MUT, 0);
|
||||||
|
}
|
||||||
|
return c;
|
||||||
|
}
|
||||||
static lv_obj_t* section_title(lv_obj_t* parent, const char* txt) {
|
static lv_obj_t* section_title(lv_obj_t* parent, const char* txt) {
|
||||||
lv_obj_t* l = lv_label_create(parent);
|
lv_obj_t* l = lv_label_create(parent);
|
||||||
lv_label_set_text(l, txt);
|
lv_label_set_text(l, txt);
|
||||||
@@ -429,6 +461,7 @@ static lv_obj_t* make_page(lv_obj_t* parent) {
|
|||||||
// =====================================================================================
|
// =====================================================================================
|
||||||
// Brew-Control-Felder einmalig aus dem Zustand fuellen (nur beim Oeffnen der Seite,
|
// Brew-Control-Felder einmalig aus dem Zustand fuellen (nur beim Oeffnen der Seite,
|
||||||
// damit laufende State-Pushes die Eingaben nicht vor dem Speichern ueberschreiben).
|
// damit laufende State-Pushes die Eingaben nicht vor dem Speichern ueberschreiben).
|
||||||
|
static void populate_coldex(const MachineState& st); // Definition auf der Cold-Extraction-Seite
|
||||||
static void populate_brew(const MachineState& st) {
|
static void populate_brew(const MachineState& st) {
|
||||||
if (!swPI) return;
|
if (!swPI) return;
|
||||||
sw_set(swPI, st.piEnabled); ta_setf(taPiDur, st.piDurSecs, 1); ta_setf(taPiPause, st.piPauseSecs, 1);
|
sw_set(swPI, st.piEnabled); ta_setf(taPiDur, st.piDurSecs, 1); ta_setf(taPiPause, st.piPauseSecs, 1);
|
||||||
@@ -462,6 +495,7 @@ static void show_page(int idx) {
|
|||||||
if (idx == PG_PROFILE && g_client) g_client->sendListProfiles();
|
if (idx == PG_PROFILE && g_client) g_client->sendListProfiles();
|
||||||
if (idx == PG_STATS) stats_request(); // Nutzungsstatistik beim Oeffnen frisch anfordern
|
if (idx == PG_STATS) stats_request(); // Nutzungsstatistik beim Oeffnen frisch anfordern
|
||||||
if (idx == PG_BREW) populate_brew(g_state); // Felder beim Oeffnen frisch laden
|
if (idx == PG_BREW) populate_brew(g_state); // Felder beim Oeffnen frisch laden
|
||||||
|
if (idx == PG_COLDEX) populate_coldex(g_state);
|
||||||
if (idx == PG_SERVICE) populate_service(g_state);
|
if (idx == PG_SERVICE) populate_service(g_state);
|
||||||
}
|
}
|
||||||
static void drawer_open() { if (g_drawer) { lv_obj_remove_flag(g_drawer, LV_OBJ_FLAG_HIDDEN); lv_obj_move_foreground(g_drawer); } }
|
static void drawer_open() { if (g_drawer) { lv_obj_remove_flag(g_drawer, LV_OBJ_FLAG_HIDDEN); lv_obj_move_foreground(g_drawer); } }
|
||||||
@@ -572,6 +606,17 @@ static void wake_yes_cb(lv_event_t*) { // Aufwecken -> hell lassen, S3 bee
|
|||||||
// das Display in der Uebergangsphase kurz auf Standby-Helligkeit abdunkeln.
|
// das Display in der Uebergangsphase kurz auf Standby-Helligkeit abdunkeln.
|
||||||
if (g_client) { g_client->sendAction("deactivateStandby"); showToast("Maschine wird aufgeweckt...", false); }
|
if (g_client) { g_client->sendAction("deactivateStandby"); showToast("Maschine wird aufgeweckt...", false); }
|
||||||
}
|
}
|
||||||
|
// Aufwecken direkt in die kalte Extraktion. Reihenfolge ist wichtig: erst den Modus scharf
|
||||||
|
// stellen, dann den Standby beenden - sonst heizt der Wasserkreis in der Zwischenzeit an,
|
||||||
|
// und genau das soll die Funktion ja verhindern.
|
||||||
|
static void wake_cold_cb(lv_event_t*) {
|
||||||
|
wake_confirm_hide();
|
||||||
|
if (g_client) {
|
||||||
|
g_client->sendAction("startColdExtraction");
|
||||||
|
g_client->sendAction("deactivateStandby");
|
||||||
|
showToast("Aufwecken mit Cold Extraction...", false);
|
||||||
|
}
|
||||||
|
}
|
||||||
bool ui_wake_dialog_open() { return g_wakeDialogOpen; } // fuer die Helligkeitssteuerung in onState
|
bool ui_wake_dialog_open() { return g_wakeDialogOpen; } // fuer die Helligkeitssteuerung in onState
|
||||||
|
|
||||||
// =====================================================================================
|
// =====================================================================================
|
||||||
@@ -1315,16 +1360,7 @@ static void build_temp(lv_obj_t* p) {
|
|||||||
lv_obj_add_event_cb(swEco, eco_cb, LV_EVENT_VALUE_CHANGED, nullptr);
|
lv_obj_add_event_cb(swEco, eco_cb, LV_EVENT_VALUE_CHANGED, nullptr);
|
||||||
swMaint = add_switch(p, "Wartungsmodus");
|
swMaint = add_switch(p, "Wartungsmodus");
|
||||||
lv_obj_add_event_cb(swMaint, maint_cb, LV_EVENT_VALUE_CHANGED, nullptr);
|
lv_obj_add_event_cb(swMaint, maint_cb, LV_EVENT_VALUE_CHANGED, nullptr);
|
||||||
swColdEx = add_switch(p, "Cold Extraction");
|
// Cold Extraction hat eine eigene Seite (PG_COLDEX) - Schalter und Parameter stehen dort.
|
||||||
lv_obj_add_event_cb(swColdEx, coldex_cb, LV_EVENT_VALUE_CHANGED, nullptr);
|
|
||||||
lblColdExHint = lv_label_create(p);
|
|
||||||
lv_label_set_long_mode(lblColdExHint, LV_LABEL_LONG_WRAP);
|
|
||||||
lv_obj_set_width(lblColdExHint, LV_PCT(100));
|
|
||||||
lv_obj_set_style_text_color(lblColdExHint, COL_TEXT_DIM, 0);
|
|
||||||
lv_label_set_text(lblColdExHint, "");
|
|
||||||
// Beide Zeilen bleiben versteckt, solange die S3 die Funktion nicht freigeschaltet meldet
|
|
||||||
lv_obj_add_flag(lv_obj_get_parent(swColdEx), LV_OBJ_FLAG_HIDDEN);
|
|
||||||
lv_obj_add_flag(lblColdExHint, LV_OBJ_FLAG_HIDDEN);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// =====================================================================================
|
// =====================================================================================
|
||||||
@@ -1998,28 +2034,109 @@ static void send_save_brew(lv_event_t*) {
|
|||||||
showToast("Speichere Brühen...", false);
|
showToast("Speichere Brühen...", false);
|
||||||
}
|
}
|
||||||
static void build_brew(lv_obj_t* p) {
|
static void build_brew(lv_obj_t* p) {
|
||||||
section_title(p, "Pre-Infusion");
|
// Jede Funktion in einer eigenen Karte - vorher standen alle Zeilen unter blossen
|
||||||
swPI = add_switch(p, "Aktiv");
|
// Zwischenueberschriften untereinander und waren kaum auseinanderzuhalten.
|
||||||
taPiDur = add_num(p, "Dauer (s)");
|
lv_obj_t* cPI = group_card(p, "Pre-Infusion", "Pumpe an - aus - an, vor dem eigentlichen Bezug");
|
||||||
taPiPause = add_num(p, "Pause (s)");
|
swPI = add_switch(cPI, "Aktiv");
|
||||||
section_title(p, "Brew-by-Time / Weight / Steam-by-Time");
|
taPiDur = add_num(cPI, "Dauer (s)");
|
||||||
swBBT = add_switch(p, "Brew-by-Time aktiv");
|
taPiPause = add_num(cPI, "Pause (s)");
|
||||||
taBbtSecs = add_num(p, "Zielzeit (s)");
|
|
||||||
swBBW = add_switch(p, "Brew-by-Weight aktiv");
|
lv_obj_t* cBBT = group_card(p, "Brew-by-Time", "Beendet den Bezug nach der Zielzeit");
|
||||||
taBbwTarget= add_num(p, "Zielgewicht (g)");
|
swBBT = add_switch(cBBT, "Aktiv");
|
||||||
taBbwOffset= add_num(p, "Offset (g)");
|
taBbtSecs = add_num(cBBT, "Zielzeit (s)");
|
||||||
swSBT = add_switch(p, "Steam-by-Time aktiv");
|
|
||||||
taSbtSecs = add_num(p, "Dampf-Zielzeit (s)");
|
lv_obj_t* cBBW = group_card(p, "Brew-by-Weight", "Beendet den Bezug beim Zielgewicht (braucht Waage)");
|
||||||
|
swBBW = add_switch(cBBW, "Aktiv");
|
||||||
|
taBbwTarget= add_num(cBBW, "Zielgewicht (g)");
|
||||||
|
taBbwOffset= add_num(cBBW, "Offset (g)");
|
||||||
|
|
||||||
|
lv_obj_t* cSBT = group_card(p, "Dampf-Timer", "Beendet den Dampfbezug automatisch");
|
||||||
|
swSBT = add_switch(cSBT, "Aktiv");
|
||||||
|
taSbtSecs = add_num(cSBT, "Zielzeit (s)");
|
||||||
|
|
||||||
add_save_button(p, "Brühen speichern", send_save_brew);
|
add_save_button(p, "Brühen speichern", send_save_brew);
|
||||||
// Cold Extraction: nur Anzeige. Die Parameter liegen bewusst nur in der Web-UI der S3
|
}
|
||||||
// (maschinenabhaengig, nicht ueber saveBrew erreichbar); geschaltet wird der Modus
|
|
||||||
// auf der Temperatur-Seite unter "Modi".
|
// =====================================================================================
|
||||||
lblBrewColdEx = lv_label_create(p);
|
// Cold Extraction (eigene Seite)
|
||||||
lv_label_set_long_mode(lblBrewColdEx, LV_LABEL_LONG_WRAP);
|
// =====================================================================================
|
||||||
lv_obj_set_width(lblBrewColdEx, LV_PCT(100));
|
static void send_save_coldex(lv_event_t*) {
|
||||||
lv_obj_set_style_text_color(lblBrewColdEx, COL_TEXT_DIM, 0);
|
if (!g_client) return;
|
||||||
lv_label_set_text(lblBrewColdEx, "");
|
String f;
|
||||||
lv_obj_add_flag(lblBrewColdEx, LV_OBJ_FLAG_HIDDEN);
|
f += "\"cxEnabled\":"; f += boolStr(sw_get(swCxEnabled)); f += ",";
|
||||||
|
f += "\"cxMaxTemp\":"; f += String(ta_f(taCxMaxTemp), 1); f += ",";
|
||||||
|
f += "\"cxPreInf\":"; f += String(ta_f(taCxPreInf), 1); f += ",";
|
||||||
|
f += "\"cxPreInfDuty\":"; f += String(ta_f(taCxPreInfDuty), 1); f += ",";
|
||||||
|
f += "\"cxPulseMs\":"; f += String((int)ta_f(taCxPulseMs)); f += ",";
|
||||||
|
f += "\"cxDuty\":"; f += String(ta_f(taCxDuty), 1); f += ",";
|
||||||
|
f += "\"cxTarget\":"; f += String(ta_f(taCxTarget), 1); f += ",";
|
||||||
|
f += "\"cxMaxSecs\":"; f += String(ta_f(taCxMaxSecs), 1); f += ",";
|
||||||
|
f += "\"cxPumpMaxRun\":"; f += String(ta_f(taCxPumpMaxRun), 1); f += ",";
|
||||||
|
f += "\"cxPumpRest\":"; f += String(ta_f(taCxPumpRest), 1);
|
||||||
|
g_client->sendCommand("saveBrew", f);
|
||||||
|
g_cxEditMs = millis();
|
||||||
|
showToast("Speichere Cold Extraction...", false);
|
||||||
|
}
|
||||||
|
static void build_coldex(lv_obj_t* p) {
|
||||||
|
lv_obj_t* cMode = group_card(p, "Modus",
|
||||||
|
"Schaltet die Wasserheizung ab. Auch im Standby und bei warmem Kessel schaltbar; "
|
||||||
|
"bezogen werden kann erst unterhalb der Freigabetemperatur.");
|
||||||
|
swColdEx = add_switch(cMode, "Cold Extraction aktiv");
|
||||||
|
lv_obj_add_event_cb(swColdEx, coldex_cb, LV_EVENT_VALUE_CHANGED, nullptr);
|
||||||
|
lblColdExHint = lv_label_create(cMode);
|
||||||
|
lv_label_set_long_mode(lblColdExHint, LV_LABEL_LONG_WRAP);
|
||||||
|
lv_obj_set_width(lblColdExHint, LV_PCT(100));
|
||||||
|
lv_obj_set_style_text_color(lblColdExHint, COL_TEXT_DIM, 0);
|
||||||
|
lv_label_set_text(lblColdExHint, "");
|
||||||
|
|
||||||
|
lv_obj_t* cBase = group_card(p, "Grundeinstellung");
|
||||||
|
swCxEnabled = add_switch(cBase, "Funktion freigeschaltet");
|
||||||
|
taCxMaxTemp = add_num(cBase, "Freigabe bis (°C)");
|
||||||
|
|
||||||
|
lv_obj_t* cPre = group_card(p, "Vorbenetzung",
|
||||||
|
"Deutlich schwächer als der Hauptbezug: Kaltes Mehl quillt nicht, volle Leistung legt "
|
||||||
|
"Kanäle an, die sich nie wieder schließen.");
|
||||||
|
taCxPreInf = add_num(cPre, "Dauer (s)");
|
||||||
|
taCxPreInfDuty = add_num(cPre, "Pumpenleistung (%)");
|
||||||
|
|
||||||
|
lv_obj_t* cMain = group_card(p, "Hauptbezug",
|
||||||
|
"Das kalte Kaffeebett ist viel durchlässiger als ein heißes - niedrige Werte sind normal.");
|
||||||
|
taCxPulseMs = add_num(cMain, "Pulsperiode (ms)");
|
||||||
|
taCxDuty = add_num(cMain, "Pumpenleistung (%)");
|
||||||
|
|
||||||
|
lv_obj_t* cEnd = group_card(p, "Bezugsende",
|
||||||
|
"Ohne Waage ist das Zielgewicht wirkungslos, dann zählt die maximale Dauer.");
|
||||||
|
taCxTarget = add_num(cEnd, "Zielgewicht (g)");
|
||||||
|
taCxMaxSecs = add_num(cEnd, "Max. Dauer (s)");
|
||||||
|
|
||||||
|
lv_obj_t* cPump = group_card(p, "Pumpenschutz",
|
||||||
|
"Gezählt wird die kumulierte Einschaltzeit der Pumpe, nicht die Bezugsdauer.");
|
||||||
|
taCxPumpMaxRun = add_num(cPump, "Max. Laufzeit (s)");
|
||||||
|
taCxPumpRest = add_num(cPump, "Zwangspause (s)");
|
||||||
|
|
||||||
|
lblCxPageHint = lv_label_create(p);
|
||||||
|
lv_label_set_long_mode(lblCxPageHint, LV_LABEL_LONG_WRAP);
|
||||||
|
lv_obj_set_width(lblCxPageHint, LV_PCT(100));
|
||||||
|
lv_obj_set_style_text_color(lblCxPageHint, COL_WARN, 0);
|
||||||
|
lv_label_set_text(lblCxPageHint, "");
|
||||||
|
lv_obj_add_flag(lblCxPageHint, LV_OBJ_FLAG_HIDDEN);
|
||||||
|
|
||||||
|
add_save_button(p, "Cold Extraction speichern", send_save_coldex);
|
||||||
|
}
|
||||||
|
// Felder nur beim Oeffnen der Seite fuellen - laufende State-Pushes duerfen eine
|
||||||
|
// begonnene Eingabe nicht ueberschreiben (gleiches Muster wie populate_brew).
|
||||||
|
static void populate_coldex(const MachineState& st) {
|
||||||
|
if (!taCxMaxTemp) return;
|
||||||
|
sw_set(swCxEnabled, st.cxEnabled);
|
||||||
|
ta_setf(taCxMaxTemp, st.cxMaxTemp, 1);
|
||||||
|
ta_setf(taCxPreInf, st.cxPreInfSec, 0);
|
||||||
|
ta_setf(taCxPreInfDuty, st.cxPreInfDuty, 0);
|
||||||
|
ta_setf(taCxPulseMs, (float)st.cxPulseMs, 0);
|
||||||
|
ta_setf(taCxDuty, st.cxDuty, 0);
|
||||||
|
ta_setf(taCxTarget, st.cxTarget, 0);
|
||||||
|
ta_setf(taCxMaxSecs, st.cxMaxSecs, 0);
|
||||||
|
ta_setf(taCxPumpMaxRun, st.cxPumpMaxRun, 0);
|
||||||
|
ta_setf(taCxPumpRest, st.cxPumpRest, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// =====================================================================================
|
// =====================================================================================
|
||||||
@@ -2348,7 +2465,7 @@ static void build_wifi(lv_obj_t* p) {
|
|||||||
// Aktionszeile: Scan + gewaehltes Netz
|
// Aktionszeile: Scan + gewaehltes Netz
|
||||||
lv_obj_t* ar = row(p, nullptr);
|
lv_obj_t* ar = row(p, nullptr);
|
||||||
g_btnScan = th_accent_button(ar, LV_SYMBOL_REFRESH " Netzwerke suchen");
|
g_btnScan = th_accent_button(ar, LV_SYMBOL_REFRESH " Netzwerke suchen");
|
||||||
lv_obj_set_style_bg_opa(g_btnScan, LV_OPA_40, LV_PART_MAIN | LV_STATE_DISABLED);
|
lv_obj_set_style_bg_opa(g_btnScan, LV_OPA_40, TH_SEL(LV_PART_MAIN, LV_STATE_DISABLED));
|
||||||
lv_obj_add_event_cb(g_btnScan, wifi_scan_cb, LV_EVENT_CLICKED, nullptr);
|
lv_obj_add_event_cb(g_btnScan, wifi_scan_cb, LV_EVENT_CLICKED, nullptr);
|
||||||
lblWifiSel = lv_label_create(ar);
|
lblWifiSel = lv_label_create(ar);
|
||||||
lv_label_set_text(lblWifiSel, "Netz: -");
|
lv_label_set_text(lblWifiSel, "Netz: -");
|
||||||
@@ -2585,13 +2702,13 @@ static void build_profiles(lv_obj_t* p) {
|
|||||||
lv_obj_set_style_text_color(profDetailLbl, COL_TEXT_DIM, 0);
|
lv_obj_set_style_text_color(profDetailLbl, COL_TEXT_DIM, 0);
|
||||||
profLoadBtn = th_accent_button(dcard, "Profil laden");
|
profLoadBtn = th_accent_button(dcard, "Profil laden");
|
||||||
lv_obj_set_width(profLoadBtn, LV_PCT(100));
|
lv_obj_set_width(profLoadBtn, LV_PCT(100));
|
||||||
lv_obj_set_style_bg_opa(profLoadBtn, LV_OPA_40, LV_PART_MAIN | LV_STATE_DISABLED);
|
lv_obj_set_style_bg_opa(profLoadBtn, LV_OPA_40, TH_SEL(LV_PART_MAIN, LV_STATE_DISABLED));
|
||||||
lv_obj_add_state(profLoadBtn, LV_STATE_DISABLED);
|
lv_obj_add_state(profLoadBtn, LV_STATE_DISABLED);
|
||||||
lv_obj_add_event_cb(profLoadBtn, prof_do_load_cb, LV_EVENT_CLICKED, nullptr);
|
lv_obj_add_event_cb(profLoadBtn, prof_do_load_cb, LV_EVENT_CLICKED, nullptr);
|
||||||
|
|
||||||
profDelBtn = th_button(dcard, "Profil löschen", COL_DANGER, COL_TEXT);
|
profDelBtn = th_button(dcard, "Profil löschen", COL_DANGER, COL_TEXT);
|
||||||
lv_obj_set_width(profDelBtn, LV_PCT(100));
|
lv_obj_set_width(profDelBtn, LV_PCT(100));
|
||||||
lv_obj_set_style_bg_opa(profDelBtn, LV_OPA_40, LV_PART_MAIN | LV_STATE_DISABLED);
|
lv_obj_set_style_bg_opa(profDelBtn, LV_OPA_40, TH_SEL(LV_PART_MAIN, LV_STATE_DISABLED));
|
||||||
lv_obj_add_state(profDelBtn, LV_STATE_DISABLED);
|
lv_obj_add_state(profDelBtn, LV_STATE_DISABLED);
|
||||||
lv_obj_add_event_cb(profDelBtn, prof_delete_cb, LV_EVENT_CLICKED, nullptr);
|
lv_obj_add_event_cb(profDelBtn, prof_delete_cb, LV_EVENT_CLICKED, nullptr);
|
||||||
}
|
}
|
||||||
@@ -3100,6 +3217,7 @@ void ui_init(ProtocolClient* client) {
|
|||||||
g_pages[PG_TEMP] = make_page(g_content); build_temp(g_pages[PG_TEMP]);
|
g_pages[PG_TEMP] = make_page(g_content); build_temp(g_pages[PG_TEMP]);
|
||||||
g_pages[PG_LIGHT] = make_page(g_content); build_light(g_pages[PG_LIGHT]);
|
g_pages[PG_LIGHT] = make_page(g_content); build_light(g_pages[PG_LIGHT]);
|
||||||
g_pages[PG_BREW] = make_page(g_content); build_brew(g_pages[PG_BREW]);
|
g_pages[PG_BREW] = make_page(g_content); build_brew(g_pages[PG_BREW]);
|
||||||
|
g_pages[PG_COLDEX] = make_page(g_content); build_coldex(g_pages[PG_COLDEX]);
|
||||||
g_pages[PG_SERVICE] = make_page(g_content); build_service(g_pages[PG_SERVICE]);
|
g_pages[PG_SERVICE] = make_page(g_content); build_service(g_pages[PG_SERVICE]);
|
||||||
g_pages[PG_WIFI] = make_page(g_content); build_wifi(g_pages[PG_WIFI]);
|
g_pages[PG_WIFI] = make_page(g_content); build_wifi(g_pages[PG_WIFI]);
|
||||||
g_pages[PG_PROFILE] = make_page(g_content); build_profiles(g_pages[PG_PROFILE]);
|
g_pages[PG_PROFILE] = make_page(g_content); build_profiles(g_pages[PG_PROFILE]);
|
||||||
@@ -3224,6 +3342,13 @@ void ui_init(ProtocolClient* client) {
|
|||||||
lv_obj_t* wakeYes = th_accent_button(wakeBtns, "Aufwecken");
|
lv_obj_t* wakeYes = th_accent_button(wakeBtns, "Aufwecken");
|
||||||
lv_obj_set_width(wakeYes, 150);
|
lv_obj_set_width(wakeYes, 150);
|
||||||
lv_obj_add_event_cb(wakeYes, wake_yes_cb, LV_EVENT_CLICKED, nullptr);
|
lv_obj_add_event_cb(wakeYes, wake_yes_cb, LV_EVENT_CLICKED, nullptr);
|
||||||
|
// Zweite Zeile: direkt in die kalte Extraktion aufwecken. Ohne diesen Weg muesste man
|
||||||
|
// erst normal aufwecken (Maschine heizt an) und den Modus danach umschalten.
|
||||||
|
// Nur sichtbar, wenn die S3 die Funktion freigeschaltet meldet (siehe ui_update).
|
||||||
|
g_wakeColdBtn = th_button(wakeCard, "Aufwecken mit Cold Extraction", COL_CARD2, COL_ACCENT);
|
||||||
|
lv_obj_set_width(g_wakeColdBtn, LV_PCT(100));
|
||||||
|
lv_obj_add_event_cb(g_wakeColdBtn, wake_cold_cb, LV_EVENT_CLICKED, nullptr);
|
||||||
|
lv_obj_add_flag(g_wakeColdBtn, LV_OBJ_FLAG_HIDDEN);
|
||||||
lv_obj_add_flag(g_wakeConfirm, LV_OBJ_FLAG_HIDDEN);
|
lv_obj_add_flag(g_wakeConfirm, LV_OBJ_FLAG_HIDDEN);
|
||||||
|
|
||||||
// OTA-Overlay (Vollbild, waehrend Firmware-Update)
|
// OTA-Overlay (Vollbild, waehrend Firmware-Update)
|
||||||
@@ -3446,6 +3571,15 @@ void ui_update(const MachineState& st) {
|
|||||||
|
|
||||||
// Cold-Extraction-Hinweis: erklaert dauerhaft, warum der Wasserkreis nicht heizt.
|
// Cold-Extraction-Hinweis: erklaert dauerhaft, warum der Wasserkreis nicht heizt.
|
||||||
// Transiente Meldung (abgewiesener Start / Abbruch) hat Vorrang vor dem Dauerzustand.
|
// Transiente Meldung (abgewiesener Start / Abbruch) hat Vorrang vor dem Dauerzustand.
|
||||||
|
// Ohne nutzbare Waage laeuft die kalte Extraktion rein zeitgesteuert (Zielgewicht und
|
||||||
|
// Stillstands-Erkennung greifen nicht) - das wird dauerhaft mit angezeigt.
|
||||||
|
const bool cxScaleOk = st.scaleEnabled && st.scaleConnected;
|
||||||
|
// "Aufwecken mit Cold Extraction" nur anbieten, wenn die Funktion freigeschaltet und
|
||||||
|
// umschaltbar ist und der Modus nicht ohnehin schon laeuft.
|
||||||
|
if (g_wakeColdBtn) {
|
||||||
|
if (st.cxEnabled && st.cxArmable && !st.cxActive) lv_obj_remove_flag(g_wakeColdBtn, LV_OBJ_FLAG_HIDDEN);
|
||||||
|
else lv_obj_add_flag(g_wakeColdBtn, LV_OBJ_FLAG_HIDDEN);
|
||||||
|
}
|
||||||
if (st.cxNotice == 2) {
|
if (st.cxNotice == 2) {
|
||||||
status_set(ST_COLDEX, true, LV_SYMBOL_WARNING " Cold Extraction beendet: kein Zulauf",
|
status_set(ST_COLDEX, true, LV_SYMBOL_WARNING " Cold Extraction beendet: kein Zulauf",
|
||||||
COL_WARN, lv_color_hex(0x000000));
|
COL_WARN, lv_color_hex(0x000000));
|
||||||
@@ -3456,6 +3590,9 @@ void ui_update(const MachineState& st) {
|
|||||||
String t = "Cold Extraction nicht möglich - ";
|
String t = "Cold Extraction nicht möglich - ";
|
||||||
t += coldex_block_text(st.cxBlock, st.cxMaxTemp, st.tempW);
|
t += coldex_block_text(st.cxBlock, st.cxMaxTemp, st.tempW);
|
||||||
status_set(ST_COLDEX, true, t.c_str(), COL_WARN, lv_color_hex(0x000000));
|
status_set(ST_COLDEX, true, t.c_str(), COL_WARN, lv_color_hex(0x000000));
|
||||||
|
} else if (st.cxNotice == 4) {
|
||||||
|
status_set(ST_COLDEX, true, LV_SYMBOL_WARNING " Cold Extraction ohne Waage: Bezug endet nach Zeit",
|
||||||
|
COL_WARN, lv_color_hex(0x000000));
|
||||||
} else if (st.cxActive && st.cxResting) {
|
} else if (st.cxActive && st.cxResting) {
|
||||||
status_set(ST_COLDEX, true, "Cold Extraction: Pumpenpause (Pumpenschutz)",
|
status_set(ST_COLDEX, true, "Cold Extraction: Pumpenpause (Pumpenschutz)",
|
||||||
COL_ACCENT, lv_color_hex(0x000000));
|
COL_ACCENT, lv_color_hex(0x000000));
|
||||||
@@ -3463,6 +3600,11 @@ void ui_update(const MachineState& st) {
|
|||||||
String t = "Cold Extraction aktiv, Bezug gesperrt - ";
|
String t = "Cold Extraction aktiv, Bezug gesperrt - ";
|
||||||
t += coldex_block_text(st.cxBlock, st.cxMaxTemp, st.tempW);
|
t += coldex_block_text(st.cxBlock, st.cxMaxTemp, st.tempW);
|
||||||
status_set(ST_COLDEX, true, t.c_str(), COL_WARN, lv_color_hex(0x000000));
|
status_set(ST_COLDEX, true, t.c_str(), COL_WARN, lv_color_hex(0x000000));
|
||||||
|
} else if (st.cxActive && !cxScaleOk) {
|
||||||
|
// Dauerhinweis, solange ohne Waage gefahren wird: das Zielgewicht greift nicht,
|
||||||
|
// der Bezug endet erst nach der maximalen Bezugsdauer.
|
||||||
|
status_set(ST_COLDEX, true, "Cold Extraction aktiv - ohne Waage, Ende nach Zeit",
|
||||||
|
COL_WARN, lv_color_hex(0x000000));
|
||||||
} else if (st.cxActive) {
|
} else if (st.cxActive) {
|
||||||
status_set(ST_COLDEX, true, "Cold Extraction aktiv - Wasserkreis heizt nicht",
|
status_set(ST_COLDEX, true, "Cold Extraction aktiv - Wasserkreis heizt nicht",
|
||||||
lv_color_hex(0x1976d2), COL_TEXT);
|
lv_color_hex(0x1976d2), COL_TEXT);
|
||||||
@@ -3840,18 +3982,27 @@ void ui_update(const MachineState& st) {
|
|||||||
if (lblColdExHint) lv_obj_add_flag(lblColdExHint, LV_OBJ_FLAG_HIDDEN);
|
if (lblColdExHint) lv_obj_add_flag(lblColdExHint, LV_OBJ_FLAG_HIDDEN);
|
||||||
}
|
}
|
||||||
sw_set(swColdEx, st.cxActive);
|
sw_set(swColdEx, st.cxActive);
|
||||||
// Einschalten nur bei Freigabe; Ausschalten immer - ausser waehrend eines kalten Bezugs
|
// Umschalten haengt an cxArmable, NICHT an cxAllowed: Der Modus muss auch im Standby
|
||||||
bool usable = st.cxEnabled && (st.cxActive ? !st.cxShot : st.cxAllowed);
|
// und bei warmem Kessel scharf zu stellen sein. Waehrend eines kalten Bezugs gesperrt.
|
||||||
|
bool usable = st.cxEnabled && st.cxArmable && !(st.cxActive && st.cxShot);
|
||||||
if (usable) lv_obj_remove_state(swColdEx, LV_STATE_DISABLED);
|
if (usable) lv_obj_remove_state(swColdEx, LV_STATE_DISABLED);
|
||||||
else lv_obj_add_state(swColdEx, LV_STATE_DISABLED);
|
else lv_obj_add_state(swColdEx, LV_STATE_DISABLED);
|
||||||
if (lblColdExHint && st.cxEnabled) {
|
if (lblColdExHint && st.cxEnabled) {
|
||||||
|
const bool scaleOk = st.scaleEnabled && st.scaleConnected;
|
||||||
String hint;
|
String hint;
|
||||||
if (st.cxActive) {
|
if (st.cxActive) {
|
||||||
hint = "Wasserkreis heizt nicht (bleibt über Standby und Neustart aktiv). ";
|
hint = "Wasserkreis heizt nicht (bleibt über Standby und Neustart aktiv). ";
|
||||||
if (st.cxAllowed) {
|
if (st.standbyActive) {
|
||||||
|
hint += "Nach dem Aufwecken bleibt der Wasserkreis aus.";
|
||||||
|
} else if (st.cxAllowed) {
|
||||||
char b[96];
|
char b[96];
|
||||||
snprintf(b, sizeof(b), "Bezug regulär starten - Ziel %.0f g, max %.0f s.",
|
if (scaleOk) {
|
||||||
(double)st.cxTarget, (double)st.cxMaxSecs);
|
snprintf(b, sizeof(b), "Bezug regulär starten - Ziel %.0f g, max %.0f s.",
|
||||||
|
(double)st.cxTarget, (double)st.cxMaxSecs);
|
||||||
|
} else {
|
||||||
|
snprintf(b, sizeof(b), "Bezug regulär starten - Ende nach %.0f s.",
|
||||||
|
(double)st.cxMaxSecs);
|
||||||
|
}
|
||||||
hint += b;
|
hint += b;
|
||||||
} else {
|
} else {
|
||||||
hint += coldex_block_text(st.cxBlock, st.cxMaxTemp, st.tempW);
|
hint += coldex_block_text(st.cxBlock, st.cxMaxTemp, st.tempW);
|
||||||
@@ -3865,22 +4016,25 @@ void ui_update(const MachineState& st) {
|
|||||||
(double)st.tempW, (double)st.cxMaxTemp);
|
(double)st.tempW, (double)st.cxMaxTemp);
|
||||||
hint = b;
|
hint = b;
|
||||||
}
|
}
|
||||||
|
if (!scaleOk) {
|
||||||
|
hint += " Ohne Waage: Zielgewicht und Stillstands-Erkennung greifen nicht, "
|
||||||
|
"der Bezug endet erst nach der maximalen Bezugsdauer.";
|
||||||
|
}
|
||||||
label_set_if_changed(lblColdExHint, hint.c_str());
|
label_set_if_changed(lblColdExHint, hint.c_str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (lblBrewColdEx) {
|
if (lblCxPageHint) {
|
||||||
if (st.cxEnabled) {
|
// Warnhinweis auf der Cold-Extraction-Seite (Waage fehlt bzw. Funktion gesperrt)
|
||||||
char b[192];
|
String h;
|
||||||
snprintf(b, sizeof(b),
|
if (st.cxEnabled && !cxScaleOk) {
|
||||||
"Cold Extraction (nur Anzeige, Einstellung in der Web-UI):\n"
|
h = "Keine Waage aktiv/verbunden: Zielgewicht und Stillstands-Erkennung greifen nicht, "
|
||||||
"Freigabe < %.1f °C | Vorbenetzung %.0f s | Ziel %.0f g | max. %.0f s\n"
|
"der Bezug endet erst nach der maximalen Dauer.";
|
||||||
"Geschaltet wird der Modus auf der Seite \"Temperaturen\" unter \"Modi\".",
|
}
|
||||||
(double)st.cxMaxTemp, (double)st.cxPreInfSec,
|
if (h.length() > 0) {
|
||||||
(double)st.cxTarget, (double)st.cxMaxSecs);
|
label_set_if_changed(lblCxPageHint, h.c_str());
|
||||||
label_set_if_changed(lblBrewColdEx, b);
|
lv_obj_remove_flag(lblCxPageHint, LV_OBJ_FLAG_HIDDEN);
|
||||||
lv_obj_remove_flag(lblBrewColdEx, LV_OBJ_FLAG_HIDDEN);
|
|
||||||
} else {
|
} else {
|
||||||
lv_obj_add_flag(lblBrewColdEx, LV_OBJ_FLAG_HIDDEN);
|
lv_obj_add_flag(lblCxPageHint, LV_OBJ_FLAG_HIDDEN);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user