Added some better alignment of low priority beacons with other messages

This commit is contained in:
Jordan Sherer 2018-07-31 18:18:27 -04:00
parent 62c449669f
commit 3e19b2c98d
2 changed files with 12 additions and 10 deletions

View File

@ -5777,6 +5777,7 @@ void MainWindow::restoreMessage(){
void MainWindow::resetMessageTransmitQueue(){ void MainWindow::resetMessageTransmitQueue(){
m_txFrameCount = 0; m_txFrameCount = 0;
m_txFrameQueue.clear(); m_txFrameQueue.clear();
m_txMessageQueue.clear();
} }
QString MainWindow::popMessageFrame(){ QString MainWindow::popMessageFrame(){
@ -9086,21 +9087,22 @@ void MainWindow::processTxQueue(){
return; return;
} }
#if 0 // and if we are a low priority message, we need to have not transmitted in the past 30 seconds...
// and we need to have not transmitted in the 30 seconds... if(head.priority <= PriorityLow && m_lastTxTime.secsTo(QDateTime::currentDateTimeUtc()) <= 30){
if(m_lastTxTime.secsTo(QDateTime::currentDateTimeUtc()) < 30){
return; return;
} }
#endif
// dequeue the next message from the queue... // if so... dequeue the next message from the queue...
auto message = m_txMessageQueue.dequeue(); auto message = m_txMessageQueue.dequeue();
// add the message to the outgoing message text box // add the message to the outgoing message text box
addMessageText(message.message, true); addMessageText(message.message, true);
// then transmit... // check to see if we have autoreply enabled...
toggleTx(true); if(ui->autoReplyButton->isChecked()){
// then prepare to transmit...
toggleTx(true);
}
if(message.callback){ if(message.callback){
message.callback(); message.callback();

View File

@ -705,9 +705,9 @@ private:
enum Priority { enum Priority {
PriorityLow = 0, PriorityLow = 10,
PriorityNormal = 10, PriorityNormal = 100,
PriorityHigh = 100 PriorityHigh = 1000
}; };
struct PrioritizedMessage { struct PrioritizedMessage {