Commit Graph

5 Commits

Author SHA1 Message Date
MaPaLo76
6c8be70eb9 fix(display): FR-014 MAX7219 Re-Init + redraw() nach Relais-Umschaltung (v1.5.2)
- DisplayManager::reinit() setzt nur Kontroll-Register (ohne clear())
- Neues State-Tracking: show*() speichert letzten Zustand intern
- Neues redraw(): zeichnet alle Zonen nach reinit() sofort neu
- LaserTracker::onSessionStart/onSessionEnd rufen display.reinit() auf
2026-03-06 21:48:14 +01:00
MaPaLo76
c61a67f812 feat(web+mqtt): FR-010 Webinterface-Redesign + MQTT-Steuerung
Webinterface:
- /: oeffentlich, Laser Cutter Status, m:ss, an/aus, Display-Toggle (fetch/204)
- /config: H2-Abschnitte (Status, MQTT, Webzugang, Geraet, Tools)
  Maschinenlaufzeit h:mm:ss, Reboot-Button (disabled bei aktivem Laser)
- /reset-total: neue POST-Route fuer NVS-Maschinenlaufzeit-Reset (Auth)
- /display-toggle: POST, 204, kein Seitenwechsel
- /reboot: POST, Auth, ESP.restart()

DisplayManager:
- setEnabled()/isEnabled() via MAX7219 SHUTDOWN-Modus

MQTT:
- lasercutter/reset -> lasercutter/cmd (MQTT_TOPIC_CMD)
- Kommandos: reset_session_nvs, reset_session_ram, display, reboot
- Heartbeat lasercutter/status: display_on-Feld hinzugefuegt
2026-03-01 17:28:47 +01:00
MaPaLo76
e273f1ea6c feat(display): showSessionRing - Sekunden-Kreisanzeige auf Modulen 5-7, 12-Uhr-Start (Phase 5b / 5.7 abgeschlossen) 2026-02-23 20:19:33 +01:00
MaPaLo76
26a4e9b95c fix(display): redesign module layout - integer minutes, dedicated error slots
New module assignment:
  Module 0       : WiFi error indicator (showWifiError) - 'W' / blank
  Module 1-3     : laser time in full minutes, 3-digit right-aligned
  Module 4       : MQTT error indicator (showMqttError) - 'M' / blank
  Module 5-7     : countdown seconds / idle / status, 3-digit right-aligned

Changes in display_manager.h:
- Update zone layout comments
- showLaserTime: integer minutes only, writes modules 1-3 (module 0 untouched)
- showCountdown: writes modules 5-7 only (module 4 untouched)
- showIdle: ' --' on modules 5-7
- showStatus: 3-char string on modules 5-7
- Add showWifiError(bool): module 0
- Add showMqttError(bool): module 4

Changes in display_manager.cpp:
- Add BMP_M character bitmap
- Add 'M' case in charBitmap()
- Rewrite showLaserTime() - round to int, 3 chars, modules 1-3
- Rewrite showCountdown() - 3 chars, modules 5-7
- Rewrite showIdle() - ' --' on modules 5-7
- Rewrite showStatus() - 3 chars, modules 5-7
- Add showWifiError() / showMqttError() implementations
- Update printToSerial() log output

Changes in test_sketch:
- 9 test steps covering all new methods incl. combination test
- Tested on hardware: all steps passed
2026-02-22 14:15:18 +01:00
MaPaLo76
4349b37f05 feat(display): implement DisplayManager with raw MD_MAX72XX
- Add include/display_manager.h: DisplayManager class declaration
  - Two-zone layout: Zone 0 (top, laser time), Zone 1 (bottom, countdown/status)
  - showLaserTime(), showCountdown(), showIdle(), showStatus(), setBrightness()
  - rotateCCW() bitmap transformation for 90 deg physical module rotation
  - charBitmap() for 17-character set (0-9, space, dash, dot, special chars)

- Add src/display_manager.cpp: full implementation
  - Double-init pattern for SPI power stability
  - showLaserTime() format: <10 -> ' x.x', <100 -> 'xx.x', <1000 -> ' xxx', else 'xxxx'
  - showCountdown() right-aligned 4-char format
  - All methods use writeZone() -> writeChar() -> rotateCCW() -> MD_MAX72XX

- Add test_sketches/test_display_manager.cpp: 6-step verification test
  - allLedsOn/Off, showLaserTime (12 boundary values), showCountdown 5->0
  - showIdle, showStatus (Err/AP/WiFi/oF), live simulation loop

- Update platformio.ini: add test-display-mgr environment
- Update src/main.cpp: integrate display.begin/showIdle/update
- Update Implementation-Plan.md: mark Phase 4 tasks 4.1-4.3 complete

Tested on hardware: all 6 test steps passed
2026-02-22 14:00:54 +01:00