kopia lustrzana https://gitlab.com/eliggett/wfview
Changed UI a little, and added manual CI-V options. Seems to work well.
rodzic
851c8a6e62
commit
7857680845
|
@ -959,6 +959,7 @@ void rigCommander::setCIVAddr(unsigned char civAddr)
|
|||
{
|
||||
// Note: This is the radio's CIV address
|
||||
// the computer's CIV address is defined in the header file.
|
||||
// TODO: this function *could* be written to re-write the CIV preamble.
|
||||
this->civAddr = civAddr;
|
||||
}
|
||||
|
||||
|
|
38
wfmain.cpp
38
wfmain.cpp
|
@ -786,7 +786,7 @@ void wfmain::receiveCommReady()
|
|||
{
|
||||
// tell rigCommander to broadcast a request for all rig IDs.
|
||||
// qInfo(logSystem()) << "Beginning search from wfview for rigCIV (auto-detection broadcast)";
|
||||
ui->statusBar->showMessage(QString("Searching CIV bus for connected radios."), 1000);
|
||||
ui->statusBar->showMessage(QString("Searching CI-V bus for connected radios."), 1000);
|
||||
emit getRigCIV();
|
||||
cmdOutQue.append(cmdGetRigCIV);
|
||||
delayedCommand->start();
|
||||
|
@ -794,10 +794,10 @@ void wfmain::receiveCommReady()
|
|||
// don't bother, they told us the CIV they want, stick with it.
|
||||
// We still query the rigID to find the model, but at least we know the CIV.
|
||||
qInfo(logSystem()) << "Skipping automatic CIV, using user-supplied value of " << prefs.radioCIVAddr;
|
||||
showStatusBarText(QString("Using user-supplied radio CI-V address of 0x%1").arg(prefs.radioCIVAddr, 2, 16));
|
||||
emit getRigID();
|
||||
getInitialRigState();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -2144,6 +2144,9 @@ void wfmain::receiveRigID(rigCapabilities rigCaps)
|
|||
{
|
||||
return;
|
||||
} else {
|
||||
|
||||
showStatusBarText(QString("Found radio at address 0x%1 of name %2 and model ID %3.").arg(rigCaps.civ,2,16).arg(rigCaps.modelName).arg(rigCaps.modelID));
|
||||
|
||||
qDebug(logSystem()) << "Rig name: " << rigCaps.modelName;
|
||||
qDebug(logSystem()) << "Has LAN capabilities: " << rigCaps.hasLan;
|
||||
qDebug(logSystem()) << "Rig ID received into wfmain: spectLenMax: " << rigCaps.spectLenMax;
|
||||
|
@ -4207,6 +4210,37 @@ void wfmain::setBandButtons()
|
|||
}
|
||||
}
|
||||
|
||||
void wfmain::on_rigCIVManualAddrChk_clicked(bool checked)
|
||||
{
|
||||
if(checked)
|
||||
{
|
||||
ui->rigCIVaddrHexLine->setEnabled(true);
|
||||
ui->rigCIVaddrHexLine->setText(QString("%1").arg(prefs.radioCIVAddr, 2, 16));
|
||||
} else {
|
||||
ui->rigCIVaddrHexLine->setText("auto");
|
||||
ui->rigCIVaddrHexLine->setEnabled(false);
|
||||
prefs.radioCIVAddr = 0; // auto
|
||||
showStatusBarText("Setting radio CI-V address to: 'auto'. Make sure CI-V Transceive is enabled on the radio.");
|
||||
}
|
||||
}
|
||||
|
||||
void wfmain::on_rigCIVaddrHexLine_editingFinished()
|
||||
{
|
||||
bool okconvert=false;
|
||||
|
||||
unsigned char propCIVAddr = (unsigned char) ui->rigCIVaddrHexLine->text().toUInt(&okconvert, 16);
|
||||
|
||||
if(okconvert && (propCIVAddr < 0x7F) && (propCIVAddr != 0))
|
||||
{
|
||||
prefs.radioCIVAddr = propCIVAddr;
|
||||
showStatusBarText(QString("Setting radio CI-V address to: 0x%1. Press Save Settings to retain.").arg(propCIVAddr, 2, 16));
|
||||
} else {
|
||||
showStatusBarText(QString("Could not use provided CI-V address."));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
// --- DEBUG FUNCTION ---
|
||||
void wfmain::on_debugBtn_clicked()
|
||||
{
|
||||
|
|
4
wfmain.h
4
wfmain.h
|
@ -436,6 +436,10 @@ private slots:
|
|||
|
||||
void on_bandWFMbtn_clicked();
|
||||
|
||||
void on_rigCIVManualAddrChk_clicked(bool checked);
|
||||
|
||||
void on_rigCIVaddrHexLine_editingFinished();
|
||||
|
||||
private:
|
||||
Ui::wfmain *ui;
|
||||
void closeEvent(QCloseEvent *event);
|
||||
|
|
82
wfmain.ui
82
wfmain.ui
|
@ -18,7 +18,7 @@
|
|||
<item>
|
||||
<widget class="QTabWidget" name="tabWidget">
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
<number>3</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="mainTab">
|
||||
<attribute name="title">
|
||||
|
@ -2026,6 +2026,9 @@
|
|||
</property>
|
||||
<item>
|
||||
<widget class="QPushButton" name="adjRefBtn">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Click here to adjust the frequency reference on the IC-9700.</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Adjust Reference</string>
|
||||
</property>
|
||||
|
@ -2144,8 +2147,11 @@
|
|||
</property>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="serialEnableBtn">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Select this option if the rig is pluged into the computer using a USB cable or a serial connection. </p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Enable USB (serial)</string>
|
||||
<string>Connect over USB (serial)</string>
|
||||
</property>
|
||||
<attribute name="buttonGroup">
|
||||
<string notr="true">radioConnectionSerialNetworkGrp</string>
|
||||
|
@ -2169,6 +2175,57 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="udpServerSetupBtn">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Press here to set up the built-in rig server. The built-in server is intended to allow access over the network to a serial or USB-connected radio. </p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Server Setup</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="rigCIVManualAddrChk">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>If you are using an older (year 2010) radio, you may need to enable this option to manually specify the CI-V address. This option is also useful for radios that do not have CI-V Transceive enabled and thus will not answer our broadcast query for connected rigs on the CI-V bus.</p><p>If you have a modern radio with CI-V Transceive enabled, you should not need to check this box. </p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Manual Radio CI-V Address:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="rigCIVaddrHexLine">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>50</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>50</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Enter the address in as hexidecimal, without any prefix, just as the radio presents the address in the menu. </p><p>Here are some common examples:</p>
|
||||
IC-706: 58
|
||||
<br/>IC-756: 6E
|
||||
<br/>IC-7000: 70
|
||||
<br/>IC-7100: 88
|
||||
<br/>IC-7200: 76
|
||||
<p>This setting is typically needed for older radios and for radios that do not have CI-V Transceive enabled. </p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>auto</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="tuneSpacer">
|
||||
<property name="orientation">
|
||||
|
@ -2188,8 +2245,11 @@
|
|||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||
<item>
|
||||
<widget class="QRadioButton" name="lanEnableBtn">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Connection to the radio is via network. </p><p>This means you are connecting to a radio with native ethernet or wifi, such as the IC-705, IC-7610, IC-7850, IC-R8600, or IC-9700</p><p>You should also select this option if you are connecting to another instance of wfview over a network. </p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Enable LAN</string>
|
||||
<string>Connect over LAN</string>
|
||||
</property>
|
||||
<attribute name="buttonGroup">
|
||||
<string notr="true">radioConnectionSerialNetworkGrp</string>
|
||||
|
@ -2198,18 +2258,14 @@
|
|||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="connectBtn">
|
||||
<property name="toolTip">
|
||||
<string>Press here to initiate the network connection to the rig. </string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Connect</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="udpServerSetupBtn">
|
||||
<property name="text">
|
||||
<string>Server Setup</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_10">
|
||||
<property name="orientation">
|
||||
|
@ -2232,6 +2288,9 @@
|
|||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="vspCombo">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Use this to define a virtual serial port. </p><p><br/></p><p>On Windows, the virtual serial port can be used to connect to a serial port loopback device, through which other programs can connect to the radio. </p><p><br/></p><p>On Linux and macOS, the port defined here is a pseudo-terminal device, which may be connected to directly by any program designed for a serial connection. </p></body></html></string>
|
||||
</property>
|
||||
<property name="accessibleName">
|
||||
<string>Virtual Serial Port Selector</string>
|
||||
</property>
|
||||
|
@ -2463,6 +2522,9 @@
|
|||
</property>
|
||||
<item>
|
||||
<widget class="QPushButton" name="debugBtn">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>This button runs debug functions, and is provided as a convenience for programmers. The functions executed are under:</p><p><span style=" color:#ffff55;">void</span><span style=" color:#55ff55;">wfmain</span><span style=" color:#aaaaaa;">::</span><span style=" font-weight:600;">on_debugBtn_clicked</span><span style=" color:#aaaaaa;">()</span></p><p>in wfmain.cpp.</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Debug</string>
|
||||
</property>
|
||||
|
|
Ładowanie…
Reference in New Issue