diff --git a/SpotClient.cpp b/SpotClient.cpp index 463cdd3..ecc7529 100644 --- a/SpotClient.cpp +++ b/SpotClient.cpp @@ -52,8 +52,8 @@ void SpotClient::setLocalStation(QString callsign, QString grid, QString info, Q changed = true; } - if(changed){ - // send local information to network + // send local information to network on change, or once every 5 minutes + if(changed || m_seq % 5 == 0){ enqueueLocalSpot(callsign, grid, info, version); } } @@ -91,6 +91,8 @@ void SpotClient::processSpots(){ while(!m_queue.isEmpty()){ sendRawSpot(m_queue.dequeue()); } + + m_seq++; } void SpotClient::sendRawSpot(QByteArray payload){ diff --git a/SpotClient.h b/SpotClient.h index d0f949d..88b4b92 100644 --- a/SpotClient.h +++ b/SpotClient.h @@ -25,6 +25,7 @@ public slots: void dnsLookupResult(QHostInfo); private: + int m_seq; QString m_call; QString m_grid; QString m_info;