Updated SpotClient to send local data at least once every 5 minutes
This commit is contained in:
parent
14626978c0
commit
03bd44ae39
@ -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){
|
||||
|
@ -25,6 +25,7 @@ public slots:
|
||||
void dnsLookupResult(QHostInfo);
|
||||
|
||||
private:
|
||||
int m_seq;
|
||||
QString m_call;
|
||||
QString m_grid;
|
||||
QString m_info;
|
||||
|
Loading…
Reference in New Issue
Block a user