kopia lustrzana https://github.com/PianetaRadio/CatRadio
rodzic
e91f5aae09
commit
c2ea381757
|
@ -758,12 +758,24 @@ void MainWindow::on_pushButton_Connect_toggled(bool checked)
|
|||
}
|
||||
}
|
||||
else if (rigCom.connected) //Button unchecked
|
||||
{
|
||||
if (rigSet.ptt == RIG_PTT_OFF) //Disconnect only if PTT off
|
||||
{
|
||||
rigCom.connected = 0;
|
||||
if(timer->isActive()) timer->stop();
|
||||
rig_close(my_rig); //Close the communication to the rig
|
||||
connectMsg = "Disconnected";
|
||||
//rig_cleanup(my_rig); //Release rig handle and free associated memory
|
||||
|
||||
//Reset meters
|
||||
ui->progressBar_Smeter->setValue(-54);
|
||||
setSubMeter();
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->pushButton_Connect->setChecked(false); //Uncheck the button
|
||||
connectMsg = "Warning PTT on!";
|
||||
}
|
||||
}
|
||||
|
||||
ui->statusbar->showMessage(connectMsg);
|
||||
|
|
Ładowanie…
Reference in New Issue