Fixed beacon scheduling with a beacon now context menu item
This commit is contained in:
parent
f4b640df75
commit
4168e1937c
@ -1391,6 +1391,20 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
|
|||||||
// Don't block beacon's first run...
|
// Don't block beacon's first run...
|
||||||
m_lastTxTime = DriftingDateTime::currentDateTimeUtc().addSecs(-300);
|
m_lastTxTime = DriftingDateTime::currentDateTimeUtc().addSecs(-300);
|
||||||
|
|
||||||
|
|
||||||
|
auto beaconNow = new QAction(QString("Beacon Now"), ui->beaconButton);
|
||||||
|
connect(beaconNow, &QAction::triggered, this, [this](){
|
||||||
|
if(m_transmitting){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(!ui->beaconButton->isChecked()){
|
||||||
|
ui->beaconButton->setChecked(true);
|
||||||
|
}
|
||||||
|
scheduleBeacon(true);
|
||||||
|
});
|
||||||
|
ui->beaconButton->setContextMenuPolicy(Qt::ActionsContextMenu);
|
||||||
|
ui->beaconButton->addAction(beaconNow);
|
||||||
|
|
||||||
pskSetLocal();
|
pskSetLocal();
|
||||||
aprsSetLocal();
|
aprsSetLocal();
|
||||||
|
|
||||||
@ -7180,7 +7194,7 @@ void MainWindow::on_beaconButton_clicked()
|
|||||||
|
|
||||||
// then process the action
|
// then process the action
|
||||||
if(ui->beaconButton->isChecked()){
|
if(ui->beaconButton->isChecked()){
|
||||||
scheduleBeacon(true);
|
scheduleBeacon(false);
|
||||||
} else {
|
} else {
|
||||||
pauseBeacon();
|
pauseBeacon();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user