diff options
| author | Thomas Vanbesien <tvanbesi@proton.me> | 2026-03-13 18:20:35 +0100 |
|---|---|---|
| committer | Thomas Vanbesien <tvanbesi@proton.me> | 2026-03-13 18:20:35 +0100 |
| commit | 87169e10cb7ebe732ef388552bb0c057c09767ef (patch) | |
| tree | fba2c9e2255cb02553c43fb37d653a47574824ba /demo/Main.qml | |
| parent | 02fe86ab2a04a02b114d7ca8ce4374a29a1d5f45 (diff) | |
| download | QtXpl2-87169e10cb7ebe732ef388552bb0c057c09767ef.tar.gz QtXpl2-87169e10cb7ebe732ef388552bb0c057c09767ef.zip | |
Unified socket slots, --wire-debug CLI flag, fix mock TX and disconnect logging
Collapse 12 per-socket slots into 4 sender()-based slots. Replace runtime
wireDebug QML property with static --wire-debug CLI flag on both demo and
mock server. Route MockServer::sendKaPing through sendReply so KA_PING TX
shows wire bytes. Simplify sendReply to deduce command token from wire data.
Fix Xpl2Client disconnect logging (logTag takes pointer, null-sender fallback).
Diffstat (limited to 'demo/Main.qml')
| -rw-r--r-- | demo/Main.qml | 23 |
1 files changed, 2 insertions, 21 deletions
diff --git a/demo/Main.qml b/demo/Main.qml index edf317c..db015e3 100644 --- a/demo/Main.qml +++ b/demo/Main.qml @@ -23,23 +23,10 @@ ApplicationWindow { debugConsole.appendLog("ERROR: " + error); } - function onJcVersionReceived() { - debugConsole.appendLog( - "JC Version: controller=%1 fw=%2 hw=%3 phCount=%4".arg( - Xpl2Client.controllerId).arg( - Xpl2Client.firmwareVersion).arg( - Xpl2Client.hardwareVersion).arg( - Xpl2Client.printheadCount)); - } - function onStatusMessage(message: string) { debugConsole.appendLog(message); } - function onWireDebugMessage(message: string) { - debugConsole.appendLog("WIRE: " + message); - } - target: Xpl2Client } @@ -84,13 +71,6 @@ ApplicationWindow { Xpl2Client.connectToServer(); } } - - CheckBox { - checked: Xpl2Client.wireDebug - text: "Wire debug" - - onToggled: Xpl2Client.wireDebug = checked - } } } @@ -134,7 +114,8 @@ ApplicationWindow { id: debugConsole function appendLog(msg: string): void { - let ts = new Date().toLocaleTimeString(Qt.locale(), "HH:mm:ss"); + let ts = new Date().toLocaleTimeString(Qt.locale(), + "HH:mm:ss.zzz"); debugLog.text += "[" + ts + "] " + msg + "\n"; debugLog.cursorPosition = debugLog.text.length; } |
