Merge branch 'ui-enhance' into lan-alpha

merge-requests/2/head
Phil Taylor 2021-05-01 13:15:05 +01:00
commit cb82472ebe
8 zmienionych plików z 218 dodań i 14 usunięć

Wyświetl plik

@ -1,5 +1,80 @@
# CHANGELOG
- 20210427
Minor changes to hide sat button until we have time to work on that
feature.
Additional bands added, Airband, WFM
added 630/2200m for 705; probably like the 7300 hardly useable for TX though. Also added auomatic switching to the view pane after non-BSR bands are selected
added 630/2200m to 7300/7610/785x
derp: fixed main dial freq display for non-BSR 4m band; see also previous commit
fixed main dial freq display for non-BSR bands 60, 630, 2200m if such a band was selected in the band select menu
Minor change to set frequency, which was lacking "emit" at the start.
changed the modeSelectCombo-addItem sequence a bit to have modes grouped; CW and CW-R are now grouped, as well as RTTY/RTTY-R; AM and FM are grouped now
- 20210426
Well, that was fun. Color preferences now work, and colors can be
modified from the preference file for custom plot colors.
The preference file now stores colors as unsigned int. To convert the
colors in the file to standard AARRGGBB format (AA = Alpha channel), use
python's hex() function. Maybe one day we will fix the qt bug and make
this save in a better format.
Added dynamic band buttons. Fixed multiple bugs related to various
differences in band stacking register addresses (for example, the GEN
band on the 705 has a different address from the 7100 and the 7300).
This code was only tested with the 9700.
started rough docs for the usermanual
- 20210425
More work on rigctld
Faster polling. Clarified in comments around line 309 in wfmain.cpp.
Added ability to read RIT status. Added RIT to initial rig query. Added
Added ability to read RIT status. Added RIT to initial rig query. Added
variables to handle delayed command timing values. Fixed bug in
frequency parsing code that had existed for some time. Changed tic marks
on RIT knob because I wanted more of them. Bumped startup initial rig
state queries to 100ms. May consider faster queries on startup since we
are going to need more things queried on startup.
- 20210424
Receiver Incremental Tuning is in. The UI does not check the rig's
initial state yet, but the functions are partially in rigCommander for
that purpose.
- 20210423
Found two missing defaults in switch cases inside rigcommander.cpp.
Modified rig power management to stop command ques (s-meter and others).
Upon rig power up, the command queue is repurposed as a 3 second delay
for bootup, and then, commands are issued to restore the spectrum
display (if the wf checkbox was checked). I've made new functions,
powerRigOff and powerRigOn, for these purposes.
work in progress on spectrum enable after power off/on.
powerOff should work now.
- 20210420
rigctl working (sort of) with WSJT-X
- 20210419 Initial commit of rigctld (doesn't currently do anything useful!)

Wyświetl plik

@ -16,8 +16,8 @@ int main(int argc, char *argv[])
QApplication a(argc, argv);
//a.setStyle( "Fusion" );
a.setOrganizationName("eliggett");
a.setOrganizationDomain("nodomain");
a.setOrganizationName("wfview");
a.setOrganizationDomain("wfview.org");
a.setApplicationName("wfview");

Wyświetl plik

@ -201,6 +201,11 @@ void rigCommander::handleStatusUpdate(const QString text)
emit haveStatusUpdate(text);
}
bool rigCommander::usingLAN()
{
return usingNativeLAN;
}
void rigCommander::findRigs()
{
// This function sends data to 0x00 ("broadcast") to look for any connected rig.
@ -2557,6 +2562,8 @@ void rigCommander::determineRigCaps()
rigCaps.bands = standardHF;
rigCaps.bands.push_back(band4m);
rigCaps.bands.push_back(bandGen);
rigCaps.bands.push_back(band630m);
rigCaps.bands.push_back(band2200m);
break;
case modelR8600:
rigCaps.modelName = QString("IC-R8600");
@ -2571,6 +2578,7 @@ void rigCommander::determineRigCaps()
rigCaps.hasTransmit = false;
rigCaps.hasCTCSS = true;
rigCaps.hasDTCS = true;
rigCaps.hasDV = true;
rigCaps.attenuators.push_back('\x10');
rigCaps.attenuators.push_back('\x20');
rigCaps.attenuators.push_back('\x30');
@ -2631,6 +2639,8 @@ void rigCommander::determineRigCaps()
rigCaps.hasATU = true;
rigCaps.bands = standardHF;
rigCaps.bands.push_back(bandGen);
rigCaps.bands.push_back(band630m);
rigCaps.bands.push_back(band2200m);
break;
case model7850:
rigCaps.modelName = QString("IC-785x");
@ -2656,6 +2666,8 @@ void rigCommander::determineRigCaps()
rigCaps.antennas = {0x00, 0x01, 0x02, 0x03};
rigCaps.bands = standardHF;
rigCaps.bands.push_back(bandGen);
rigCaps.bands.push_back(band630m);
rigCaps.bands.push_back(band2200m);
break;
case model705:
rigCaps.modelName = QString("IC-705");
@ -2679,11 +2691,15 @@ void rigCommander::determineRigCaps()
rigCaps.bands = standardHF;
rigCaps.bands.insert(rigCaps.bands.end(), standardVU.begin(), standardVU.end());
rigCaps.bands.push_back(bandGen);
rigCaps.bands.push_back(bandAir);
rigCaps.bands.push_back(bandWFM);
rigCaps.bsr[band70cm] = 0x14;
rigCaps.bsr[band2m] = 0x13;
rigCaps.bsr[bandAir] = 0x12;
rigCaps.bsr[bandWFM] = 0x11;
rigCaps.bsr[bandGen] = 0x15;
rigCaps.bands.push_back(band630m);
rigCaps.bands.push_back(band2200m);
break;
case model7100:
rigCaps.modelName = QString("IC-7100");

Wyświetl plik

@ -57,6 +57,8 @@ public:
rigCommander();
~rigCommander();
bool usingLAN();
public slots:
void process();
void commSetup(unsigned char rigCivAddr, QString rigSerialPort, quint32 rigBaudRate);

Wyświetl plik

@ -272,6 +272,7 @@ QString rigCtlClient::getFilter(unsigned char mode, unsigned char filter) {
}
QString rigCtlClient::getMode(unsigned char mode, bool datamode) {
(void)datamode;
switch (mode) {
case 0:
return QString("LSB");
@ -345,4 +346,4 @@ unsigned char rigCtlClient::getMode(QString modeString) {
return 0;
}
return 0;
}
}

Wyświetl plik

@ -305,7 +305,8 @@ wfmain::wfmain(const QString serialPortCL, const QString hostCL, QWidget *parent
rigName->setText("NONE");
rigName->setFixedWidth(50);
delayedCmdInterval_ms = 10; // interval for regular delayed commands, including initial rig/UI state queries
delayedCmdIntervalLAN_ms = 10; // interval for regular delayed commands, including initial rig/UI state queries
delayedCmdIntervalSerial_ms = 50; // interval for regular delayed commands, including initial rig/UI state queries
delayedCmdStartupInterval_ms = 250; // interval for rigID polling
delayedCommand = new QTimer(this);
delayedCommand->setInterval(delayedCmdStartupInterval_ms); // 250ms until we find rig civ and id, then 100ms.
@ -547,8 +548,10 @@ wfmain::wfmain(const QString serialPortCL, const QString hostCL, QWidget *parent
#ifdef QT_DEBUG
qDebug(logSystem()) << "Running with debugging options enabled.";
ui->debugBtn->setVisible(true);
ui->satOpsBtn->setVisible(true);
#else
ui->debugBtn->setVisible(false);
ui->satOpsBtn->setVisible(false);
#endif
// Initial state of UI:
@ -747,7 +750,14 @@ void wfmain::receiveFoundRigID(rigCapabilities rigCaps)
//now we know what the rig ID is:
//qDebug(logSystem()) << "In wfview, we now have a reply to our request for rig identity sent to CIV BROADCAST.";
delayedCommand->setInterval(delayedCmdInterval_ms); // faster polling is ok now.
if(rig->usingLAN())
{
usingLAN = true;
delayedCommand->setInterval(delayedCmdIntervalLAN_ms);
} else {
usingLAN = false;
delayedCommand->setInterval(delayedCmdIntervalSerial_ms);
}
receiveRigID(rigCaps);
getInitialRigState();
@ -1989,7 +1999,12 @@ void wfmain::runDelayedCommand()
periodicPollingTimer->stop();
break;
case cmdQueNormalSpeed:
delayedCommand->setInterval(delayedCmdInterval_ms);
if(usingLAN)
{
delayedCommand->setInterval(delayedCmdIntervalLAN_ms);
} else {
delayedCommand->setInterval(delayedCmdIntervalSerial_ms);
}
break;
default:
break;
@ -2070,6 +2085,21 @@ void wfmain::receiveRigID(rigCapabilities rigCaps)
ui->modeSelectCombo->addItem("DD", 0x22);
}
if(rigCaps.model==modelR8600)
{
ui->modeSelectCombo->addItem("WFM", 0x06);
ui->modeSelectCombo->addItem("FSK-R", 0x08);
ui->modeSelectCombo->addItem("WFM", 0x06);
ui->modeSelectCombo->addItem("S-AM (D)", 0x11);
ui->modeSelectCombo->addItem("S-AM (L)", 0x14);
ui->modeSelectCombo->addItem("S-AM (U)", 0x15);
ui->modeSelectCombo->addItem("P25", 0x16);
ui->modeSelectCombo->addItem("dPMR", 0x18);
ui->modeSelectCombo->addItem("NXDN-VN", 0x19);
ui->modeSelectCombo->addItem("NXDN-N", 0x20);
ui->modeSelectCombo->addItem("DCR", 0x21);
}
if(rigCaps.model == model9700)
{
ui->satOpsBtn->setDisabled(false);
@ -2872,6 +2902,18 @@ void wfmain::on_band2mbtn_clicked()
bandStackBtnClick();
}
void wfmain::on_bandAirbtn_clicked()
{
bandStkBand = rigCaps.bsr[bandAir]; // VHF Aircraft
bandStackBtnClick();
}
void wfmain::on_bandWFMbtn_clicked()
{
bandStkBand = rigCaps.bsr[bandWFM]; // Broadcast FM
bandStackBtnClick();
}
void wfmain::on_band4mbtn_clicked()
{
// There isn't a BSR for this one:
@ -2884,6 +2926,7 @@ void wfmain::on_band4mbtn_clicked()
}
emit setFrequency(f);
issueDelayedCommandUnique(cmdGetFreq);
ui->tabWidget->setCurrentIndex(0);
}
void wfmain::on_band6mbtn_clicked()
@ -2948,7 +2991,8 @@ void wfmain::on_band60mbtn_clicked()
freqt f;
f.Hz = (5.3305) * 1E6;
emit setFrequency(f);
issueDelayedCommandUnique(cmdGetFreq);
issueDelayedCommandUnique(cmdGetFreq);
ui->tabWidget->setCurrentIndex(0);
}
void wfmain::on_band80mbtn_clicked()
@ -2968,7 +3012,8 @@ void wfmain::on_band630mbtn_clicked()
freqt f;
f.Hz = 475 * 1E3;
emit setFrequency(f);
issueDelayedCommandUnique(cmdGetFreq);
issueDelayedCommandUnique(cmdGetFreq);
ui->tabWidget->setCurrentIndex(0);
}
void wfmain::on_band2200mbtn_clicked()
@ -2976,7 +3021,8 @@ void wfmain::on_band2200mbtn_clicked()
freqt f;
f.Hz = 136 * 1E3;
emit setFrequency(f);
issueDelayedCommandUnique(cmdGetFreq);
issueDelayedCommandUnique(cmdGetFreq);
ui->tabWidget->setCurrentIndex(0);
}
void wfmain::on_bandGenbtn_clicked()
@ -3947,6 +3993,8 @@ void wfmain::setBandButtons()
hideButton(ui->band23cmbtn);
hideButton(ui->band70cmbtn);
hideButton(ui->band2mbtn);
hideButton(ui->bandAirbtn);
hideButton(ui->bandWFMbtn);
hideButton(ui->band4mbtn);
hideButton(ui->band6mbtn);
@ -3982,6 +4030,12 @@ void wfmain::setBandButtons()
case(band2m):
showButton(ui->band2mbtn);
break;
case(bandAir):
showButton(ui->bandAirbtn);
break;
case(bandWFM):
showButton(ui->bandWFMbtn);
break;
case(band4m):
showButton(ui->band4mbtn);
break;

Wyświetl plik

@ -429,6 +429,10 @@ private slots:
void on_band2200mbtn_clicked();
void on_bandAirbtn_clicked();
void on_bandWFMbtn_clicked();
private:
Ui::wfmain *ui;
QSettings settings;
@ -548,8 +552,10 @@ private:
QVector <cmds> cmdOutQue;
QVector <cmds> periodicCmdQueue;
int pCmdNum = 0;
int delayedCmdInterval_ms = 100;
int delayedCmdIntervalLAN_ms = 100;
int delayedCmdIntervalSerial_ms = 100;
int delayedCmdStartupInterval_ms = 100;
bool usingLAN = false;
freqMemory mem;
struct colors {

Wyświetl plik

@ -18,7 +18,7 @@
<item>
<widget class="QTabWidget" name="tabWidget">
<property name="currentIndex">
<number>1</number>
<number>0</number>
</property>
<widget class="QWidget" name="mainTab">
<attribute name="title">
@ -734,7 +734,11 @@
</widget>
</item>
<item>
<widget class="QComboBox" name="preampSelCombo"/>
<widget class="QComboBox" name="preampSelCombo">
<property name="sizeAdjustPolicy">
<enum>QComboBox::AdjustToContents</enum>
</property>
</widget>
</item>
</layout>
</item>
@ -754,7 +758,11 @@
</widget>
</item>
<item>
<widget class="QComboBox" name="attSelCombo"/>
<widget class="QComboBox" name="attSelCombo">
<property name="sizeAdjustPolicy">
<enum>QComboBox::AdjustToContents</enum>
</property>
</widget>
</item>
</layout>
</item>
@ -794,7 +802,11 @@
</widget>
</item>
<item>
<widget class="QComboBox" name="antennaSelCombo"/>
<widget class="QComboBox" name="antennaSelCombo">
<property name="sizeAdjustPolicy">
<enum>QComboBox::AdjustToContents</enum>
</property>
</widget>
</item>
</layout>
</item>
@ -895,6 +907,44 @@
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="bandAirbtn">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>128</height>
</size>
</property>
<property name="text">
<string>Air</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="bandWFMbtn">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>128</height>
</size>
</property>
<property name="text">
<string>WFM</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="band4mbtn">
<property name="sizePolicy">