From eae9c67e10da38c4d5c52b876b4f8b9c90e20d4a Mon Sep 17 00:00:00 2001 From: Consti10 Date: Tue, 30 Apr 2024 13:31:42 +0200 Subject: [PATCH] adsb only log once --- app/adsb/adsbvehiclemanager.cpp | 7 +++++-- app/adsb/adsbvehiclemanager.h | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/adsb/adsbvehiclemanager.cpp b/app/adsb/adsbvehiclemanager.cpp index 5ab17dd70..978568b9e 100644 --- a/app/adsb/adsbvehiclemanager.cpp +++ b/app/adsb/adsbvehiclemanager.cpp @@ -471,8 +471,11 @@ void ADSBSdr::processReply(QNetworkReply *reply) { //qDebug() << "MAX adsb distance=" << max_distance; if (reply->error()) { - qDebug() << "ADSB SDR request error!"; - qDebug() << reply->errorString(); + if(!m_adsb_reply_error_logged_once){ + m_adsb_reply_error_logged_once=true; + qDebug() << "ADSB SDR request error!"; + qDebug() << reply->errorString(); + } //TODO REFACTOR MSG //LocalMessage::instance()->showMessage("ADSB SDR Reply Error", 4); reply->deleteLater(); diff --git a/app/adsb/adsbvehiclemanager.h b/app/adsb/adsbvehiclemanager.h index f186b9c13..7433a6267 100644 --- a/app/adsb/adsbvehiclemanager.h +++ b/app/adsb/adsbvehiclemanager.h @@ -104,6 +104,7 @@ private slots: private: QString _groundAddress = ""; bool _adsb_show_sdr_data; + bool m_adsb_reply_error_logged_once=false; }; class ADSBVehicleManager : public QObject {