1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-07-29 21:44:14 -04:00
Commit Graph

53 Commits

Author SHA1 Message Date
Robin Getz 68aea9c16f RadioAstronomy: Apply channel settings only after dialog acceptance
Only apply channel settings after BasicChannelSettingsDialog returns an
accepted result. Previously, the return value from dialog.exec() was ignored
and settings were copied from the dialog regardless of whether the dialog was
accepted or rejected.

This could cause changes made in the channel settings dialog to be applied
even when the user discarded them. Check the dialog result before updating
the channel title, color, Reverse API configuration, and stream index to keep
the GUI state synchronized with the user's action.

This also fixes the Coverity CHECKED_RETURN warning for the unchecked
QDialog::exec() return value.

Signed-off-by: Robin Getz <rgetz503@gmail.com>
2026-07-22 20:37:16 -04:00
Robin Getz b44ff3ee00 RadioAstronomy: Guard aganst null FFT measurement
RadioAstronomyGUI::spectrumSeries_clicked() called
calcVrAndDistanceToPeak() without verifying that currentFFT() returned a
valid FFTMeasurement. Since currentFFT() can return nullptr and
calcVrAndDistanceToPeak() immediately dereferences the pointer, this could
result in a null pointer dereference.

Guard the calls so they are only made when a valid FFT measurement is
available, matching the existing pattern used elsewhere in the class.

Reported by Coverity (CID 649213).

Signed-off-by: Robin Getz <rgetz503@gmail.com>
2026-07-22 19:52:58 -04:00
Edouard Griffiths a6ad52716e Merge pull request #2818 from rgetz/rgetz-fix-uninitialized-1
Fix Coverity UNINIT warnings in RadioAstronomy and VOR Localizer
2026-07-22 02:12:35 +02:00
Robin Getz 382d541eae RadioAstronomy: Validate sweep configuration before starting
Fix Coverity CID 649243 (DIVIDE_BY_ZERO) by validating sweep step
values before calculating 2D sweep dimensions.

Move sweep step validation to on_startStop_clicked() so invalid sweep
configurations are reported to the user before a sweep begins. Display
an error message when either sweep step is zero and prevent the sweep
from starting.

Retain defensive validation when updating 2D sweep settings to guard
against invalid configurations received from saved settings or other
code paths.

Signed-off-by: Robin Getz <rgetz503@gmail.com>
2026-07-20 18:35:16 -04:00
Robin Getz 1270f27ebf RadioAstronomy: Initialize intensity for unexpected power units
Fix a Coverity UNINIT warning in RadioAstronomyGUI::update2DImage()
where the intensity variable could be used uninitialized if
m_powerYUnits contained an unexpected value and followed the default path.

Handle the default switch case by logging a warning and falling back
to fft->m_totalPowerdBFS, ensuring intensity is always initialized
before being used while providing diagnostics for invalid enum values.

Fixes Coverity CID 649242.

Signed-off-by: Robin Getz <rgetz503@gmail.com>
2026-07-20 17:24:18 -04:00
Robin Getz b7cd725c86 RadioAstronomy: Validate Y-factor calibration inputs
Fix Coverity CID 649221 (DIVIDE_BY_ZERO) by validating the cold
calibration power sum before calculating the Y-factor.

Refactor calcCalTrx() to use early returns for invalid calibration
states and avoid duplicated UI clearing logic. Also handle the
undefined Y-factor case when hot and cold measurements have equal power.

Signed-off-by: Robin Getz <rgetz503@gmail.com>
2026-07-19 19:42:07 -04:00
Jon Beniston 45abc85c8b Radio Astronomy: Include milliseconds in spectrometer timestamp. 2026-04-08 13:07:32 +01:00
f4exb 2a46208d37 Apply atomic settings to channel Rx plugins part 2. Part of #1329 2026-02-01 12:26:46 +01:00
Jon Beniston 6493921da6 Fix warnings. 2026-01-06 14:02:19 +00:00
Jon Beniston df95acae65 Set csv as default filename extension for save file dialogs. #2506 2025-09-07 10:57:29 +01:00
Jon Beniston 4afde2a399 Radio Astronomy: Add option to auto save data to .csv. For #2435 2025-06-24 12:32:42 +01:00
DreamNik f694ba04b8 Fix compilation warnings and errors 2024-09-05 13:37:46 +03:00
f4exb 5d0fa7fa67 Removed destroy method leftovers and Sonar lint 2024-08-27 09:54:09 +02:00
Daniele Forsi 4241f01376 Fix typos in cpp files 2024-07-10 23:06:38 +02:00
srcejon 41716632d4 Remove use of deprecated QRegExp. 2024-06-10 14:01:57 +01:00
Daniele Forsi 31ad607721 Fix memleaks
Frees memory allocated
in RadioAstronomyGUI::RadioAstronomyGUI(PluginAPI*, DeviceUISet*, BasebandSampleSink*, QWidget*) .../plugins/channelrx/radioastronomy/radioastronomygui.cpp:2126
in RadioAstronomyGUI::RadioAstronomyGUI(PluginAPI*, DeviceUISet*, BasebandSampleSink*, QWidget*) .../plugins/channelrx/radioastronomy/radioastronomygui.cpp:2128
in RadioAstronomyGUI::RadioAstronomyGUI(PluginAPI*, DeviceUISet*, BasebandSampleSink*, QWidget*) .../plugins/channelrx/radioastronomy/radioastronomygui.cpp:2129
in RadioAstronomyGUI::RadioAstronomyGUI(PluginAPI*, DeviceUISet*, BasebandSampleSink*, QWidget*) .../plugins/channelrx/radioastronomy/radioastronomygui.cpp:2130
in RadioAstronomyGUI::RadioAstronomyGUI(PluginAPI*, DeviceUISet*, BasebandSampleSink*, QWidget*) .../plugins/channelrx/radioastronomy/radioastronomygui.cpp:2131
in RadioAstronomyGUI::RadioAstronomyGUI(PluginAPI*, DeviceUISet*, BasebandSampleSink*, QWidget*) .../plugins/channelrx/radioastronomy/radioastronomygui.cpp:2132
in RadioAstronomyGUI::RadioAstronomyGUI(PluginAPI*, DeviceUISet*, BasebandSampleSink*, QWidget*) .../plugins/channelrx/radioastronomy/radioastronomygui.cpp:2133
in RadioAstronomyGUI::RadioAstronomyGUI(PluginAPI*, DeviceUISet*, BasebandSampleSink*, QWidget*) .../plugins/channelrx/radioastronomy/radioastronomygui.cpp:2134
in RadioAstronomyGUI::RadioAstronomyGUI(PluginAPI*, DeviceUISet*, BasebandSampleSink*, QWidget*) .../plugins/channelrx/radioastronomy/radioastronomygui.cpp:2135
in RadioAstronomyGUI::RadioAstronomyGUI(PluginAPI*, DeviceUISet*, BasebandSampleSink*, QWidget*) .../plugins/channelrx/radioastronomy/radioastronomygui.cpp:2136
in RadioAstronomyGUI::RadioAstronomyGUI(PluginAPI*, DeviceUISet*, BasebandSampleSink*, QWidget*) .../plugins/channelrx/radioastronomy/radioastronomygui.cpp:2137
in RadioAstronomyGUI::RadioAstronomyGUI(PluginAPI*, DeviceUISet*, BasebandSampleSink*, QWidget*) .../plugins/channelrx/radioastronomy/radioastronomygui.cpp:2138
in RadioAstronomyGUI::RadioAstronomyGUI(PluginAPI*, DeviceUISet*, BasebandSampleSink*, QWidget*) .../plugins/channelrx/radioastronomy/radioastronomygui.cpp:2139
in RadioAstronomyGUI::RadioAstronomyGUI(PluginAPI*, DeviceUISet*, BasebandSampleSink*, QWidget*) .../plugins/channelrx/radioastronomy/radioastronomygui.cpp:2140
in RadioAstronomyGUI::RadioAstronomyGUI(PluginAPI*, DeviceUISet*, BasebandSampleSink*, QWidget*) .../plugins/channelrx/radioastronomy/radioastronomygui.cpp:2141
in RadioAstronomyGUI::RadioAstronomyGUI(PluginAPI*, DeviceUISet*, BasebandSampleSink*, QWidget*) .../plugins/channelrx/radioastronomy/radioastronomygui.cpp:2142
in RadioAstronomyGUI::RadioAstronomyGUI(PluginAPI*, DeviceUISet*, BasebandSampleSink*, QWidget*) .../plugins/channelrx/radioastronomy/radioastronomygui.cpp:2143
in RadioAstronomyGUI::RadioAstronomyGUI(PluginAPI*, DeviceUISet*, BasebandSampleSink*, QWidget*) .../plugins/channelrx/radioastronomy/radioastronomygui.cpp:2144
in RadioAstronomyGUI::RadioAstronomyGUI(PluginAPI*, DeviceUISet*, BasebandSampleSink*, QWidget*) .../plugins/channelrx/radioastronomy/radioastronomygui.cpp:2145
in RadioAstronomyGUI::RadioAstronomyGUI(PluginAPI*, DeviceUISet*, BasebandSampleSink*, QWidget*) .../plugins/channelrx/radioastronomy/radioastronomygui.cpp:2146
in RadioAstronomyGUI::RadioAstronomyGUI(PluginAPI*, DeviceUISet*, BasebandSampleSink*, QWidget*) .../plugins/channelrx/radioastronomy/radioastronomygui.cpp:2147
in RadioAstronomyGUI::RadioAstronomyGUI(PluginAPI*, DeviceUISet*, BasebandSampleSink*, QWidget*) .../plugins/channelrx/radioastronomy/radioastronomygui.cpp:2148
in RadioAstronomyGUI::RadioAstronomyGUI(PluginAPI*, DeviceUISet*, BasebandSampleSink*, QWidget*) .../plugins/channelrx/radioastronomy/radioastronomygui.cpp:2149
in RadioAstronomyGUI::RadioAstronomyGUI(PluginAPI*, DeviceUISet*, BasebandSampleSink*, QWidget*) .../plugins/channelrx/radioastronomy/radioastronomygui.cpp:2150
in RadioAstronomyGUI::RadioAstronomyGUI(PluginAPI*, DeviceUISet*, BasebandSampleSink*, QWidget*) .../plugins/channelrx/radioastronomy/radioastronomygui.cpp:2153
in RadioAstronomyGUI::RadioAstronomyGUI(PluginAPI*, DeviceUISet*, BasebandSampleSink*, QWidget*) .../plugins/channelrx/radioastronomy/radioastronomygui.cpp:2154
in RadioAstronomyGUI::RadioAstronomyGUI(PluginAPI*, DeviceUISet*, BasebandSampleSink*, QWidget*) .../plugins/channelrx/radioastronomy/radioastronomygui.cpp:2155
in RadioAstronomyGUI::RadioAstronomyGUI(PluginAPI*, DeviceUISet*, BasebandSampleSink*, QWidget*) .../plugins/channelrx/radioastronomy/radioastronomygui.cpp:2156
in RadioAstronomyGUI::RadioAstronomyGUI(PluginAPI*, DeviceUISet*, BasebandSampleSink*, QWidget*) .../plugins/channelrx/radioastronomy/radioastronomygui.cpp:2157
in RadioAstronomyGUI::RadioAstronomyGUI(PluginAPI*, DeviceUISet*, BasebandSampleSink*, QWidget*) .../plugins/channelrx/radioastronomy/radioastronomygui.cpp:2158
in RadioAstronomyGUI::RadioAstronomyGUI(PluginAPI*, DeviceUISet*, BasebandSampleSink*, QWidget*) .../plugins/channelrx/radioastronomy/radioastronomygui.cpp:2159
in RadioAstronomyGUI::RadioAstronomyGUI(PluginAPI*, DeviceUISet*, BasebandSampleSink*, QWidget*) .../plugins/channelrx/radioastronomy/radioastronomygui.cpp:2160
in RadioAstronomyGUI::RadioAstronomyGUI(PluginAPI*, DeviceUISet*, BasebandSampleSink*, QWidget*) .../plugins/channelrx/radioastronomy/radioastronomygui.cpp:2161
in RadioAstronomyGUI::RadioAstronomyGUI(PluginAPI*, DeviceUISet*, BasebandSampleSink*, QWidget*) .../plugins/channelrx/radioastronomy/radioastronomygui.cpp:2190
in RadioAstronomyGUI::RadioAstronomyGUI(PluginAPI*, DeviceUISet*, BasebandSampleSink*, QWidget*) .../plugins/channelrx/radioastronomy/radioastronomygui.cpp:2191
in RadioAstronomyGUI::RadioAstronomyGUI(PluginAPI*, DeviceUISet*, BasebandSampleSink*, QWidget*) .../plugins/channelrx/radioastronomy/radioastronomygui.cpp:2192
in RadioAstronomyGUI::RadioAstronomyGUI(PluginAPI*, DeviceUISet*, BasebandSampleSink*, QWidget*) .../plugins/channelrx/radioastronomy/radioastronomygui.cpp:2193
and a comment :)
2024-06-09 20:22:33 +02:00
Daniele Forsi 2fff671a33 Add a parent pointer to TimeDeltaDelegate, HMSDelegate and DMSDelegate 2024-06-09 20:22:33 +02:00
Daniele Forsi cf0e129165 Fix memleaks of QNetworkAccessManager()
Frees memory allocated
in AudioOutputPlugin::createSampleSinkPluginInstance(QString const&, DeviceAPI*) /home//sdrangel/plugins/samplesink/audiooutput/audiooutputplugin.cpp:136
in ChirpChatDemod::ChirpChatDemod(DeviceAPI*) /home/sdrangel/plugins/channelrx/demodchirpchat/chirpchatdemod.cpp:84
in FileOutput::FileOutput(DeviceAPI*) /home/sdrangel/plugins/samplesink/fileoutput/fileoutput.cpp:54
in RadioAstronomyGUI::RadioAstronomyGUI(PluginAPI*, DeviceUISet*, BasebandSampleSink*, QWidget*) /home/sdrangel/plugins/channelrx/radioastronomy/radioastronomygui.cpp:2061
in SatelliteSelectionDialog::SatelliteSelectionDialog(SatelliteTrackerSettings*, QHash<QString, SatNogsSatellite*> const&, QWidget*) /home/sdrangel/plugins/feature/satellitetracker/satelliteselectiondialog.cpp:42:24
in SatelliteTracker::SatelliteTracker(WebAPIAdapterInterface*) /home/sdrangel/plugins/feature/satellitetracker/satellitetracker.cpp:61:24
2024-05-28 19:24:02 +02:00
Daniele Forsi 8c3f7e3775 Remove unused includes and use more direct includes 2024-04-11 23:31:34 +02:00
srcejon 483e338614 Add AvailableChannelOrFeatureHandler for handling lists of channels, features and message pipes to them. 2024-02-16 16:31:12 +00:00
srcejon d989561df5 Use common code for creating and processing device and channel Ids. 2023-12-05 12:32:53 +00:00
Jon Beniston e799e5eb72 Fix resize cursor not being cleared when mouse moves over child widgets 2023-11-13 20:51:03 +00:00
Jon Beniston 0e1f2f43ce Add rotator az/el and offset to table. 2023-08-26 14:40:13 +01:00
Daniele Forsi 34aca019e2 Fix spelling in strings 2023-07-23 18:55:12 +02:00
Jon Beniston aba0e30a4f Set az/el l/b column precision based on rotator precision 2023-05-23 22:29:06 +01:00
Jon Beniston b881368142 Fix QFileDialog filters to work with non-native dialog. Fixes #1681. 2023-05-03 18:16:37 +01:00
Jon Beniston 364ce71c24 Fix missing GUI connections in Radio Astronomy plugin. Scan for features on startup. 2023-03-30 16:50:01 +01:00
Jon Beniston 746d4011d2 Add UTC data time in radiometer. Fix centre frequency display. Support smaller bandwidths for SID measurement. 2023-03-29 19:20:05 +01:00
Jon Beniston 0dd466a900 Add DialogPositioner to ensure dialogs are fully on screen and remain on
screen when screen orientation changes.
Add DialPopup to allow dials to adjusted with a slider, which is easier
on touchscreens.
Add TableTapAndHold to support table context menus on touchscreens.
2022-12-20 10:31:15 +00:00
Jon Beniston 3b5b222114 Update plugins to compile with Qt5 and Qt6 2022-11-17 14:36:12 +00:00
Jon Beniston c966f1cb5a dd maximize button to MainSpectrum and expandible Channels and Features.
Add sizeToContents in ChannelGUI and FeatureGUI, called when widget is
rolled, so we can remove resizing code from all of the individual
channels and features.

In RollupContents, use minimumSizeHint for calculated size, so that
minimumWidth can come from .ui file.

In DeviceGUI::sizeToContents(), call adjustSize(), so Device GUIs start
out at minimum needed size (which should restore appearance prior to
last patch).

In stackSubWindows, use available space for channels if no
spectrum/features present.
In stackSubWindows, fix spectrum from being sized too big, resulting in
scroll bars appearing.
Reset user-defined channel width in stackSubWindows, when channels are
removed.
Don't stack maximized windows.

There's one hack in Channel/FeatureGUI::maximizeWindow(). It seems that
when maximimzing a window, QOpenGLWidgets aren't always paint properly
immediately afterwards, so the code forces an additional update. I can't
see why the first call to paintGL doesn't work.
2022-11-11 12:24:27 +00:00
Jon Beniston ed279812f6 Set window width to account for miniumum width required for visible rollups. 2022-11-08 09:43:58 +00:00
Jon Beniston 3f177c1007 Disable table sorting when adding a new row. Fixes #1472 2022-10-10 11:26:41 +01:00
Jon Beniston bf24ce2e3b Radio Astronomy: Add filtered power series 2022-09-26 12:46:52 +01:00
f4exb c6baed9f73 Massive UI revamping (v7): Restored channel highlighted by cursor function. Part of #1213 2022-04-26 00:42:26 +02:00
f4exb 360b8a9753 Massive UI revamping (v7): Fixed sizing of channel windows. Part of #1209 2022-04-24 12:28:56 +02:00
Jon Beniston 99fce0dce0 Add FramelessWindowResizer class for resizig frameless windows.
Remove top-right resize grip from windows.
In channels and features, make sure enterEvent and leaveEvent are passed
to parent class.
2022-04-22 18:21:24 +01:00
f4exb 018b97e17d Massive UI revamping (v7): updated basic channel settings and indicate stream index for MIMO device and single stream channel 2022-04-18 01:42:03 +02:00
f4exb 4e2a4b7f6c Massive UI revamping (v7): more cleanup 2022-04-15 19:53:50 +02:00
f4exb af13b31d85 Massive UI revamping (v7): display channel absolute frequency in status bar. Manage shift frequency limits 2022-04-13 11:08:21 +02:00
f4exb 2f89b79c84 Massive UI revamping (v7): added channels 2022-04-12 16:20:45 +02:00
f4exb 842546aec6 Rotator controller and dependent plugins: implemented new message pipes and other fixes. Part of #1154 2022-03-28 20:12:25 +02:00
f4exb 1819ca6e94 Radioastronomy and StarTracker: implement new message pipes. Part of #1154 2022-03-27 08:01:02 +02:00
f4exb 4111c967e9 Fixed some signal/slot connects. Removed unnecessary m_channelMessageQueue in ChannelAPI. Fixes #1185 2022-03-23 22:32:23 +01:00
f4exb 9c063410fb Message pipes rework: more renaming 2022-03-02 23:57:35 +01:00
f4exb 74f917682b Message pipes rework: renaming to legacy 2022-02-28 23:08:01 +01:00
f4exb 98b305f320 Make rollup state a serializable object so that it can be dumped in JSON format for the API. Prerequisite tp #1050 2022-01-09 05:27:12 +01:00
f4exb 8a438a94c1 API: implemented Channel Marker in Rx channels and complete serializable objects for some 2021-12-03 23:11:56 +01:00
Jon Beniston 5fc585513b Remove code that requires Qt 5.14. 2021-10-12 15:22:20 +01:00
Jon Beniston c35cc2181b Fix radiometer autoscaling 2021-10-12 13:38:37 +01:00