From 55baec6100095dd45669a0774caf42ead6bc720b Mon Sep 17 00:00:00 2001 From: Phil Taylor Date: Tue, 18 Jan 2022 00:14:37 +0000 Subject: [PATCH] Only show server status message once --- servermain.cpp | 5 ++++- servermain.h | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/servermain.cpp b/servermain.cpp index aa0de88..b35e810 100644 --- a/servermain.cpp +++ b/servermain.cpp @@ -332,7 +332,10 @@ void servermain::findSerialPort() void servermain::receiveStatusUpdate(QString text) { - std::cout << text.toLocal8Bit().toStdString() << "\n"; + if (text != lastMessage) { + std::cout << text.toLocal8Bit().toStdString() << "\n"; + lastMessage = text; + } } diff --git a/servermain.h b/servermain.h index 5437c8d..080f32a 100644 --- a/servermain.h +++ b/servermain.h @@ -195,6 +195,7 @@ private: QTimer * pttTimer; uint16_t loopTickCounter; uint16_t slowCmdNum; + QString lastMessage=""; void makeRig(); void rigConnections();