kopia lustrzana https://gitlab.com/eliggett/wfview
Merge branch 'master' into audio-enhance
commit
97c1513c45
401
CHANGELOG
401
CHANGELOG
|
@ -1,5 +1,406 @@
|
|||
# CHANGELOG
|
||||
|
||||
|
||||
- 20210702
|
||||
fixed small error where the tx latency was not copied in the UI
|
||||
|
||||
- 20210626
|
||||
Merge branch 'sequence' of gitlab.com:eliggett/wfview into sequence
|
||||
|
||||
Duplicate of existing command.
|
||||
|
||||
Remove unnecessary escape sequence
|
||||
|
||||
Fix for fix of missing __PRETTY_FUNCTION__
|
||||
|
||||
Add __PRETTY_FUNCTION__ for compilers that don't have it.
|
||||
|
||||
- 20210625
|
||||
Mode changes from the combo box now use the que. There are still other
|
||||
methods to change mode which will transition shortly.
|
||||
|
||||
Faster PTT
|
||||
|
||||
Added PTT to the queue.
|
||||
|
||||
Added unique priority insertion methods.
|
||||
|
||||
Changed how commands with parameter data are added.
|
||||
|
||||
Initial queued "set" command commit. Only the frequency set command is
|
||||
used so far, and only for the "Frequency" tab and the tuning knob.
|
||||
|
||||
- 20210624
|
||||
Quick hack for WFM forcing FIL1 always
|
||||
|
||||
- 20210621
|
||||
Added polling button
|
||||
|
||||
Moving to std::deque (double-ended que).
|
||||
|
||||
- 20210620
|
||||
|
||||
IC-R8600 span is now received into the UI correctly.
|
||||
|
||||
New unified outgoing command queue. Tested on IC-9700 and IC-718 (to
|
||||
remote wfview server). CPU usage seems higher but please check your
|
||||
system.
|
||||
|
||||
Timing seems to be acceptable but could probably use some tweaks.
|
||||
S-meter polling is 25ms for fast radios, and slower rates for slower
|
||||
radios. Half-duplex serial radios receive 3x slower polling to make room
|
||||
for replies.
|
||||
|
||||
For Freq, Mode, etc "regular" constant polling (new feature):
|
||||
|
||||
IC-9700 polling is 5 per second, IC-718 is 1-2 per second.
|
||||
|
||||
Just helps keep the UI in sync with changes taking place at the rig. The
|
||||
polling is slow enough that it doesn't impact anything. But quick enough
|
||||
that it catches discrepencies pretty quickly.
|
||||
|
||||
- 20210619
|
||||
|
||||
Added a few more slider things
|
||||
|
||||
whatsnew: improved IC-R8600
|
||||
|
||||
- 20210618
|
||||
|
||||
Additional support for the IC-R8600, including wider scope spans.
|
||||
|
||||
Minor change to remove some old debug code that snuck in.
|
||||
|
||||
If no rig caps, then don't mess with the window!
|
||||
|
||||
Added full duplex comms parameter to rigCaps. We assume half-duplex
|
||||
until we receive a reply to rigID.
|
||||
|
||||
Fixed accidental s-meter timing parameter change.
|
||||
|
||||
- 20210617
|
||||
|
||||
Radios without spectrum do not show spectrum, and, the window properly
|
||||
resizes for those controls. Also, a new key command, control-shift-d has
|
||||
been added to run debug functions from any tab in the program.
|
||||
|
||||
- 20210615
|
||||
|
||||
Additional code to hide/show spectrum and correcting an issue with the
|
||||
rig name not populating for non-spectrum radios.
|
||||
|
||||
Dynamic show/hide spectrum for rigs without this feature.
|
||||
|
||||
Additional data corruption checking.
|
||||
|
||||
- 20210614
|
||||
|
||||
Changed collision detection code so that we can more easily see what
|
||||
message was missed.
|
||||
|
||||
Added collision detection for serial commands. Collisions are aparently
|
||||
frequent for true 1-wire CI-V radios.
|
||||
|
||||
We now calculate polling rates immediately upon receiveCommReady for
|
||||
serial connections. For network connections, we assume sane values and
|
||||
modify once we receive the baud rate from the server.
|
||||
|
||||
Add Neon (ARM) support to resampler
|
||||
|
||||
Revert to using resampler directory rather than opus-tools submodule
|
||||
|
||||
- 20210612
|
||||
|
||||
Add tooltip showing percentage of TX power when slider is moved
|
||||
|
||||
- 20210611
|
||||
|
||||
adding a second path/way for the qcustomplot link if the first fails
|
||||
|
||||
Update udpserver.cpp
|
||||
|
||||
Use global watchdog rather than per-connection
|
||||
|
||||
Report when users are disconnected by the watchdog
|
||||
|
||||
Use watchdog to cleanup lost server connections
|
||||
|
||||
Fix crash on disconnect
|
||||
|
||||
Make status update after disconnection
|
||||
|
||||
More server disconnection cleanup
|
||||
|
||||
Improve server disconnection/cleanup
|
||||
|
||||
- 20210610
|
||||
|
||||
remove spaces when adding extra server users
|
||||
|
||||
Update udpserver.cpp
|
||||
|
||||
Allow both encoded and plain text passwords
|
||||
|
||||
Lots of fixes to server setup table
|
||||
|
||||
Hopefully fix the occasional 0xe1 packet from hitting the pty
|
||||
|
||||
Add more info for server connections
|
||||
|
||||
Make sure that user is authenticated before allowing CIV/Audio
|
||||
|
||||
Use correct location for statusupdate!
|
||||
|
||||
Indicate when TX is not available
|
||||
|
||||
Show server connection status in taskbar (only for USB connected rigs)
|
||||
|
||||
- 20210609
|
||||
|
||||
Allow sender or receiver to be 0xe1 in server
|
||||
|
||||
Always forward wfview traffic to wfview clients
|
||||
|
||||
- 20210608
|
||||
|
||||
Truncate wfview.log on open
|
||||
|
||||
Detect radio baudrate in server mode
|
||||
|
||||
Comment out rtaudio if not being used
|
||||
|
||||
Baud rate calculations are now only happening when baud rate is received
|
||||
and reasonable.
|
||||
|
||||
- 20210607
|
||||
|
||||
Check that we have at least 1 audio channel available.
|
||||
|
||||
Improve audio cleanup
|
||||
|
||||
Add extra debugging for UDP server CIV
|
||||
|
||||
Make only MacOS use buffered audio
|
||||
|
||||
Improve mac audio
|
||||
|
||||
- 20210606
|
||||
|
||||
Fix TX Audio on Linux
|
||||
|
||||
Various fixes to udpserver
|
||||
|
||||
Make QTMultimedia default
|
||||
|
||||
Fix to allow rtaudio to compile again
|
||||
|
||||
- 20210605
|
||||
|
||||
Add latency check to TX audio
|
||||
|
||||
Fix incorrect use of latency setting
|
||||
|
||||
- 20210604
|
||||
|
||||
Stop silly compile warning
|
||||
|
||||
Change udpserver to use new audiosetup struct properly.
|
||||
|
||||
Fix audio device selection
|
||||
|
||||
Fix for txaudio
|
||||
|
||||
Add QtMultimedia as default audio
|
||||
|
||||
- 20210603
|
||||
|
||||
Hopefully fix hang on exit when trying to close audio thread.
|
||||
|
||||
- 20210602
|
||||
|
||||
Use heap based rtaudio for enumeration
|
||||
|
||||
Catch possible exception when closing non-existent stream
|
||||
|
||||
Fix mac audio
|
||||
|
||||
Fix mac crash on closing audio
|
||||
|
||||
Make sure audio is deleted in destructor
|
||||
|
||||
Force specific rtaudio API depending on platform.
|
||||
|
||||
Linux now uses librtuadio-dev where available
|
||||
|
||||
Removing local rtaudio code and using library instead.
|
||||
|
||||
revert to ALSA for now
|
||||
|
||||
Tell rtaudio not to hog device
|
||||
|
||||
Update audiohandler.cpp
|
||||
|
||||
Select chunksize based on native sample rate
|
||||
|
||||
Force 48K sample rate when 44100 is detected.
|
||||
|
||||
change linux compiler directive to allow new-aligned
|
||||
|
||||
Tidy up server mutexes
|
||||
|
||||
Fix server high CPU on disconnect
|
||||
|
||||
- 20210601
|
||||
|
||||
Stop deleting audio after last client disconects
|
||||
|
||||
Change udpserver packet handling to be similar to udphandler
|
||||
|
||||
Update udpserver.cpp
|
||||
|
||||
Let buffer keep filling.
|
||||
|
||||
Change to 10ms poll time for server rx audio
|
||||
|
||||
Mutex work in udpserver
|
||||
|
||||
Fix for crash when remote requests tone.
|
||||
|
||||
- 20210531
|
||||
|
||||
IC-7700 support
|
||||
|
||||
Open pty non-blocking
|
||||
|
||||
Fix for crashing pty on mac
|
||||
|
||||
Fix compile issue after merge
|
||||
|
||||
- 20210530
|
||||
|
||||
Keep the theme during resize. TODO: preference for wf theme
|
||||
|
||||
Removing my own uninformed sidenote.
|
||||
|
||||
Waterfal length may now be adjusted. Let's see what range of length
|
||||
seems good and limit the control accordingly. Also there may be a memory
|
||||
leak in the prepareWf() function where the colormap is created when the
|
||||
image is resized.
|
||||
|
||||
CIV may now be changed as-needed while running.
|
||||
|
||||
Remove various compiler warnings and tidy up.
|
||||
|
||||
add silence if audio has stopped
|
||||
|
||||
- 20210529
|
||||
|
||||
fix for mac/linux compiler
|
||||
|
||||
Detect number of device channels and convert accordingly
|
||||
|
||||
Lots more changes for rtaudio compatibility
|
||||
|
||||
Small change to show default audio devices
|
||||
|
||||
- 20210528
|
||||
|
||||
More chair movements.
|
||||
|
||||
More arranging of the chairs. Also fixed a minor bug that prevented the
|
||||
"Manual" serial device entry on my system.
|
||||
|
||||
Cleaning up the main constructor for wfmain.
|
||||
|
||||
Add some startup logging
|
||||
|
||||
Update audiohandler.cpp
|
||||
|
||||
Update udphandler.cpp
|
||||
|
||||
Change toolbar display formatting
|
||||
|
||||
Use preferred sample rate rather than force 48000
|
||||
|
||||
- 20210527
|
||||
|
||||
Allow higher latency
|
||||
|
||||
udpserver fixes
|
||||
|
||||
Update udpserver.cpp
|
||||
|
||||
Fix for tx audio channels
|
||||
|
||||
Add tx audio
|
||||
|
||||
add asound lib to linux build
|
||||
|
||||
fix qmake file
|
||||
|
||||
Use ring buffer with rtaudio to eliminate mutexes
|
||||
|
||||
- 20210525
|
||||
|
||||
Update INSTALL_PREBUILT_BINARY.md
|
||||
|
||||
move ulaw to dedicated header
|
||||
|
||||
add rtaudio as submodule
|
||||
|
||||
add opus-tools as submodule
|
||||
|
||||
Add mutex for audio buffer
|
||||
|
||||
- 20210523
|
||||
|
||||
Fixes for linux build
|
||||
|
||||
First working rtaudio (output only)
|
||||
|
||||
Link can now be clicked.
|
||||
|
||||
Added helpful text to settings tab.
|
||||
|
||||
Allow entry to Server Setup for either radio connection type.
|
||||
|
||||
Minor change to clarify roll of Server Setup
|
||||
|
||||
- 20210522
|
||||
|
||||
Add debugging and fix silly error in audiooutput combobox
|
||||
|
||||
reenable audio buffers
|
||||
|
||||
Attempt to fix crash
|
||||
|
||||
Make only first client have TX audio
|
||||
|
||||
Stop audiohandler re-enumerating devices on connect.
|
||||
|
||||
Stop preamps/attenuators lists growing every time we reconnect.
|
||||
|
||||
Try increasing audio device buffer size
|
||||
|
||||
- 20210521
|
||||
|
||||
Changed method for adding modes to rigs and populating the rig menu.
|
||||
This should be easier to maintain and better in the long run.
|
||||
|
||||
"Hopefully" fix annoying UDP server crash on client disconnect!
|
||||
|
||||
Fix for TX audio in udp server
|
||||
|
||||
Fix for stuttering audio on mac
|
||||
|
||||
Fixed missing break in switchs.
|
||||
|
||||
Typo in message about CI-V
|
||||
|
||||
Dynamic timing update for all baud rates and connection types.
|
||||
|
||||
Fixed support for 9600 baud and lower speeds.
|
||||
|
||||
- 20210521
|
||||
|
||||
Add baud rate detection for remote rigs
|
||||
|
|
|
@ -21,11 +21,11 @@ redhat7 -- no qt support
|
|||
Debian 11 (Debian 10 is outdated)
|
||||
Fedora 33
|
||||
Fedora 34
|
||||
mint 20.1
|
||||
mint 20.1 (and up?)
|
||||
openSUSE 15.x
|
||||
openSUSE Tumbleweed
|
||||
SLES 15.x
|
||||
Ubuntu 20.04.2
|
||||
Ubuntu 20.04.2 and up (?)
|
||||
~~~
|
||||
|
||||
|
||||
|
@ -63,6 +63,10 @@ wfview
|
|||
sudo apt install libqcustomplot2.0 libqt5multimedia5 libqt5serialport5
|
||||
sudo ln -s /usr/lib64/libqcustomplot-qt5.so.2 /usr/lib64/libqcustomplot.so.2
|
||||
wfview
|
||||
|
||||
note: if the above symlink fails, use the following line to fix the library link:
|
||||
|
||||
sudo ln -s /lib/x86_64-linux-gnu/libqcustomplot.so.2.0.1 /lib/x86_64-linux-gnu/libqcustomplot.so.2
|
||||
~~~
|
||||
|
||||
### openSUSE/Tumbleweed/SLES:
|
||||
|
@ -76,6 +80,11 @@ wfview
|
|||
sudo apt install libqcustomplot2.0 libqt5multimedia5 libqt5serialport5
|
||||
sudo ln -s /usr/lib/x86_64-linux-gnu/libqcustomplot.so.2.0.1 /usr/lib/x86_64-linux-gnu/libqcustomplot.so.2
|
||||
wfview
|
||||
|
||||
|
||||
note: if the above symlink fails, use the following line to fix the library link:
|
||||
|
||||
sudo ln -s /lib/x86_64-linux-gnu/libqcustomplot.so.2.0.1 /lib/x86_64-linux-gnu/libqcustomplot.so.2
|
||||
~~~
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
|
||||
The following highlights are in this dot-release:
|
||||
|
||||
added IC7700, 718, 7100. (more testing needed)
|
||||
fixes and improvements to audio
|
||||
ability to choose between rtaudio and qtmultimedia (default) as compile time option
|
||||
fixes and lots of improvements at the usb-server end
|
||||
waterfall length can be adjusted now
|
||||
no need to restart to change CIV address
|
||||
seamless changing rigs without restart
|
||||
started support for older rigs like the 718
|
||||
wf display disappears when there is no wf capable rig
|
||||
IC R8600 support improved
|
||||
for older rigs added a polling timing box to keep stuff keeping smooth
|
|
@ -118,8 +118,16 @@ void commHandler::receiveDataIn()
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
if(inPortData.startsWith("\xFE\xFE"))
|
||||
{
|
||||
if(inPortData.contains("\xFC"))
|
||||
{
|
||||
//qInfo(logSerial()) << "Transaction contains collision data. Dumping.";
|
||||
//printHex(inPortData, false, true);
|
||||
port->commitTransaction();
|
||||
return;
|
||||
}
|
||||
if(inPortData.endsWith("\xFD"))
|
||||
{
|
||||
// good!
|
||||
|
|
|
@ -37,6 +37,7 @@ enum mode_kind {
|
|||
struct mode_info {
|
||||
mode_kind mk;
|
||||
unsigned char reg;
|
||||
unsigned char filter;
|
||||
QString name;
|
||||
};
|
||||
|
||||
|
|
|
@ -12,7 +12,8 @@ Q_DECLARE_LOGGING_CATEGORY(logUdp)
|
|||
Q_DECLARE_LOGGING_CATEGORY(logUdpServer)
|
||||
Q_DECLARE_LOGGING_CATEGORY(logRigCtlD)
|
||||
|
||||
#if !defined(__PRETTY_FUNCTION__)
|
||||
|
||||
#if defined(Q_OS_WIN) && !defined(__PRETTY_FUNCTION__)
|
||||
#define __PRETTY_FUNCTION__ __FUNCSIG__
|
||||
#endif
|
||||
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
Subproject commit ae5d6d59e82ef40300a4dece7897499685f87184
|
115
rigcommander.cpp
115
rigcommander.cpp
|
@ -362,6 +362,10 @@ void rigCommander::setSpectrumBounds(double startFreq, double endFreq, unsigned
|
|||
if(startFreq > 400.0)
|
||||
freqRange++;
|
||||
break;
|
||||
case modelR8600:
|
||||
freqRange = 1;
|
||||
edgeNumber = 1;
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
break;
|
||||
|
@ -429,7 +433,7 @@ void rigCommander::setScopeSpan(char span)
|
|||
// See ICD, page 165, "19-12".
|
||||
// 2.5k = 0
|
||||
// 5k = 2, etc.
|
||||
if((span <0 ) || (span >7))
|
||||
if((span <0 ) || (span >9))
|
||||
return;
|
||||
|
||||
QByteArray payload;
|
||||
|
@ -464,6 +468,12 @@ void rigCommander::setScopeSpan(char span)
|
|||
case 7:
|
||||
freq = 500.0E-3;
|
||||
break;
|
||||
case 8:
|
||||
freq = 1000.0E-3;
|
||||
break;
|
||||
case 9:
|
||||
freq = 2500.0E-3;
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
break;
|
||||
|
@ -655,6 +665,28 @@ void rigCommander::setRitValue(int ritValue)
|
|||
prepDataAndSend(payload);
|
||||
}
|
||||
|
||||
void rigCommander::setMode(mode_info m)
|
||||
{
|
||||
QByteArray payload;
|
||||
|
||||
if(rigCaps.model==model706)
|
||||
{
|
||||
m.filter = '\x01';
|
||||
}
|
||||
if(m.mk == modeWFM)
|
||||
{
|
||||
m.filter = '\x01';
|
||||
}
|
||||
|
||||
payload.setRawData("\x06", 1);
|
||||
payload.append(m.reg);
|
||||
payload.append(m.filter);
|
||||
|
||||
prepDataAndSend(payload);
|
||||
rigState.mode = m.reg;
|
||||
rigState.filter = m.filter;
|
||||
}
|
||||
|
||||
void rigCommander::setMode(unsigned char mode, unsigned char modeFilter)
|
||||
{
|
||||
QByteArray payload;
|
||||
|
@ -673,7 +705,12 @@ void rigCommander::setMode(unsigned char mode, unsigned char modeFilter)
|
|||
{
|
||||
payload.append("\x01"); // "normal" on IC-706
|
||||
} else {
|
||||
payload.append(modeFilter);
|
||||
if(mode == 0x06)
|
||||
{
|
||||
payload.append(0x01);
|
||||
} else {
|
||||
payload.append(modeFilter);
|
||||
}
|
||||
}
|
||||
|
||||
prepDataAndSend(payload);
|
||||
|
@ -1090,6 +1127,12 @@ void rigCommander::parseData(QByteArray dataInput)
|
|||
// payload = getpayload(data); // or something
|
||||
// parse (payload); // recursive ok?
|
||||
payloadIn = data.right(data.length() - 4);
|
||||
if(payloadIn.contains("\xFE"))
|
||||
{
|
||||
//qDebug(logRig()) << "Corrupted data contains FE within message body: ";
|
||||
//printHex(payloadIn);
|
||||
break;
|
||||
}
|
||||
parseCommand();
|
||||
break;
|
||||
case '\x00':
|
||||
|
@ -1100,9 +1143,15 @@ void rigCommander::parseData(QByteArray dataInput)
|
|||
// This is an echo of our own broadcast request.
|
||||
// The data are "to 00" and "from E1"
|
||||
// Don't use it!
|
||||
qDebug(logRig()) << "Caught it! Found the echo'd broadcast request from us!";
|
||||
qDebug(logRig()) << "Caught it! Found the echo'd broadcast request from us! Rig has not responded to broadcast query yet.";
|
||||
} else {
|
||||
payloadIn = data.right(data.length() - 4);
|
||||
payloadIn = data.right(data.length() - 4); // Removes FE FE E0 94 part
|
||||
if(payloadIn.contains("\xFE"))
|
||||
{
|
||||
//qDebug(logRig()) << "Corrupted data contains FE within message body: ";
|
||||
//printHex(payloadIn);
|
||||
break;
|
||||
}
|
||||
parseCommand();
|
||||
}
|
||||
break;
|
||||
|
@ -1320,9 +1369,9 @@ void rigCommander::parseLevels()
|
|||
break;
|
||||
|
||||
default:
|
||||
qInfo(logRig()) << "Unknown control level (0x14) received at register " << payloadIn[1] << " with level " << level;
|
||||
qInfo(logRig()) << "Unknown control level (0x14) received at register " << QString("0x%1").arg((int)payloadIn[1],2,16) << " with level " << QString("0x%1").arg((int)level,2,16) << ", int=" << (int)level;
|
||||
printHex(payloadIn);
|
||||
break;
|
||||
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
@ -2474,7 +2523,6 @@ void rigCommander::parseDetailedRegisters1A05()
|
|||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void rigCommander::parseWFData()
|
||||
|
@ -2549,6 +2597,14 @@ mode_info rigCommander::createMode(mode_kind m, unsigned char reg, QString name)
|
|||
return mode;
|
||||
}
|
||||
|
||||
centerSpanData rigCommander::createScopeCenter(centerSpansType s, QString name)
|
||||
{
|
||||
centerSpanData csd;
|
||||
csd.cstype = s;
|
||||
csd.name = name;
|
||||
return csd;
|
||||
}
|
||||
|
||||
void rigCommander::determineRigCaps()
|
||||
{
|
||||
//TODO: Determine available bands (low priority, rig will reject out of band requests anyway)
|
||||
|
@ -2577,6 +2633,7 @@ void rigCommander::determineRigCaps()
|
|||
|
||||
rigCaps.hasDD = false;
|
||||
rigCaps.hasDV = false;
|
||||
rigCaps.hasDataModes = true; // USB-D, LSB-D, etc
|
||||
rigCaps.hasATU = false;
|
||||
|
||||
rigCaps.hasCTCSS = false;
|
||||
|
@ -2585,7 +2642,14 @@ void rigCommander::determineRigCaps()
|
|||
rigCaps.spectSeqMax = 0;
|
||||
rigCaps.spectAmpMax = 0;
|
||||
rigCaps.spectLenMax = 0;
|
||||
rigCaps.scopeCenterSpans = { createScopeCenter(cs2p5k, "±2.5k"), createScopeCenter(cs5k, "±5k"),
|
||||
createScopeCenter(cs10k, "±10k"), createScopeCenter(cs25k, "±25k"),
|
||||
createScopeCenter(cs50k, "±50k"), createScopeCenter(cs100k, "±100k"),
|
||||
createScopeCenter(cs250k, "±250k"), createScopeCenter(cs500k, "±500k")
|
||||
};
|
||||
|
||||
|
||||
rigCaps.hasFDcomms = true; // false for older radios
|
||||
|
||||
// Clear inputs/preamps/attenuators lists in case we have re-connected.
|
||||
rigCaps.preamps.clear();
|
||||
|
@ -2601,6 +2665,7 @@ void rigCommander::determineRigCaps()
|
|||
rigCaps.hasAntennaSel = false;
|
||||
|
||||
rigCaps.hasTransmit = true;
|
||||
rigCaps.hasPTTCommand = true;
|
||||
|
||||
// Common, reasonable defaults for most supported HF rigs:
|
||||
rigCaps.bsr[band160m] = 0x01;
|
||||
|
@ -2663,6 +2728,7 @@ void rigCommander::determineRigCaps()
|
|||
rigCaps.hasEthernet = true;
|
||||
rigCaps.hasWiFi = false;
|
||||
rigCaps.hasTransmit = false;
|
||||
rigCaps.hasPTTCommand = false;
|
||||
rigCaps.hasCTCSS = true;
|
||||
rigCaps.hasDTCS = true;
|
||||
rigCaps.hasDV = true;
|
||||
|
@ -2683,6 +2749,7 @@ void rigCommander::determineRigCaps()
|
|||
createMode(modeP25, 0x16, "P25"), createMode(modedPMR, 0x18, "dPMR"),
|
||||
createMode(modeNXDN_VN, 0x19, "NXDN-VN"), createMode(modeNXDN_N, 0x20, "NXDN-N"),
|
||||
createMode(modeDCR, 0x21, "DCR")});
|
||||
rigCaps.scopeCenterSpans.insert(rigCaps.scopeCenterSpans.end(), {createScopeCenter(cs1M, "±1M"), createScopeCenter(cs2p5M, "±2.5M")});
|
||||
break;
|
||||
case model9700:
|
||||
rigCaps.modelName = QString("IC-9700");
|
||||
|
@ -2717,6 +2784,7 @@ void rigCommander::determineRigCaps()
|
|||
rigCaps.hasLan = false;
|
||||
rigCaps.hasEthernet = false;
|
||||
rigCaps.hasWiFi = false;
|
||||
rigCaps.hasFDcomms = false;
|
||||
rigCaps.hasDD = false;
|
||||
rigCaps.hasDV = false;
|
||||
rigCaps.hasCTCSS = true;
|
||||
|
@ -2832,6 +2900,7 @@ void rigCommander::determineRigCaps()
|
|||
rigCaps.hasLan = false;
|
||||
rigCaps.hasEthernet = false;
|
||||
rigCaps.hasWiFi = false;
|
||||
rigCaps.hasFDcomms = false;
|
||||
rigCaps.hasATU = true;
|
||||
rigCaps.hasCTCSS = true;
|
||||
rigCaps.hasDTCS = true;
|
||||
|
@ -2852,6 +2921,7 @@ void rigCommander::determineRigCaps()
|
|||
rigCaps.hasLan = false;
|
||||
rigCaps.hasEthernet = false;
|
||||
rigCaps.hasWiFi = false;
|
||||
rigCaps.hasFDcomms = true;
|
||||
rigCaps.hasATU = true;
|
||||
rigCaps.hasCTCSS = true;
|
||||
rigCaps.hasDTCS = true;
|
||||
|
@ -2872,6 +2942,7 @@ void rigCommander::determineRigCaps()
|
|||
rigCaps.hasLan = false;
|
||||
rigCaps.hasEthernet = false;
|
||||
rigCaps.hasWiFi = false;
|
||||
rigCaps.hasFDcomms = false;
|
||||
rigCaps.hasATU = true;
|
||||
rigCaps.hasCTCSS = true;
|
||||
rigCaps.hasDTCS = true;
|
||||
|
@ -2897,6 +2968,7 @@ void rigCommander::determineRigCaps()
|
|||
rigCaps.hasLan = false;
|
||||
rigCaps.hasEthernet = false;
|
||||
rigCaps.hasWiFi = false;
|
||||
rigCaps.hasFDcomms = false;
|
||||
rigCaps.hasATU = true;
|
||||
rigCaps.hasCTCSS = true;
|
||||
rigCaps.hasDTCS = true;
|
||||
|
@ -2939,7 +3011,10 @@ void rigCommander::determineRigCaps()
|
|||
rigCaps.hasLan = false;
|
||||
rigCaps.hasEthernet = false;
|
||||
rigCaps.hasWiFi = false;
|
||||
rigCaps.hasFDcomms = false;
|
||||
rigCaps.hasATU = true;
|
||||
rigCaps.hasPTTCommand = false;
|
||||
rigCaps.hasDataModes = false;
|
||||
rigCaps.attenuators.push_back('\x20');
|
||||
rigCaps.bands = standardHF;
|
||||
rigCaps.bands.insert(rigCaps.bands.end(), standardVU.begin(), standardVU.end());
|
||||
|
@ -2947,6 +3022,28 @@ void rigCommander::determineRigCaps()
|
|||
rigCaps.modes = commonModes;
|
||||
rigCaps.modes.insert(rigCaps.modes.end(), createMode(modeWFM, 0x06, "WFM"));
|
||||
break;
|
||||
case model718:
|
||||
rigCaps.modelName = QString("IC-718");
|
||||
rigCaps.hasSpectrum = false;
|
||||
rigCaps.inputs.clear();
|
||||
rigCaps.hasLan = false;
|
||||
rigCaps.hasEthernet = false;
|
||||
rigCaps.hasWiFi = false;
|
||||
rigCaps.hasFDcomms = false;
|
||||
rigCaps.hasATU = false;
|
||||
rigCaps.hasPTTCommand = false;
|
||||
rigCaps.hasDataModes = false;
|
||||
rigCaps.attenuators.push_back('\x20');
|
||||
rigCaps.preamps.push_back('\x01');
|
||||
rigCaps.bands = {band10m, band10m, band12m,
|
||||
band15m, band17m, band20m, band30m,
|
||||
band40m, band60m, band80m, band160m, bandGen};
|
||||
rigCaps.modes = { createMode(modeLSB, 0x00, "LSB"), createMode(modeUSB, 0x01, "USB"),
|
||||
createMode(modeAM, 0x02, "AM"),
|
||||
createMode(modeCW, 0x03, "CW"), createMode(modeCW_R, 0x07, "CW-R"),
|
||||
createMode(modeRTTY, 0x04, "RTTY"), createMode(modeRTTY_R, 0x08, "RTTY-R")
|
||||
};
|
||||
break;
|
||||
case model756pro:
|
||||
rigCaps.modelName = QString("IC-756 Pro");
|
||||
rigCaps.hasSpectrum = false;
|
||||
|
@ -2954,6 +3051,7 @@ void rigCommander::determineRigCaps()
|
|||
rigCaps.hasLan = false;
|
||||
rigCaps.hasEthernet = false;
|
||||
rigCaps.hasWiFi = false;
|
||||
rigCaps.hasFDcomms = false;
|
||||
rigCaps.hasATU = true;
|
||||
rigCaps.preamps.push_back('\x01');
|
||||
rigCaps.preamps.push_back('\x02');
|
||||
|
@ -2971,6 +3069,7 @@ void rigCommander::determineRigCaps()
|
|||
rigCaps.hasLan = false;
|
||||
rigCaps.hasEthernet = false;
|
||||
rigCaps.hasWiFi = false;
|
||||
rigCaps.hasFDcomms = false;
|
||||
rigCaps.hasATU = true;
|
||||
rigCaps.preamps.push_back('\x01');
|
||||
rigCaps.preamps.push_back('\x02');
|
||||
|
@ -2988,6 +3087,7 @@ void rigCommander::determineRigCaps()
|
|||
rigCaps.hasLan = false;
|
||||
rigCaps.hasEthernet = false;
|
||||
rigCaps.hasWiFi = false;
|
||||
rigCaps.hasFDcomms = false;
|
||||
rigCaps.hasATU = true;
|
||||
rigCaps.preamps.push_back('\x01');
|
||||
rigCaps.preamps.push_back('\x02');
|
||||
|
@ -3008,6 +3108,7 @@ void rigCommander::determineRigCaps()
|
|||
rigCaps.hasLan = false;
|
||||
rigCaps.hasEthernet = false;
|
||||
rigCaps.hasWiFi = false;
|
||||
rigCaps.hasFDcomms = false;
|
||||
rigCaps.hasPreamp = false;
|
||||
rigCaps.hasAntennaSel = false;
|
||||
rigCaps.attenuators.push_back('\x10');
|
||||
|
|
|
@ -119,6 +119,7 @@ public slots:
|
|||
void setFrequency(freqt freq);
|
||||
void getFrequency();
|
||||
void setMode(unsigned char mode, unsigned char modeFilter);
|
||||
void setMode(mode_info);
|
||||
void getMode();
|
||||
void setDataMode(bool dataOn, unsigned char filter);
|
||||
void getDataMode();
|
||||
|
@ -377,6 +378,7 @@ private:
|
|||
void printHex(const QByteArray &pdata);
|
||||
void printHex(const QByteArray &pdata, bool printVert, bool printHoriz);
|
||||
mode_info createMode(mode_kind m, unsigned char reg, QString name);
|
||||
centerSpanData createScopeCenter(centerSpansType s, QString name);
|
||||
|
||||
commHandler* comm = Q_NULLPTR;
|
||||
pttyHandler* ptty = Q_NULLPTR;
|
||||
|
|
|
@ -52,8 +52,11 @@ model_kind determineRadioModel(unsigned char rigID)
|
|||
case model705:
|
||||
rig = model705;
|
||||
break;
|
||||
case model756proiii:
|
||||
rig = model756proiii;
|
||||
case model718:
|
||||
rig = model718;
|
||||
break;
|
||||
case model910h:
|
||||
rig = model910h;
|
||||
break;
|
||||
case model756pro:
|
||||
rig = model756pro;
|
||||
|
@ -61,6 +64,9 @@ model_kind determineRadioModel(unsigned char rigID)
|
|||
case model756proii:
|
||||
rig = model756proii;
|
||||
break;
|
||||
case model756proiii:
|
||||
rig = model756proiii;
|
||||
break;
|
||||
default:
|
||||
rig = modelUnknown;
|
||||
break;
|
||||
|
|
|
@ -28,6 +28,7 @@ enum model_kind {
|
|||
model9700 = 0xA2,
|
||||
model705 = 0xA4,
|
||||
model706 = 0x58,
|
||||
model718 = 0x5E,
|
||||
model756pro = 0x5C,
|
||||
model756proii = 0x64,
|
||||
model756proiii = 0x6E,
|
||||
|
@ -67,6 +68,24 @@ enum bandType { band23cm=0,
|
|||
bandGen
|
||||
};
|
||||
|
||||
enum centerSpansType {
|
||||
cs2p5k = 0,
|
||||
cs5k = 1,
|
||||
cs10k = 2,
|
||||
cs25k = 3,
|
||||
cs50k = 4,
|
||||
cs100k = 5,
|
||||
cs250k = 6,
|
||||
cs500k = 7,
|
||||
cs1M = 8,
|
||||
cs2p5M = 9
|
||||
};
|
||||
|
||||
struct centerSpanData {
|
||||
centerSpansType cstype;
|
||||
QString name;
|
||||
};
|
||||
|
||||
model_kind determineRadioModel(unsigned char rigID);
|
||||
|
||||
struct rigCapabilities {
|
||||
|
@ -80,6 +99,7 @@ struct rigCapabilities {
|
|||
bool hasLan; // OEM ethernet or wifi connection
|
||||
bool hasEthernet;
|
||||
bool hasWiFi;
|
||||
bool hasFDcomms;
|
||||
|
||||
QVector<rigInput> inputs;
|
||||
|
||||
|
@ -96,13 +116,16 @@ struct rigCapabilities {
|
|||
bool hasDTCS;
|
||||
|
||||
bool hasTransmit;
|
||||
bool hasPTTCommand;
|
||||
bool hasAttenuator;
|
||||
bool hasPreamp;
|
||||
bool hasAntennaSel;
|
||||
bool hasDataModes;
|
||||
|
||||
std::vector <unsigned char> attenuators;
|
||||
std::vector <unsigned char> preamps;
|
||||
std::vector <unsigned char> antennas;
|
||||
std::vector <centerSpanData> scopeCenterSpans;
|
||||
std::vector <bandType> bands;
|
||||
unsigned char bsr[20] = {0};
|
||||
|
||||
|
|
1228
wfmain.cpp
1228
wfmain.cpp
Plik diff jest za duży
Load Diff
62
wfmain.h
62
wfmain.h
|
@ -29,6 +29,9 @@
|
|||
#include <qcustomplot.h>
|
||||
#include <qserialportinfo.h>
|
||||
|
||||
#include <deque>
|
||||
#include <memory>
|
||||
|
||||
namespace Ui {
|
||||
class wfmain;
|
||||
}
|
||||
|
@ -56,6 +59,7 @@ signals:
|
|||
void setFrequency(freqt freq);
|
||||
void getMode();
|
||||
void setMode(unsigned char modeIndex, unsigned char modeFilter);
|
||||
void setMode(mode_info);
|
||||
void setDataMode(bool dataOn, unsigned char filter);
|
||||
void getDataMode();
|
||||
void getModInput(bool dataOn);
|
||||
|
@ -144,6 +148,7 @@ signals:
|
|||
void sendRigCaps(rigCapabilities caps);
|
||||
|
||||
private slots:
|
||||
void updateSizes(int tabIndex);
|
||||
void shortcutF1();
|
||||
void shortcutF2();
|
||||
void shortcutF3();
|
||||
|
@ -233,8 +238,7 @@ private slots:
|
|||
void handleWFDoubleClick(QMouseEvent *);
|
||||
void handleWFScroll(QWheelEvent *);
|
||||
void handlePlotScroll(QWheelEvent *);
|
||||
void runDelayedCommand();
|
||||
void runPeriodicCommands();
|
||||
void sendRadioCommandLoop();
|
||||
void showStatusBarText(QString text);
|
||||
void serverConfigRequested(SERVERCONFIG conf, bool store);
|
||||
void receiveBaudRate(quint32 baudrate);
|
||||
|
@ -448,6 +452,8 @@ private slots:
|
|||
|
||||
void on_wfLengthSlider_valueChanged(int value);
|
||||
|
||||
void on_pollingBtn_clicked();
|
||||
|
||||
private:
|
||||
Ui::wfmain *ui;
|
||||
void closeEvent(QCloseEvent *event);
|
||||
|
@ -462,6 +468,7 @@ private:
|
|||
void setPlotTheme(QCustomPlot *plot, bool isDark);
|
||||
void prepareWf();
|
||||
void prepareWf(unsigned int wfLength);
|
||||
void showHideSpectrum(bool show);
|
||||
void getInitialRigState();
|
||||
void setBandButtons();
|
||||
void showButton(QPushButton *btn);
|
||||
|
@ -509,6 +516,8 @@ private:
|
|||
QShortcut *keyF;
|
||||
QShortcut *keyM;
|
||||
|
||||
QShortcut *keyDebug;
|
||||
|
||||
|
||||
rigCommander * rig=Q_NULLPTR;
|
||||
QThread* rigThread = Q_NULLPTR;
|
||||
|
@ -516,8 +525,9 @@ private:
|
|||
QCPColorMapData * colorMapData;
|
||||
QCPColorScale * colorScale;
|
||||
QTimer * delayedCommand;
|
||||
QTimer * periodicPollingTimer;
|
||||
QTimer * pttTimer;
|
||||
uint16_t loopTickCounter;
|
||||
uint16_t slowCmdNum;
|
||||
|
||||
void setupPlots();
|
||||
void makeRig();
|
||||
|
@ -557,6 +567,7 @@ private:
|
|||
int smeterPos=0;
|
||||
|
||||
QVector <QByteArray> wfimage;
|
||||
unsigned int wfLengthMax;
|
||||
|
||||
bool onFullscreen;
|
||||
bool drawPeaks;
|
||||
|
@ -571,22 +582,46 @@ private:
|
|||
unsigned char setModeVal=0;
|
||||
unsigned char setFilterVal=0;
|
||||
|
||||
enum cmds {cmdNone, cmdGetRigID, cmdGetRigCIV, cmdGetFreq, cmdGetMode, cmdGetDataMode, cmdSetModeFilter,
|
||||
enum cmds {cmdNone, cmdGetRigID, cmdGetRigCIV, cmdGetFreq, cmdSetFreq, cmdGetMode, cmdSetMode, cmdGetDataMode, cmdSetModeFilter,
|
||||
cmdSetDataModeOn, cmdSetDataModeOff, cmdGetRitEnabled, cmdGetRitValue,
|
||||
cmdSpecOn, cmdSpecOff, cmdDispEnable, cmdDispDisable, cmdGetRxGain, cmdGetAfGain,
|
||||
cmdGetSql, cmdGetATUStatus, cmdGetSpectrumMode, cmdGetSpectrumSpan, cmdScopeCenterMode, cmdScopeFixedMode, cmdGetPTT,
|
||||
cmdGetTxPower, cmdGetMicGain, cmdGetSpectrumRefLevel, cmdGetDuplexMode, cmdGetModInput, cmdGetModDataInput,
|
||||
cmdSpecOn, cmdSpecOff, cmdDispEnable, cmdDispDisable, cmdGetRxGain, cmdSetRxRfGain, cmdGetAfGain, cmdSetAfGain,
|
||||
cmdGetSql, cmdSetSql, cmdGetATUStatus, cmdSetATU, cmdStartATU, cmdGetSpectrumMode, cmdGetSpectrumSpan, cmdScopeCenterMode, cmdScopeFixedMode, cmdGetPTT, cmdSetPTT,
|
||||
cmdGetTxPower, cmdSetTxPower, cmdGetMicGain, cmdSetMicGain, cmdSetModLevel, cmdGetSpectrumRefLevel, cmdGetDuplexMode, cmdGetModInput, cmdGetModDataInput,
|
||||
cmdGetCurrentModLevel, cmdStartRegularPolling, cmdStopRegularPolling, cmdQueNormalSpeed,
|
||||
cmdGetVdMeter, cmdGetIdMeter, cmdGetSMeter, cmdGetPowerMeter, cmdGetALCMeter, cmdGetCompMeter,
|
||||
cmdGetVdMeter, cmdGetIdMeter, cmdGetSMeter, cmdGetPowerMeter, cmdGetALCMeter, cmdGetCompMeter, cmdGetTxRxMeter,
|
||||
cmdGetTone, cmdGetTSQL, cmdGetDTCS, cmdGetRptAccessMode, cmdGetPreamp, cmdGetAttenuator, cmdGetAntenna};
|
||||
|
||||
cmds cmdOut;
|
||||
QVector <cmds> cmdOutQue;
|
||||
QVector <cmds> periodicCmdQueue;
|
||||
struct commandtype {
|
||||
cmds cmd;
|
||||
std::shared_ptr<void> data;
|
||||
};
|
||||
|
||||
std::deque <commandtype> delayedCmdQue; // rapid que for commands to the radio
|
||||
std::deque <cmds> periodicCmdQueue; // rapid que for metering
|
||||
std::deque <cmds> slowPollCmdQueue; // slow, regular checking for UI sync
|
||||
void doCmd(cmds cmd);
|
||||
void doCmd(commandtype cmddata);
|
||||
|
||||
void issueCmd(cmds cmd, freqt f);
|
||||
void issueCmd(cmds cmd, mode_info m);
|
||||
void issueCmd(cmds cmd, int i);
|
||||
void issueCmd(cmds cmd, unsigned char c);
|
||||
void issueCmd(cmds cmd, char c);
|
||||
void issueCmd(cmds cmd, bool b);
|
||||
|
||||
// These commands pop_front and remove similar commands:
|
||||
void issueCmdUniquePriority(cmds cmd, bool b);
|
||||
void issueCmdUniquePriority(cmds cmd, unsigned char c);
|
||||
void issueCmdUniquePriority(cmds cmd, char c);
|
||||
void issueCmdUniquePriority(cmds cmd, freqt f);
|
||||
|
||||
void removeSimilarCommand(cmds cmd);
|
||||
|
||||
int pCmdNum = 0;
|
||||
int delayedCmdIntervalLAN_ms = 100;
|
||||
int delayedCmdIntervalSerial_ms = 100;
|
||||
int delayedCmdStartupInterval_ms = 100;
|
||||
bool runPeriodicCommands;
|
||||
bool usingLAN = false;
|
||||
|
||||
freqMemory mem;
|
||||
|
@ -660,6 +695,8 @@ private:
|
|||
void issueDelayedCommandPriority(cmds cmd);
|
||||
void issueDelayedCommandUnique(cmds cmd);
|
||||
void changeSliderQuietly(QSlider *slider, int value);
|
||||
void statusFromSliderPercent(QString name, int percentValue);
|
||||
void statusFromSliderRaw(QString name, int rawValue);
|
||||
|
||||
void processModLevel(rigInput source, unsigned char level);
|
||||
|
||||
|
@ -672,6 +709,7 @@ private:
|
|||
|
||||
void initPeriodicCommands();
|
||||
void insertPeriodicCommand(cmds cmd, unsigned char priority);
|
||||
void insertSlowPeriodicCommand(cmds cmd, unsigned char priority);
|
||||
void calculateTimingParameters();
|
||||
|
||||
void changeMode(mode_kind mode);
|
||||
|
@ -683,6 +721,7 @@ private:
|
|||
rigInput currentModSrc = inputUnknown;
|
||||
rigInput currentModDataSrc = inputUnknown;
|
||||
mode_kind currentMode = modeUSB;
|
||||
mode_info currentModeInfo;
|
||||
|
||||
bool haveRigCaps;
|
||||
bool amTransmitting;
|
||||
|
@ -732,6 +771,7 @@ private:
|
|||
|
||||
Q_DECLARE_METATYPE(struct rigCapabilities)
|
||||
Q_DECLARE_METATYPE(struct freqt)
|
||||
Q_DECLARE_METATYPE(struct mode_info)
|
||||
Q_DECLARE_METATYPE(struct udpPreferences)
|
||||
Q_DECLARE_METATYPE(struct rigStateStruct)
|
||||
Q_DECLARE_METATYPE(struct audioPacket)
|
||||
|
|
32
wfmain.ui
32
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">
|
||||
|
@ -26,7 +26,7 @@
|
|||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<widget class="QGroupBox" name="spectrumGroupBox">
|
||||
<property name="title">
|
||||
<string>Spectrum</string>
|
||||
</property>
|
||||
|
@ -44,12 +44,12 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_13">
|
||||
<layout class="QHBoxLayout" name="specControlsHorizLayout">
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_26">
|
||||
<widget class="QLabel" name="specModeLabel">
|
||||
<property name="text">
|
||||
<string>Spectrum Mode: </string>
|
||||
</property>
|
||||
|
@ -66,7 +66,7 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_6">
|
||||
<widget class="QLabel" name="specSpanLabel">
|
||||
<property name="text">
|
||||
<string>Span:</string>
|
||||
</property>
|
||||
|
@ -86,7 +86,7 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_7">
|
||||
<widget class="QLabel" name="specEdgeLabel">
|
||||
<property name="text">
|
||||
<string>Edge</string>
|
||||
</property>
|
||||
|
@ -133,7 +133,7 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_31">
|
||||
<widget class="QLabel" name="specThemeLabel">
|
||||
<property name="text">
|
||||
<string>Theme:</string>
|
||||
</property>
|
||||
|
@ -150,7 +150,7 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<spacer name="specHorizSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
|
@ -2612,6 +2612,22 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pollingBtn">
|
||||
<property name="toolTip">
|
||||
<string>Set up radio polling. The radio's meter is polled every-other interval.</string>
|
||||
</property>
|
||||
<property name="accessibleName">
|
||||
<string>Polling</string>
|
||||
</property>
|
||||
<property name="accessibleDescription">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Polling</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_6">
|
||||
<property name="orientation">
|
||||
|
|
Ładowanie…
Reference in New Issue