Skip to content

Commit 5343a7f

Browse files
committed
Extend MSP_GPSSTATISTICS to include GPS hardware version
Add hwVersion field to MSP_GPSSTATISTICS (166) for GPS module detection: - Field added at end of message (backward compatible) - Exposes gpsState.hwVersion (800=M8, 900=M9, 1000=M10, 0=Unknown) - Enables configurator auto-detection of GPS module type Changes: - src/main/fc/fc_msp.c: Add sbufWriteU32(dst, gpsState.hwVersion) - docs/development/msp/msp_messages.json: Document hwVersion field Used by configurator GPS preset UI to automatically configure optimal constellation/rate settings based on hardware capability (M8/M9/M10). Backward compatible: Old configurators ignore extra bytes, new configurators check byteLength before reading hwVersion field. Related configurator PR: feature-gps-preset-ui branch Research: claude/developer/docs/gps/m9-16-satellite-limitation-official.md
1 parent a7932b9 commit 5343a7f

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

docs/development/msp/msp_messages.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4896,6 +4896,12 @@
48964896
"ctype": "uint16_t",
48974897
"desc": "Estimated Vertical Position Accuracy (`gpsSol.epv`)",
48984898
"units": "cm"
4899+
},
4900+
{
4901+
"name": "hwVersion",
4902+
"ctype": "uint32_t",
4903+
"desc": "GPS hardware version (`gpsState.hwVersion`). Values: 500=UBLOX5, 600=UBLOX6, 700=UBLOX7, 800=UBLOX8, 900=UBLOX9, 1000=UBLOX10, 0=UNKNOWN",
4904+
"units": "Version code"
48994905
}
49004906
]
49014907
},

src/main/fc/fc_msp.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1009,6 +1009,7 @@ static bool mspFcProcessOutCommand(uint16_t cmdMSP, sbuf_t *dst, mspPostProcessF
10091009
sbufWriteU16(dst, gpsSol.hdop);
10101010
sbufWriteU16(dst, gpsSol.eph);
10111011
sbufWriteU16(dst, gpsSol.epv);
1012+
sbufWriteU32(dst, gpsState.hwVersion);
10121013
break;
10131014
#endif
10141015
case MSP2_ADSB_VEHICLE_LIST:

0 commit comments

Comments
 (0)