The settings card sets things
The card added last commit showed the charger's settings and did nothing with them, which for a page whose whole point is acting on the charger is half a card. It also took the settings block out of the readings card to do it, so reading the charger top to bottom now had a hole in it. The readings card is whole again — phases, live data, settings, device, alarms, exactly as before. What the settings card holds is the same values with controls on them. Which values get a control is the register map's decision, not a design one. Six holding registers are writable, and four of them are settings: the current ceiling, boost, the timeout and the phase count. Charging mode, the two balancing flags and the LED brightness sit in the measurement block, which the charger reports over FC04 and does not accept writes on — they are set in the Anker app. So the card is in two halves and says which is which, rather than offering a control that would quietly do nothing. The limits come from the same places the server's own checks do: the slider floors at 6 A because below that the charger pauses instead of charging slowly and ModbusSetMaxCurrent refuses it, its ceiling is the charger's reported rating, and the timeout floors just above the spec's "more than five seconds". Phase and boost write on the change itself, having one value each; current and timeout are typed, so they wait for Apply. Every write goes through the existing control action, so it is gated, rate limited and audited like the buttons in the control card, and the card reseeds from the snapshot afterwards — the charger clamps what it is given, and the form should show what it took rather than what was asked. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e1c063d4b1
commit
65a5c67afc
4 files changed
+182
-7
No files matched your search
@@ -117,6 +117,14 @@
|
||||
"live": "Live data",
|
||||
"settings": "Indstillinger",
|
||||
"settingsTitle": "Laderindstillinger",
|
||||
"apply": "Anvend",
|
||||
"turnOn": "Slå til",
|
||||
"turnOff": "Slå fra",
|
||||
"limitFloorHint": "{amps} A er bunden — derunder holder laderen pause i stedet for at lade langsomt.",
|
||||
"boostHint": "Kun den aktuelle session; laderen rydder det, når sessionen slutter.",
|
||||
"timeoutHint": "Mindst {n} sekunder. Laderen falder tilbage til sin egen strategi, hvis intet skriver inden for tiden.",
|
||||
"settingsReported": "Rapporteret, kan ikke indstilles",
|
||||
"settingsReportedHint": "Laderen rapporterer disse; Modbus-kortet har intet register til at skrive dem. Ret dem i Anker-appen.",
|
||||
"device": "Enhed",
|
||||
"alarms": "Alarmer",
|
||||
"phase": "Fase",
|
||||
|
||||
@@ -103,6 +103,14 @@
|
||||
"live": "Live data",
|
||||
"settings": "Settings",
|
||||
"settingsTitle": "Charger settings",
|
||||
"apply": "Apply",
|
||||
"turnOn": "Turn on",
|
||||
"turnOff": "Turn off",
|
||||
"limitFloorHint": "{amps} A is the floor — below it the charger pauses rather than charging slowly.",
|
||||
"boostHint": "The current session only; the charger clears it when the session ends.",
|
||||
"timeoutHint": "At least {n} seconds. The charger falls back to its own strategy if nothing writes within it.",
|
||||
"settingsReported": "Reported, not settable",
|
||||
"settingsReportedHint": "The charger reports these; the Modbus map has no register to write them. Change them in the Anker app.",
|
||||
"device": "Device",
|
||||
"alarms": "Alarms",
|
||||
"phase": "Phase",
|
||||
|
||||
@@ -119,6 +119,14 @@
|
||||
"live": "Dane na żywo",
|
||||
"settings": "Ustawienia",
|
||||
"settingsTitle": "Ustawienia ładowarki",
|
||||
"apply": "Zastosuj",
|
||||
"turnOn": "Włącz",
|
||||
"turnOff": "Wyłącz",
|
||||
"limitFloorHint": "{amps} A to dolna granica — poniżej ładowarka wstrzymuje ładowanie, zamiast ładować wolniej.",
|
||||
"boostHint": "Tylko bieżąca sesja; ładowarka kasuje to po jej zakończeniu.",
|
||||
"timeoutHint": "Co najmniej {n} sekund. Bez zapisu w tym czasie ładowarka wraca do własnej strategii.",
|
||||
"settingsReported": "Raportowane, nieustawialne",
|
||||
"settingsReportedHint": "Ładowarka je raportuje; mapa Modbus nie ma rejestru do ich zapisu. Zmień je w aplikacji Anker.",
|
||||
"device": "Urządzenie",
|
||||
"alarms": "Alarmy",
|
||||
"phase": "Faza",
|
||||
|
||||
Reference in new issue
Block a user