From 9ac64169720fb2b9852589b74f7300bcfebcaf62 Mon Sep 17 00:00:00 2001 From: Thomas Vanbesien Date: Mon, 16 Mar 2026 11:04:21 +0100 Subject: GS_PH_VERSION command, per-printhead demo UI with --printheads CLI arg Add getPhVersion(printheadId) to Xpl2Client with phVersionReceived signal carrying all 8 response fields. Mock server echoes canned version data for any requested printhead ID. Demo app accepts --printheads N (default 10) to simulate N printheads. The UI shows a scrollable per-PH list with individual and bulk version query buttons, updating each row's version info on response. --- src/Xpl2Client.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/Xpl2Client.h') diff --git a/src/Xpl2Client.h b/src/Xpl2Client.h index 41729fd..95ae03e 100644 --- a/src/Xpl2Client.h +++ b/src/Xpl2Client.h @@ -43,6 +43,8 @@ public: Q_INVOKABLE void connectToServer (); Q_INVOKABLE void disconnectFromServer (); Q_INVOKABLE void getJcVersion (); + /** Query the specified printhead's version info. */ + Q_INVOKABLE void getPhVersion (int printheadId); signals: void hostChanged (); @@ -50,6 +52,13 @@ signals: void errorOccurred (const QString &error); void statusMessage (const QString &message); void jcVersionReceived (); + void phVersionReceived (int controllerId, int printheadId, + const QString &mcuFirmwareVersion, + const QString &mcuHardwareVersion, + const QString &mcuFirmwareVariant, + const QString &fpgaFirmwareVersion, + const QString &fpgaHardwareVersion, + const QString &bootloaderVersion); private slots: void onSocketConnected (); @@ -65,6 +74,7 @@ private: void dispatchStatusMessage (const Xpl2Protocol::ParsedMessage &msg); void handleKaPing (QTcpSocket &socket); void handleGsJcVersion (const QVariantList ¶ms); + void handleGsPhVersion (const QVariantList ¶ms); void updateConnectedState (); QString logTag (const QTcpSocket *socket) const; -- cgit v1.2.3