Fixed bug in beacon bumping
This commit is contained in:
parent
f2b876df49
commit
4c63129876
@ -5541,8 +5541,10 @@ bool MainWindow::prepareNextMessageFrame()
|
|||||||
int sent = count - m_txFrameQueue.count();
|
int sent = count - m_txFrameQueue.count();
|
||||||
ui->startTxButton->setText(QString("Sending (%1/%2)").arg(sent).arg(count));
|
ui->startTxButton->setText(QString("Sending (%1/%2)").arg(sent).arg(count));
|
||||||
|
|
||||||
// bump beacon
|
if(ui->beaconButton->isChecked()){
|
||||||
m_nextBeacon = m_nextBeacon.addSecs(15);
|
// bump beacon
|
||||||
|
setBeaconTimer(m_nextBeacon.addSecs(15));
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -5624,7 +5626,12 @@ void MainWindow::scheduleBeacon(bool first){
|
|||||||
timestamp = timestamp.addSecs(15);
|
timestamp = timestamp.addSecs(15);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setBeaconTimer(timestamp);
|
||||||
|
}
|
||||||
|
|
||||||
|
void MainWindow::setBeaconTimer(QDateTime timestamp){
|
||||||
// set the next beacon timestamp and timer
|
// set the next beacon timestamp and timer
|
||||||
|
beaconTimer.stop();
|
||||||
m_nextBeacon = timestamp;
|
m_nextBeacon = timestamp;
|
||||||
beaconTimer.start(QDateTime::currentDateTimeUtc().msecsTo(m_nextBeacon) - 2*1000);
|
beaconTimer.start(QDateTime::currentDateTimeUtc().msecsTo(m_nextBeacon) - 2*1000);
|
||||||
}
|
}
|
||||||
|
@ -258,6 +258,7 @@ private slots:
|
|||||||
bool isFreqOffsetFree(int f, int bw);
|
bool isFreqOffsetFree(int f, int bw);
|
||||||
int findFreeFreqOffset(int fmin, int fmax, int bw);
|
int findFreeFreqOffset(int fmin, int fmax, int bw);
|
||||||
void scheduleBeacon(bool first=false);
|
void scheduleBeacon(bool first=false);
|
||||||
|
void setBeaconTimer(QDateTime timestamp);
|
||||||
void prepareBeacon();
|
void prepareBeacon();
|
||||||
QString calculateDistance(QString const& grid);
|
QString calculateDistance(QString const& grid);
|
||||||
void on_rptSpinBox_valueChanged(int n);
|
void on_rptSpinBox_valueChanged(int n);
|
||||||
|
Loading…
Reference in New Issue
Block a user