106 lines
2.0 KiB
Markdown
106 lines
2.0 KiB
Markdown
# VersaGUI
|
|
|
|
Windows-Tray-App zur Konfiguration des VersaPad v2.
|
|
Geschrieben in C# mit WinForms.
|
|
|
|
Hinweis:
|
|
Diese GUI ist weiterhin die Referenzimplementierung fuer Protokoll und Datenlayout.
|
|
Parallel existiert mit `VersaGUIDelphi` ein Delphi/VCL-Port unter dem Namen `VersaGUI Delphi`.
|
|
|
|
## Voraussetzungen
|
|
|
|
- Windows 10/11
|
|
- .NET SDK
|
|
- geflashte `VersaMCU`-Firmware
|
|
- Board per USB als CDC-Device verbunden
|
|
|
|
## Starten
|
|
|
|
```bash
|
|
dotnet run
|
|
```
|
|
|
|
## Was die App macht
|
|
|
|
- erkennt das Board automatisch per VID/PID
|
|
- oeffnet den CDC-COM-Port mit aktivem DTR
|
|
- liest beim Verbinden zuerst die Config und danach die Makros
|
|
- zeigt MX-Buttons und Encoder-Aktionen an
|
|
- schreibt Config und Makros getrennt, aber in einem UI-Vorgang auf das Board
|
|
|
|
## Aktueller Datenstand
|
|
|
|
### DeviceConfig
|
|
|
|
- Magic `0x56503203`
|
|
- Version `3`
|
|
- `740` Byte
|
|
- 3 Profile
|
|
- globale Helligkeit
|
|
- per-LED-Helligkeit
|
|
|
|
### MacroTable
|
|
|
|
- 32 Slots
|
|
- 8 Steps pro Slot
|
|
- `512` Byte
|
|
|
|
## Uebertragungsformat
|
|
|
|
Es wird dasselbe 8-Byte-Protokoll wie in der Firmware verwendet.
|
|
|
|
Aktuelle Chunk-Zahlen:
|
|
|
|
- Config: `124`
|
|
- Makros: `86`
|
|
|
|
Speicherablauf:
|
|
|
|
```text
|
|
CONFIG_BEGIN
|
|
CONFIG_DATA x124
|
|
CONFIG_COMMIT
|
|
wait for ACK/NACK
|
|
|
|
MACRO_BEGIN
|
|
MACRO_DATA x86
|
|
MACRO_COMMIT
|
|
wait for ACK/NACK
|
|
```
|
|
|
|
## GUI-Funktionen
|
|
|
|
- HID-Key-Zuweisung inklusive Modifier
|
|
- Consumer-Keys
|
|
- Host-Commands
|
|
- Makros mit bis zu 8 Steps
|
|
- Profilwechsel als ActionType
|
|
- LED-Farbe, Animation und Periode pro MX-Button
|
|
- JSON Import/Export
|
|
|
|
## Projektstruktur
|
|
|
|
```text
|
|
VersaGUI/
|
|
`-- src/
|
|
|-- Program.cs
|
|
|-- TrayApp.cs
|
|
|-- SerialManager.cs
|
|
|-- DeviceConfig.cs
|
|
|-- ConfigForm.cs
|
|
|-- ActionDialog.cs
|
|
|-- ConfigJson.cs
|
|
`-- Protocol.cs
|
|
```
|
|
|
|
## Grenzen / Status
|
|
|
|
- Host-Commands sind protokollseitig vorhanden, aber appseitig noch nicht voll ausgebaut
|
|
- die App ist Windows-only
|
|
- fuer eine alternative GUI ist `VersaGUIDelphi` der aktuelle Delphi/VCL-Port
|
|
|
|
## Weiterfuehrende Doku
|
|
|
|
- [doc/02_device_config.md](doc/02_device_config.md)
|
|
- [../VersaMCU/doc/07_serial_protocol.md](../VersaMCU/doc/07_serial_protocol.md)
|