Detection aligns on uncorrected preamble bins. If the aligned, fractional-CFO-corrected upchirp peak retains a one-bin integer residual, adjust the next FIFO consumption by -osFactor * residual. The current Sync window has already been read; remaining net-ID windows, downchirps and payload use the adjusted grid.
In separate live runs, 25.8% of fix-off frames had a residual and 93.8% of those needed binfix recovery; with the fix enabled, 8.2% had a residual and 100% of those passed without binfix. The runs were not paired, so they support the mechanism but do not measure a success-rate improvement.
Add a pending sample adjustment to the next FIFO consumption and clear it after use or frame reset. Nothing sets a nonzero adjustment yet, so decoding behavior is unchanged.
Keep the existing fractional STO result exactly, including half-bin ties. When requested through an optional out-parameter, report the integer residual of the aligned, fractional-CFO-corrected preamble peak. Existing callers do not request the residual, so decoding behavior is unchanged.
Support WAV recordings larger than 4 GiB by using the RF64 format and
storing 64-bit RIFF and data sizes in the ds64 chunk. Reserve space for
the ds64 chunk in the initial header and convert the file to RF64 when
the RIFF or data chunk exceeds the 32-bit WAV size limit.
Update header parsing to handle RF64, ds64, JUNK, variable-size fmt and
auxi chunks, and unknown chunks. Generate standard RF64 headers that
can be read by other RF64-compatible audio applications.
Signed-off-by: Robin Getz <rgetz503@gmail.com>
ConfigurationsDialog calls on_configurationLoad_clicked() from both
on_configurationsTree_itemActivated() (double-click or Enter) and accept()
(the OK button), so a double-click followed by OK - or simply a second click on
Load while the first is still running - starts a second LoadConfigurationFSM.
MainWindow::loadConfiguration() had no guard, so the two ran concurrently: the
second FSM's RemoveAllWorkspacesFSM deletes the workspaces, device sets and GUI
widgets the first FSM is still walking, and the first then dereferences freed
objects.
This is easy to hit on first run, where SDRangel populates the bundled example
configurations and opens the Configurations dialog by itself.
The crash site varies with timing and with which configuration is loaded;
QProgressDialog::setLabelText() from LoadConfigurationFSM::loadDeviceSetSettings()
and the Map feature's QQuickWidget have both been observed. Driving the dialog
with two loads reproduced it 3/3; a single load did not crash in 2/2.
Refuse a load while one is in flight. The in-flight FSM is tracked through a
QPointer so an FSM destroyed without finishing cannot wedge configuration
loading permanently.
LoadConfigurationFSM::m_waitBox becomes a QPointer for the same reason: the
progress dialog is created with WA_DeleteOnClose and the FSM outlives it, so the
existing "if (m_waitBox)" checks in the state handlers were testing a pointer
that could already dangle.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Add a world icon button to the position dialog that opens
mapquest.com in the default browser. This makes users aware that
latitude, longitude can be obtained from standard web sites when
a GPS or other positioning device is not available, without
requiring them to search for a way to obtain the information.
This provides an (in)direct path to the values needed by SDRangel.
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Removing a channel's sink or source from a device engine was a queued
message, so a channel could be deleted while the engine thread was
still feeding it. When the caller is deleting, the removal now runs on
the engine thread and is waited for, provided that thread is running
and is not the caller. The MIMO engine gains the same deleting flag and
does the same for its MIMO channels.
ScopeVis and GLScope now attach and detach under the vis mutex and each
clears the other on destruction, as SpectrumVis and GLSpectrum already
do, so a scope window closing while its channel is still running no
longer leaves a dangling pointer on either side.
Also drops an unused variable in GLSpectrumView::paintGL.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
get_spectrum_history reports what has been on a band over the last
while from the spectrum's scroll history, per bin and as a list of
signals with their duty cycles; get_waterfall_image returns the same
history as a picture, the first tool to put image content beside the
text in a result. Both switch scrolling on when it is off and say so.
list_windows shows every window with its workspace and whether it is
hidden, and set_workspace takes hidden alongside the workspace index.
capture_audio's inline copy is now mono and decimated to 16 kHz, so a
ten second capture fits under the 1 MB result limit; the file on disk
is unchanged.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
GET .../spectrum/history reads the history the spectrum display keeps
for scrolling and reports, over the last seconds and a frequency range
reduced to bins, the per bin maximum, mean and occupancy against a
floor taken as the median of the per bin means, and the signals: each
run of bins above the threshold with its frequency, width, peak, duty
cycle and first and last seen. GET .../spectrum/history/image renders
the same history as a greyscale PNG with its extents in headers.
GLSpectrumInterface gains getSpectrumHistory, which GLSpectrumView
answers from its scroll buffer under its mutex, folding consecutive
rows together by maximum so that at most the rows asked for span the
whole period, since every FFT is a row. Rows taken at another centre or
rate are skipped and counted.
SpectrumVis reads the display while holding its mutex, so the display
is now attached and detached under it, and each side clears the other
on destruction.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
GET /sdrangel/windows lists every device, spectrum, channel and feature
window with its workspace, title and whether it is hidden; the workspace
PUTs take a hidden field alongside the index.
The Web API has no access to the GUI, so MainCore keeps a table of what
the GUI has published for each window, keyed by the DeviceAPI,
SpectrumVis, ChannelAPI or Feature it belongs to. The GUI side is a new
WorkspaceWindow base for the four window classes, which publishes on
every show and hide, on a retitle and when the workspaces are renumbered,
and takes the workspace from the window's Workspace ancestor rather than
the plugin's settings, which a settings message from the channel can
reset.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Both overrode showEvent for the QTBUG-100333 redraw workaround without
calling the base class, so the window state FeatureGUI publishes on show
never ran and the windows API reported the windows hidden while they
were on screen.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The GPS position button indicates that other positioning methods may be
used when GPS is unavailable. Add an IP geolocation fallback using the
IP2Location.io web service to obtain approximate latitude and longitude,
followed by Open-Elevation to determine elevation for those coordinates.
Only use the fallback when GPS is unavailable and the current latitude and
longitude are both zero, avoiding replacement of an existing position
entered by the user or obtained from another source since the IP geolocation
is known to be ± 50km.
Signed-off-by: Robin Getz <rgetz503@gmail.com>