Added forced manual RTS setting

monitor
Elliott Liggett 2021-12-30 01:52:23 -08:00
rodzic d1165980a9
commit 8dd42ba392
5 zmienionych plików z 55 dodań i 3 usunięć

Wyświetl plik

@ -217,6 +217,20 @@ void rigCommander::receiveBaudRate(quint32 baudrate) {
emit haveBaudRate(baudrate);
}
void rigCommander::setRTSforPTT(bool enabled)
{
if(!usingNativeLAN)
{
useRTSforPTT_isSet = true;
useRTSforPTT_manual = enabled;
if(comm != NULL)
{
rigCaps.useRTSforPTT=enabled;
comm->setUseRTSforPTT(enabled);
}
}
}
void rigCommander::findRigs()
{
// This function sends data to 0x00 ("broadcast") to look for any connected rig.
@ -3596,8 +3610,13 @@ void rigCommander::determineRigCaps()
haveRigCaps = true;
if(!usingNativeLAN)
{
if(useRTSforPTT_isSet)
{
rigCaps.useRTSforPTT = useRTSforPTT_manual;
}
comm->setUseRTSforPTT(rigCaps.useRTSforPTT);
}
if(lookingForRig)
{

Wyświetl plik

@ -79,6 +79,7 @@ public slots:
void commSetup(unsigned char rigCivAddr, udpPreferences prefs, audioSetup rxSetup, audioSetup txSetup, QString vsp);
void closeComm();
void stateUpdated();
void setRTSforPTT(bool enabled);
// Power:
void powerOn();
@ -452,6 +453,9 @@ private:
unsigned char civAddr;
unsigned char incomingCIVAddr; // place to store the incoming CIV.
bool pttAllowed;
bool useRTSforPTT_isSet = false;
bool useRTSforPTT_manual = false;
QString rigSerialPort;
quint32 rigBaudRate;

Wyświetl plik

@ -423,7 +423,7 @@ void wfmain::makeRig()
// Rig comm setup:
connect(this, SIGNAL(sendCommSetup(unsigned char, udpPreferences, audioSetup, audioSetup, QString)), rig, SLOT(commSetup(unsigned char, udpPreferences, audioSetup, audioSetup, QString)));
connect(this, SIGNAL(sendCommSetup(unsigned char, QString, quint32,QString)), rig, SLOT(commSetup(unsigned char, QString, quint32,QString)));
connect(this, SIGNAL(setRTSforPTT(bool)), rig, SLOT(setRTSforPTT(bool)));
connect(rig, SIGNAL(haveBaudRate(quint32)), this, SLOT(receiveBaudRate(quint32)));
@ -1312,6 +1312,7 @@ void wfmain::setDefPrefs()
defPrefs.stylesheetPath = QString("qdarkstyle/style.qss");
defPrefs.radioCIVAddr = 0x00; // previously was 0x94 for 7300.
defPrefs.CIVisRadioModel = false;
defPrefs.forceRTSasPTT = false;
defPrefs.serialPortRadio = QString("auto");
defPrefs.serialPortBaud = 115200;
defPrefs.enablePTT = false;
@ -1411,7 +1412,9 @@ void wfmain::loadSettings()
ui->rigCIVaddrHexLine->setEnabled(false);
}
prefs.CIVisRadioModel = (bool)settings->value("CIVisRadioModel", defPrefs.CIVisRadioModel).toBool();
prefs.forceRTSasPTT = (bool)settings->value("ForceRTSasPTT", defPrefs.forceRTSasPTT).toBool();
ui->useRTSforPTTchk->setChecked(prefs.forceRTSasPTT);
prefs.serialPortRadio = settings->value("SerialPortRadio", defPrefs.serialPortRadio).toString();
int serialIndex = ui->serialDeviceListCombo->findText(prefs.serialPortRadio);
@ -1772,6 +1775,7 @@ void wfmain::saveSettings()
settings->beginGroup("Radio");
settings->setValue("RigCIVuInt", prefs.radioCIVAddr);
settings->setValue("CIVisRadioModel", prefs.CIVisRadioModel);
settings->setValue("ForceRTSasPTT", prefs.forceRTSasPTT);
settings->setValue("SerialPortRadio", prefs.serialPortRadio);
settings->setValue("SerialPortBaud", prefs.serialPortBaud);
settings->setValue("VirtualSerialPort", prefs.virtualSerialPort);
@ -3262,6 +3266,10 @@ void wfmain::receiveRigID(rigCapabilities rigCaps)
ui->tuneEnableChk->setEnabled(rigCaps.hasATU);
ui->tuneNowBtn->setEnabled(rigCaps.hasATU);
ui->useRTSforPTTchk->blockSignals(true);
ui->useRTSforPTTchk->setChecked(rigCaps.useRTSforPTT);
ui->useRTSforPTTchk->blockSignals(false);
ui->connectBtn->setText("Disconnect"); // We must be connected now.
prepareWf(ui->wfLengthSlider->value());
if(usingLAN)
@ -5497,6 +5505,7 @@ void wfmain::on_rigCIVaddrHexLine_editingFinished()
}
}
void wfmain::on_baudRateCombo_activated(int index)
{
bool ok = false;
@ -5510,6 +5519,12 @@ void wfmain::on_baudRateCombo_activated(int index)
(void)index;
}
void wfmain::on_useRTSforPTTchk_clicked(bool checked)
{
emit setRTSforPTT(checked);
prefs.forceRTSasPTT = checked;
}
void wfmain::on_wfLengthSlider_valueChanged(int value)
{
prefs.wflength = (unsigned int)(value);

Wyświetl plik

@ -52,6 +52,7 @@ signals:
// Basic to rig:
void setCIVAddr(unsigned char newRigCIVAddr);
void setRigID(unsigned char rigID);
void setRTSforPTT(bool enabled);
// Power
void sendPowerOn();
@ -514,6 +515,8 @@ private slots:
void onServerPasswordChanged();
void on_useRTSforPTTchk_clicked(bool checked);
private:
Ui::wfmain *ui;
void closeEvent(QCloseEvent *event);
@ -736,6 +739,7 @@ private:
QString stylesheetPath;
unsigned char radioCIVAddr;
bool CIVisRadioModel;
bool forceRTSasPTT;
QString serialPortRadio;
quint32 serialPortBaud;
bool enablePTT;

Wyświetl plik

@ -2066,7 +2066,7 @@
<item>
<widget class="QStackedWidget" name="settingsStack">
<property name="currentIndex">
<number>3</number>
<number>0</number>
</property>
<widget class="QWidget" name="radioAccess">
<layout class="QVBoxLayout" name="verticalLayout_21">
@ -2250,6 +2250,16 @@
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="useRTSforPTTchk">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;This feature is for older radios that respond best to an RTS serial port signal than a PTT command.&lt;/p&gt;&lt;p&gt;&lt;br/&gt;For radios lacking PTT commands, this is automatic and transparent, but for radios which have a PTT command, you can check this box to override and force the PTT to be done using RTS. Do not check this box unless you really need this and have an appropriate adapter with RTS connected to the PTT line of the transceiver. &lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Send RTS for PTT</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_4">
<property name="orientation">