Conversation
|
ⓘ Qodo reviews are paused because the subscription is no longer active. Ask your workspace admin to reactivate the subscription to resume reviews. Manage billing |
PR Summary by QodoAvoid unsupported GLONASS keys on u-blox F10 receivers
AI Description
Diagram
High-Level Assessment
Files changed (1)
|
Code Review by Qodo
1.
|
cc20741 to
42e8c23
Compare
|
Good catch, and it reproduces. Measured in SITL with an emulated M10 that answers everything, then goes silent long enough for the protocol to restart, then comes back but loses the one MON-GNSS reply. The constellation VALSET that reaches the receiver after the restart:
So the report is right. I did not take the suggested fix, though. Clearing
That trades one regression for a worse one. The decision now reads the support mask directly, which is cleared in the same place the other masks are: const bool noGlonass = ubx_capabilities.supported && !gpsUbloxHasGlonass();An empty mask means MON-GNSS never answered, so nothing is known and every key goes out, exactly as before this PR. No new state, no change to the wait, no change in timing. After the change:
Branch force pushed. |
An F10 reports the M10 hardware version, so INAV takes the CFG-VALSET path for it, and then sends two things it cannot accept. Its configuration database has no Glonass group at all, and its Beidou L1 signal is B1C, not the B1I that INAV picks by default. Either one makes the receiver reject the whole message, so SBAS, Galileo, BeiDou and QZSS never get applied. UBX-MON-GNSS is already polled before the configuration starts and reports which constellations the receiver has, so leave the Glonass keys out when it says there are none. An empty mask means MON-GNSS never answered, and then nothing is known, so every key goes out as before. The dual band receivers name themselves in the MON-VER extensions, which are already being read for the constellation list, so pick B1C there. It is what they have, and their two bands cannot be configured apart.
42e8c23 to
e8f77e1
Compare
What happens
A u-blox F10 reports
hwVersion000A0000, the same string an M10 reports, so INAV correctly identifies it as protocol 27+ and configures it through CFG-VALSET. It then sends two things that receiver cannot accept.Its configuration database has no Glonass group at all. The F10 interface description (UBX-23002975) shows the CFG-SIGNAL group jumping straight from
CFG-SIGNAL-QZSS_ENA(0x10310024) toCFG-SIGNAL-NAVIC_ENA(0x10310026): key 0x10310025, which isCFG-SIGNAL-GLO_ENAon an M10, is not there, and neither is 0x10310018.And its Beidou L1 signal is B1C, not B1I.
configureGNSS10()picks B1I unless Glonass is on, which on an F10 both enables a signal it cannot receive and turns off the one it uses. The NEO-F10N integration manual is explicit about what happens then:A CFG-VALSET is all or nothing, so either of those makes the receiver answer NAK and apply none of the message. SBAS, Galileo, BeiDou and QZSS go down with them, and INAV then resets
gps_ublox_use_galileo,gps_ublox_use_beidouandgps_ublox_use_glonassto their defaults.This is the whole F10 family: NEO-F10N, DAN-F10N and the boards built on them. What a real NEO-F10N answers to MON-VER:
GPS;GAL;BDS, with noGLO, andSPGL1L5for the dual band firmware.The change
Both pieces of information are already on hand.
INAV polls UBX-MON-GNSS before the configuration starts and keeps the supported-constellation mask, and
gpsUbloxHasGlonass()is already there. The two Glonass keys are last in the array, so leaving them out makes the message shorter rather than different. They are only dropped when the mask says so: an empty mask means MON-GNSS never answered, nothing is known, and every key goes out as before.The MON-VER extensions are already being walked for the constellation list and the protocol version, so the same walk now notices
L1L5and the Beidou choice follows it.Nothing changes for a receiver that reports Glonass, and the M8/M9 path through
configureGNSS()is untouched.Testing
SITL on Windows against an emulated u-blox that answers MON-VER and MON-GNSS and streams NAV-PVT. The F10 emulator applies its manual's rules and NAKs the message if it sees a Glonass key, B1I enabled, or B1C turned off while B2a is on. What reaches the receiver in the constellation VALSET:
gps_ublox_use_glonass = ONgps_ublox_use_glonass = ONBefore the change the two F10 cases were rejected, the first for both reasons and the second for the Glonass keys alone, and no part of the constellation configuration reached the receiver. The two M10 cases are byte for byte what they were.
Also checked, because the capability state outlives a protocol restart: an M10 that goes quiet long enough for the state machine to restart, then comes back with its MON-GNSS reply lost, still gets all 12 keys, exactly as it does on
maintenance-10.x.Not tested on hardware yet. The F10 emulator follows the published rules, but a real NEO-F10N would be worth a check.