Commit a237215
NTRIP Implementation (#13634)
* Add NTRIP support for GPS corrections
During the rebase(NTRIP Implementation from @KnightHawk06), the upstream contributor introduced changes that broke the previous design of NTRIPTCPLink inheriting from QThread. The class no longer implemented valid QThread behavior, which caused build errors such as:
illegal member initialization: 'QThread' is not a base or member
QObject::connect: no matching signal/slot overload
Missing methods (isRunning(), wait(), quit(), run(), exec())
and at runtime triggered Qt warnings about QSocketNotifier and thread affinity.
This patch converts NTRIPTCPLink from a QThread subclass into a proper QObject worker and runs it inside a dedicated QThread created and owned by NTRIPManager. This follows the recommended Qt threading pattern and fixes the build-time and runtime issues.
Key changes:
Replace NTRIPTCPLink : QThread with NTRIPTCPLink : QObject
Move socket and parser lifetime fully into the worker thread
Add a start() slot instead of overriding run()
Use requestStop() + finished signal to cleanly shut down the worker
Update NTRIPManager to own the QThread and manage start/stop correctly
Remove invalid QThread API calls from NTRIPTCPLink
Eliminate race conditions and invalid cross-thread socket access
Testing:
Build-only verification on Windows (VS2022 + Qt 6.10).
Connected to rtk2go with a nearby base station in SITL/simulator; verified NTRIP connection and RTCM data flow.
No real vehicle available at the moment, so end-to-end RTK injection into an actual autopilot is not re-tested.
Previously used successfully with the Turkish NTRIP caster TUSAGA-Aktif; current changes are expected to preserve functionality once a real vehicle + caster are available.
Co-Authored-By: KnightHawk06 <[email protected]>
* remove unrelated file
Co-Authored-By: KnightHawk06 <[email protected]>
---------
Co-authored-by: KnightHawk06 <[email protected]>1 parent 1dee7b6 commit a237215
File tree
14 files changed
+1833
-2
lines changed- src
- GPS
- Settings
- UI/AppSettings
14 files changed
+1833
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
118 | | - | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
| 22 | + | |
21 | 23 | | |
22 | 24 | | |
23 | 25 | | |
| |||
0 commit comments