1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-07-26 20:14:19 -04:00
Commit Graph

11173 Commits

Author SHA1 Message Date
Edouard Griffiths def2eb68a5 Merge pull request #2820 from rgetz/rgetz-remove-check-meshcoredemodgui
Remove redundant ui null check in MeshcoreDemodGUI
2026-07-22 04:30:14 +02: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
Edouard Griffiths 01a23e6f22 Merge pull request #2817 from srcejon/fix_2815
AM Demod: Snap to nearest centre frequency.
2026-07-21 20:46:37 +02:00
Edouard Griffiths 41d5d57ad1 Merge pull request #2816 from rgetz/rgetz-fix-coverity-int-handling-issues
Fix coverity int handling issues
2026-07-21 08:55:59 +02:00
Robin Getz 409e1f1a00 Remove redundant ui null check in MeshcoreDemodGUI & MeshtasticDemodGUI
The ui object is created during MeshcoreDemodGUI and MeshtasticDemodGUI
construction and remains valid for the lifetime of the widget. Remove
the unnecessary null check to avoid misleading static analysis tools
into assuming ui can be null.

This resolves a Coverity false positive where the later call to
updateDechirpModeUI() was reported as a possible null dereference
in both places.

Signed-off-by: Robin Getz <rgetz503@gmail.com>
2026-07-20 23:33:44 -04:00
f4exb 4bf6c79bce Changed commit tag of AirspyHF before the bogous one 2026-07-21 03:34:22 +02:00
Edouard Griffiths fcb7dbf8ba Merge pull request #2814 from rgetz/rgetz-pluto-gain-updates
plutosdr: Update RX gain limits dynamically from hardware
2026-07-21 03:13:47 +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 0659f264aa VOR Localizer: initialize intersection variables
Initialize the coordinate and bearing variables used by
VORModel::findIntersection() and declare the validity flags as bool.

Coverity reported that lat1, lon1, bearing1, lat2, lon2, and bearing2
could be passed uninitialized to calcIntersectionPoint(). While the
current control flow is intended to assign these values before the
corresponding validity flag is set, they were not initialized at
declaration, leaving undefined behavior if that invariant were ever
broken.

Initializing the variables removes the possibility of using
indeterminate values, satisfies static analysis, and makes the code
more robust against future modifications. The validity flags are also
changed from float to bool to match their intended use.

Signed-off-by: Robin Getz <rgetz503@gmail.com>
2026-07-20 17:25:57 -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
Edouard Griffiths 6e2938a372 Merge pull request #2813 from srcejon/fix_2608
WDSP: Fix distorted AM audio when AGC is disabled.
2026-07-20 20:25:12 +02:00
f4exb f6d5096833 Upgrade external dependencies to latest AirspyHF commit 2026-07-20 19:46:04 +02:00
Jon Beniston 7bc89a205c AM Demod: Snap to nearest centre frequency. #2815 2026-07-20 17:41:07 +01:00
Edouard Griffiths f3c1d648ee Merge pull request #2812 from rgetz/rgetz-fix-2779
PlutoSDR: Guard against null buddy shared pointers | Fix #2779
2026-07-20 05:21:49 +02: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
Robin Getz ea0f5fa790 NoiseFigure: Prevent divide by zero when plotting reference data
Fix Coverity CID 649238 (DIVIDE_BY_ZERO) by validating the reference
column count before using it as a divisor in plotChart().

The reference column count can be cleared when removing reference data,
in on_clearReference_clicked() so ensure chart rendering handles an empty
reference configuration safely.

Signed-off-by: Robin Getz <rgetz503@gmail.com>
2026-07-19 19:26:39 -04:00
Robin Getz 98f43dfd8c FT8: Fix potential integer overflow in band preset frequency calculation
Fix Coverity CID 649215 (OVERFLOW_BEFORE_WIDEN) by ensuring the band
preset frequency calculation is widened to 64-bit before converting
kHz to Hz.

This prevents a potential 32-bit intermediate overflow when applying
band presets (which is likely not a real issue, but it keeps the
analyzer happy).

Signed-off-by: Robin Getz <rgetz503@gmail.com>
2026-07-19 19:21:25 -04:00
Robin Getz 8c3c93a09f ADSB: Fix BDS 4,1 waypoint character bit extraction
Fix Coverity CID 649088 (CONSTANT_EXPRESSION_RESULT) in the BDS 4,1
next waypoint decoding logic.

The high bit contribution to waypoint character c[5] was incorrectly
shifted right by 3, causing the expression to always evaluate to zero
and discard a valid bit from the decoded character. Change the shift
direction to correctly place the extracted bit into the character field.

This restores proper decoding of the BDS 4,1 waypoint string and removes
the Coverity warning.

Signed-off-by: Robin Getz <rgetz503@gmail.com>
2026-07-19 19:06:16 -04:00
Edouard Griffiths 8d5bdaee80 Merge pull request #2811 from srcejon/fix_2801
Fix kiwiSDRs on Map
2026-07-19 23:52:22 +02:00
Robin Getz 72d612d986 plutosdr: Update RX gain limits dynamically from hardware
Query the PlutoSDR hardware for the current RX gain range and use it
to configure the GUI gain control dynamically.

The AD936x gain limits vary with LO frequency. Previously the GUI used
a fixed gain range, allowing users to select values that the hardware
would reject after changing bands. The gain slider now refreshes its
minimum, maximum, and step size whenever the device center frequency is
updated.

Also change the gain setting serialization to use a signed integer so
negative gain values are preserved for operating modes that support
them.

Changes include:
- Add DevicePlutoSDRBox::getGainRange() to read
  in_voltage0_hardwaregain_available.
- Expose gain range through PlutoSDRInput.
- Refresh GUI gain limits when the device frequency changes.
- Avoid unnecessary widget updates when limits are unchanged.
- Store/restore gain as a signed value.
- Add default RX gain limit constants for fallback when the device
  cannot provide its range.

Signed-off-by: Robin Getz <rgetz503@gmail.com>
2026-07-19 17:48:53 -04:00
Edouard Griffiths 6d81b0ac3d Merge pull request #2810 from srcejon/fix_2806
AaroniaRTSAInput::webapiReportGet: getAaroniaRtsaReport rather than getAirspyHfReport.
2026-07-19 23:02:55 +02:00
Edouard Griffiths 04eedc5083 Merge pull request #2809 from srcejon/fix_2808
Update bladerf to 2025.10
2026-07-19 22:25:51 +02:00
Jon Beniston d716568973 WDSP: Fix distorted AM audio when AGC is disabled. Add audio clamping on 16-bit conversion. 2026-07-19 20:47:40 +01:00
Robin Getz af4c366cb7 PlutoSDR: Guard against null buddy shared pointers | Fix #2779
Add defensive null checks before dereferencing DeviceAPI::getBuddySharedPtr()
in the PlutoSDR input and output plugins.

DeviceAPI initializes the buddy shared pointer to nullptr, so a buddy may
exist before its shared state has been attached. This could result in null
pointer dereferences during device initialization, buddy thread
suspend/resume, or settings application.

Changes include:
- Validate buddy shared pointer in openDevice() and fail gracefully if absent.
- Guard suspendBuddies() and resumeBuddies() against null shared pointers.
- Skip buddies without shared state during applySettings() while logging a
  warning.
- Prevent dereferencing null buddy shared pointers when restarting buddy
  threads.

These changes improve robustness during PlutoSDR buddy initialization and
avoid crashes caused by partially initialized buddy relationships.

Signed-off-by: Robin Getz <rgetz503@gmail.com>
2026-07-19 12:59:17 -04:00
Jon Beniston 7d84040e77 Update kiwisdr list URL 2026-07-19 17:16:04 +01:00
Jon Beniston ad5ca070e8 Fix constant to be 32MHz instead of 320MHz. Fixes #2801 2026-07-19 17:09:30 +01:00
Jon Beniston 97cabdeb71 getAaroniaRtsaReport rather than airspy. 2026-07-19 16:35:58 +01:00
Jon Beniston ca8ad7e45b Update bladerf to 2025.10 for #2808 2026-07-19 16:23:31 +01:00
Edouard Griffiths 50fee6f643 Merge pull request #2800 from rgetz/rgetz-fix-coverity-adsbmodgui
fix some minor issues coverity pointed out in adsbmodgui
2026-07-13 12:44:16 +02:00
Robin Getz b834b80f05 adsb: fix BDS 2,1 registration character decoding
Fix an incorrect bit shift when decoding aircraft registration
markings from BDS 2,1 Comm-B messages.

Coverity (CID 649088) reported that the expression
'(data[7] & 0x1) >> 3' always evaluates to zero, causing one bit of
the 6-bit character value to be discarded.

The BDS 2,1 aircraft registration marking format encodes seven
6-bit characters. Based on the bit layout defined in ICAO Doc 9871
(Technical Provisions for Mode S Specific Services) and verified
against independent implementations such as pyModeS/rs1090, the
remaining bit from data[7] is the most significant bit of the
character and must be shifted left, not right.

Update the extraction to preserve this bit when combining it with
the remaining bits from data[8].

Signed-off-by: Robin Getz <rgetz503@gmail.com>
2026-07-12 19:35:04 -04:00
Robin Getz 810b0524fb adsb: fix Coverity UNINIT_CTOR warning in AircraftModel
Initialize the AircraftModel settings pointer to nullptr.

Coverity (CID 649096) flagged m_settings as potentially
uninitialized because the compiler-generated constructor does not
initialize it. Initialize it to nullptr, which is the appropriate
default until setSettings() provides a valid pointer.

This is likely not an issue, as m_settings is typically assigned
shortly after construction. However, correctness depends on that
assumption holding everywhere. Initializing it in the declaration
costs nothing, removes the dependency on initialization order, and
eliminates this class of bugs.

Signed-off-by: Robin Getz <rgetz503@gmail.com>
2026-07-12 19:16:08 -04:00
Robin Getz b3afa02023 adsb: fix Coverity UNINIT_CTOR warning in Aircraft
Initialize the remaining Aircraft members that were previously left
uninitialized by the constructor.

Coverity (CID 649090) flagged m_pressureAltitude, m_squawk,
m_range, m_lastColor, m_prevTrack, and
m_trackWhenHeadingSet as potentially uninitialized. Initialize
them to sensible default values consistent with their intended use.

This is likely not an issue, as these members are generally
initialized before use. However, correctness depends on that
assumption holding everywhere. Initializing them in the constructor
costs nothing, removes the dependency on call ordering, and
eliminates this class of bugs.

Signed-off-by: Robin Getz <rgetz503@gmail.com>
2026-07-12 19:07:43 -04:00
Robin Getz 12aa80686d adsb: fix Coverity UNINIT_CTOR warning in Interogator
Initialize all coordinate boundary members in the Interogator
constructor.

Coverity (CID 649097) flagged m_minLatitude, m_maxLatitude,
m_minLongitude, and m_maxLongitude as potentially uninitialized.
Initialize them to max()/lowest() sentinel values so subsequent
min/max accumulation logic operates on defined data.

This is likely not an issue, but safety depends on discipline
across the entire codebase, every place these members are
accessed must check m_valid first. Cleaner approach is to just
initialize them, it costs nothing and eliminates the entire class of bugs.

Signed-off-by: Robin Getz <rgetz503@gmail.com>
2026-07-12 18:37:13 -04:00
Edouard Griffiths 92421b02ff Merge pull request #2799 from rgetz/rgetz-cmake-updates
cmake: enforce minimum versions for CM256cc and Codec2 dependencies
2026-07-11 19:34:29 +02:00
Edouard Griffiths 9a3bd35608 Merge pull request #2797 from munzzyy/fix_2764
LocalSink: fix crash when adding channel with no Local Input device (#2764)
2026-07-11 15:49:47 +02:00
Edouard Griffiths 315f642861 Merge pull request #2796 from srcejon/android_fixes
Android Qt6 support
2026-07-11 15:05:06 +02:00
Edouard Griffiths 7d622d180b Merge pull request #2795 from munzzyy/fix-faad2-heap-overflow-2766
bump bundled faad2 to 2.10.1, fixes heap overflow (#2766)
2026-07-11 03:40:50 +02:00
Robin Getz 6b353ffd1c cmake: verify minimum codec2 version during discovery
Use pkg-config to verify that codec2 >= 1.1.1 is available before
searching for the headers and library.

If CODEC2_DIR is specified, treat it as an explicit user override and
search that installation directly. Otherwise, use pkg-config to validate
the minimum supported version. If pkg-config is unavailable or an older
codec2 version is installed, disable codec2 support while allowing the
rest of the project to configure normally.

Also update the pkg-config search hints to use the documented
PC_CODEC2_INCLUDE_DIRS and PC_CODEC2_LIBRARY_DIRS variables.

Signed-off-by: Robin Getz <rgetz503@gmail.com>
2026-07-10 20:32:52 -04:00
Robin Getz 0f905d015a cmake: verify minimum libcm256cc version via pkg-config
libcm256cc does not expose its package version through its headers or
shared library, making it impossible to verify a minimum supported
version after discovery leading to errors when building.

When CM256CC_DIR is not specified, use pkg-config to verify that
libcm256cc >= 1.1.2 is available before searching for the headers and
library. If the required version is not found, disable CM256 support
and continue configuring the rest of the project.

When CM256CC_DIR is provided, treat it as an explicit user override and
search that installation directly and blindly (don't check version).

Also update the pkg-config hint variables to use the documented
*_INCLUDE_DIRS and *_LIBRARY_DIRS outputs from pkg_check_modules().
https://cmake.org/cmake/help/latest/module/FindPkgConfig.html

Signed-off-by: Robin Getz <rgetz503@gmail.com>
2026-07-10 20:02:08 -04:00
Edouard Griffiths bb52c52c9e Merge pull request #2794 from srcejon/fix_api_address
Fix WebAPI link in About dialog (Display 127.0.0.1 rather than 0.0.0.0)
2026-07-10 22:15:48 +02:00
munzzyy 9115e23184 LocalSink: fix crash when adding channel with no Local Input device. Fixes #2764 2026-07-10 14:15:24 -05:00
Edouard Griffiths d51e05acbd Merge pull request #2792 from dawkagaming/master
Add detection for 3 more architectures
2026-07-10 16:34:23 +02:00
Edouard Griffiths a86ae78f3a Merge pull request #2791 from srcejon/fix_2788
Attempt to fix corrupt spectrum on Mac when MSAA enabled.
2026-07-10 10:47:13 +02:00
Cole Munz 63f61b9086 faad2: build from git with cmake instead of bootstrapping the tarball
Review feedback on the 2.10.1 bump: the autotools bootstrap step won't
work on Windows. faad2 gained CMake support in 2.11.0, so fetch the
repo at 2.11.2 and build it the same way as opus and hidapi.
FAAD_BUILD_CLI=OFF skips the frontend executable; only libfaad is
needed.
2026-07-09 21:11:09 -05:00
Jon Beniston b3fe4235a3 Fix pinch on Android 2026-07-09 23:33:21 +01:00
Edouard Griffiths 85a67e513d Merge pull request #2790 from srcejon/mac_ci
libsigmf: Fix path to library for Mac build
2026-07-10 00:23:46 +02:00
Jon Beniston 83c929a63a Add Android activity and resources. 2026-07-09 23:23:32 +01:00
Jon Beniston 4a21b0cf9b Request location, microphone and camera permissions. 2026-07-09 23:19:21 +01:00
Jon Beniston 4f06215965 Get Qt6 build working on Android. 2026-07-09 23:16:19 +01:00
Cole Munz 499b75f0d2 bump bundled faad2 to 2.10.1, fixes heap overflow (#2766) 2026-07-09 16:37:40 -05:00