Commit Graph
35 Commits
Author SHA1 Message Date
Jon BenistonandClaude Opus 5 da31464dd2 Apply only the settings keys given, rather than copying the whole settings
These keyed applySettings copied the whole settings struct on every message. A GUI sends
messages with no keys while its window is being laid out, carrying its own copy of the
settings, and one arriving after an API patch but before the GUI has seen it wrote the old
values back, so the patched value was lost and the API read back what it had replaced. The AIS
demodulator lost the inputFrequencyOffset set at creation this way.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-13 15:24:42 +01:00
Jon BenistonandClaude Opus 5 7261593d03 Web API: settings that were declared but never read or written
A number of settings keys existed in the spec and in the SWG classes but
were missing from the plugin's webapi handlers, so setting them over the
API silently did nothing: dnrScheme on the SSB demodulator, aprsData on
the M17 modulator, pulseShaping on the packet, PSK31 and RTTY modulators,
audioDeviceName on Simple PTT, period, autosave, autoload, autosavePeriod
and filename on SID, and several on Star Tracker, XTRX and the Android SDR
driver input.

Three more were spelled so that they could never match. The channel
analyzer tested for "rationalDownSample " with a trailing space, radio
astronomy tested for "sweep12Start" and "sweep12Stop" rather than
"sweep2Start" and "sweep2Stop", and AFC read "hasTargetFrequency" into
m_transverterTarget rather than "transverterTarget". The channel analyzer
also now accepts the shorter "frequency", "downSample" and
"downSamplerRate" spellings alongside the existing ones.

MapSettings::applySettings ignored rgbColor and mapType, so a patch
carrying them was accepted and then dropped.

Registers MCPServer.yaml in the web API resources so it is served with the
rest of the documentation, and drops a redundant nested guard in the Sky
Map report left by the QString leak fix.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-11 19:28:50 +01:00
Jon BenistonandClaude Opus 5 71d8650c6d Drive feature state from a signal rather than polling it
Every feature GUI ran its own one second QTimer, read getState(), compared
it against a remembered m_lastFeatureState and restyled its start/stop
button when the two differed. The same twenty five lines appeared in each
of them.

Feature now keeps m_state private behind setState(), which emits
stateChanged() when it actually changes, and FeatureGUI grows a shared
updateStartStopButton() that restyles the button and reports an error
state. A GUI connects to the signal and calls that, so the state is
reflected as soon as it changes rather than up to a second later, and the
per feature timers and m_lastFeatureState members are gone.

FeatureUISet disconnects the feature from its GUI before the feature is
deleted: QObject emits destroyed() before dropping its connections, so a
stateChanged() emitted from the feature's destructor could otherwise reach
a GUI that has already deleted its ui object.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-11 17:49:02 +01:00
Jon BenistonandClaude Opus 5 60db861797 Fix QString leak in the web API settings and report formatters
The generated SWG setters overwrite the string pointer without deleting
what is already there, and every webapiSettingsGet and webapiReportGet
calls init() first, which has allocated one. Each call therefore leaked a
QString per string field. Measured at 117 bytes per settings GET for the
Satellite Tracker, over 20,000 requests.

Assign in place when the pointer is already set, which is what these same
functions have always done for title and reverseAPIAddress. 394 sites
across webapiFormatChannelSettings, webapiFormatDeviceSettings,
webapiFormatFeatureSettings and the three report equivalents.

The webapiReverseSend* functions are deliberately left alone: they build a
fresh SWG object whose constructor leaves the pointers null, so passing a
new QString is correct there.

After the change the same measurement is flat, at 7 bytes per GET.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-11 16:54:42 +01:00
Jon Beniston 338a28b1a5 StarTracker: Add support for Jupiter decameter radiation (DAM) observations. Add targets from Horizons and SPICE. 2026-04-03 20:33:00 +01:00
f4exb fcbaf95403 Fixed settings keys 2026-02-12 23:23:27 +01:00
DreamNik f694ba04b8 Fix compilation warnings and errors 2024-09-05 13:37:46 +03:00
Daniele Forsi 4241f01376 Fix typos in cpp files 2024-07-10 23:06:38 +02:00
Daniele Forsi 3c0541d87a Do not create objects if there is no message queue to send to
Prevents memory leaks.
2024-05-19 19:44:45 +02:00
Daniele Forsi 461a79439b Do not create a Message if there is no worker to send to
Prevents memory leaks.
2024-05-19 19:44:45 +02:00
Mykola Dvornik 15337cac66 Fix bug that prevents settings changes updates via reverse API
Most plugins that use reverse API to PATCH settings updates to remote
server only do so when `useReverseAPI` is toggled, but not when the
relevant settings are being updated. So lets fix the precondition to
use the `m_useReverseAPI` flag instead.
2024-04-14 18:58:12 +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 2708a81623 Add Sky Map feature plugin. 2024-02-14 13:20:33 +00:00
f4exb 00b041d762 Rewriting of copyright notices for plugins/features. Part of #1893 2023-11-18 13:12:18 +01:00
Jon Beniston 5ff0a5d0ac Fix gcc warnings 2023-05-23 22:59:35 +01:00
Jon Beniston 302c040515 Star Tracker. Add support for tracking satellites. Fix settings keys. 2023-05-23 22:32:26 +01:00
Jon Beniston 33739ce669 Fix settings keys in Star Tracker (Rename to settings to match) 2023-03-30 16:48:02 +01:00
f4exb c61bc00260 Star Tracker feature: Make settings assignments atomic. Part of #1329 2022-11-30 07:21:59 +01:00
Jon Beniston b1ce69fb2b Call stopWork from destructor. 2022-09-20 21:13:12 +01:00
Jon Beniston cd3c674ced #1346: Update threading model in Star Tracker, PER Tester and APRS features 2022-09-20 11:48:25 +01: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 920d160f13 FeatureAPI: Added more convenient getIdentifier pure virtual method 2022-03-26 12:25:35 +01: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 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
Jon Beniston d5857c3878 Move Feature workers to thread 2021-11-25 09:28:59 +00:00
f4exb fee2c5065d API: report running state for feature plugins with run action 2021-10-23 21:24:25 +02:00
f4exb 920fa82022 Implemented run action API in relevant feature plugins 2021-10-22 02:01:33 +02:00
Jon Beniston fbef25884e Add Radio Astronomy plugin 2021-10-12 11:31:14 +01:00
Jon Beniston cddc8c9b83 Star Tracker updates.
Plot Sun and Moon on sky temperature chart.
Plot markers on Galactic line-of-sight chart.
Create animations from Galactic line-of-sight chart.
Allow weather at antenna location to be downloaded from openweathermap.org
Allow target to be entered as Galactic longitude / latitude.
Add azimuth and elevation offsets to support scans around targets.
Add S7, S8 and S9 targets.
Refactor some code from GUI to main plugin, so computed values can be used in other plugins.
2021-10-12 11:07:56 +01:00
f4exb 17869f2dac API: Features: correct feature set and feature indexes replacing device and channel indexes respectively 2021-09-17 00:52:08 +02:00
Jon Beniston b5339b1ec8 Add Custom Az/El target and drift scan plot to Star Tracker. 2021-05-24 12:34:38 +01:00
Jon Beniston d507f49626 Instantiate QNetworkAccessManager to avoid crash on reverse API usage 2021-01-15 11:24:21 +00:00
Jon Beniston 2c32224977 Fix cut and paste errors from PTT feature 2021-01-15 11:00:03 +00:00
Jon Beniston 4d04ee1c31 Add StarTracker feature 2021-01-13 20:51:38 +00:00