You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Summary
Refactors the codebase from a single DM40-only app into a
device-agnostic framework and adds an experimental EL15 electronic load
handler.
## Changes
### Architecture refactor
- `shared/base_app.py` — device-independent UI (BLE scanning, connection
lifecycle, raw packet log, waveform, stats) extracted into a reusable
`App` base class
- `shared/ble_worker.py` — BLE transport decoupled from device logic;
emits typed callbacks
- `shared/device_registry.py` — maps device-type strings to handler
classes, BLE name prefixes, and discovery family bytes; local imports
inside `load_handler()` break the circular import while remaining
statically traceable by Nuitka
- `dm40/app.py` — existing logic moved into `DM40Handler`; no functional
changes
### EL15 handler (experimental)
- 28-byte frame parser covering CC, CV, CR, CP, CAP, DCR, ADV, POW
[A/DT/RPT], ADV [S]
- Protection fault detection via byte 5 bits 1+2; decodes
UVP/REV/generic codes from byte 6 upper nibble
- `_last_valid_mode` prevents fault-bit collisions (CAP↔CC, DCR↔CV) from
corrupting the mode display
- UI: mode bar, voltage waveform with U/I/P tooltip, temperature (3
d.p.), runtime, fan speed, setpoint entry, warning/fault detection
### Other
- Waveform tooltip supports a custom value label and extra lines;
timestamp always last
- Raw packet log: auto-scroll only follows output when already at the
bottom (terminal behaviour)
0 commit comments