From 9bd754fc04dbbfb90421cec0ea493757d949d98f Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Mon, 19 May 2025 09:57:44 +1000 Subject: [PATCH 1/3] AP_GPS: document the RTCM log message --- libraries/AP_GPS/AP_GPS.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libraries/AP_GPS/AP_GPS.cpp b/libraries/AP_GPS/AP_GPS.cpp index 7b68eab91f31b..bdbf12092beb6 100644 --- a/libraries/AP_GPS/AP_GPS.cpp +++ b/libraries/AP_GPS/AP_GPS.cpp @@ -1642,6 +1642,13 @@ bool AP_GPS::parse_rtcm_injection(mavlink_channel_t chan, const mavlink_gps_rtcm const uint32_t crc = crc_crc32(0, buf, len); #if HAL_LOGGING_ENABLED +// @LoggerMessage: RTCM +// @Description: GPS atmospheric perturbation data +// @Field: TimeUS: Time since system startup +// @Field: Chan: mavlink channel number this data was received on +// @Field: RTCMId: ID field from RTCM packet +// @Field: Len: RTCM packet length +// @Field: CRC: calculated crc32 for the packet AP::logger().WriteStreaming("RTCM", "TimeUS,Chan,RTCMId,Len,CRC", "s#---", "F----", "QBHHI", AP_HAL::micros64(), uint8_t(chan), From 040e4db187140990003b174c50c5ac75346596f2 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Mon, 19 May 2025 09:52:18 +1000 Subject: [PATCH 2/3] autotest: add sanity check that greylisted items are not documented .... and remove two messages that have now been documented --- Tools/autotest/vehicle_test_suite.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Tools/autotest/vehicle_test_suite.py b/Tools/autotest/vehicle_test_suite.py index 0c084860638be..51ac5972d9d0f 100644 --- a/Tools/autotest/vehicle_test_suite.py +++ b/Tools/autotest/vehicle_test_suite.py @@ -3122,7 +3122,6 @@ def LoggerDocumentation_greylist(self): "SMVZ", # Sim-Volz "SORC", # Soaring - "VAR", # soaring "TCLR", # tempcal "TEMP", # temperature sensor library @@ -3139,7 +3138,6 @@ def LoggerDocumentation_greylist(self): "GMB2", # sologimbal "QBRK", # quadplane "SURF", # surface-tracking - "ATUN", # Copter autotune ]) def LoggerDocumentation_whitelist(self): @@ -3306,6 +3304,11 @@ def LoggerDocumentation(self): if len(missing) > 0: raise NotAchievedException("Documented messages (%s) not in code" % missing) + # ensure things in the whitelist are not documented: + for g in greylist: + if g in docco_ids: + raise NotAchievedException(f"greylisted ({g}) is actually documented") + def initialise_after_reboot_sitl(self): # after reboot stream-rates may be zero. Request streams. From 7c7cec43302a86f340d448a04957d24163446c1d Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Mon, 19 May 2025 09:57:44 +1000 Subject: [PATCH 3/3] autotest: move messages into vehicle-specific whitelists these are actually documented, just not for all vehicles --- Tools/autotest/vehicle_test_suite.py | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/Tools/autotest/vehicle_test_suite.py b/Tools/autotest/vehicle_test_suite.py index 51ac5972d9d0f..064ca522e9c3a 100644 --- a/Tools/autotest/vehicle_test_suite.py +++ b/Tools/autotest/vehicle_test_suite.py @@ -3095,7 +3095,6 @@ def LoggerDocumentation_greylist(self): "FTN3", # gyrofft "IE24", # generator "IEFC", # generator - "RTCM", # GPS "SBRE", # septentrio "SAF1", # blimp-sim @@ -3126,18 +3125,10 @@ def LoggerDocumentation_greylist(self): "TCLR", # tempcal "TEMP", # temperature sensor library - "ARHS", # autorotation - "AROT", # autorotation - "ARSC", # autorotation - "ATDH", # heli autotune - "ATNH", # heli autotune - "ATSH", # heli autotune "CC", # AC_CustomControl + "FWDT", # quadplane - "GMB1", # sologimbal - "GMB2", # sologimbal "QBRK", # quadplane - "SURF", # surface-tracking ]) def LoggerDocumentation_whitelist(self): @@ -3165,6 +3156,10 @@ def LoggerDocumentation_whitelist(self): # documentation (eg. @Path: # ../libraries/AP_LandingGear/AP_LandingGear.cpp). vinfo_key = self.vehicleinfo_key() + if vinfo_key != 'ArduPlane' and vinfo_key != 'ArduCopter' and vinfo_key != 'Helicopter': + ret.update([ + "ATUN", # Plane and Copter have ATUN messages + ]) if vinfo_key != 'ArduPlane': ret.update([ "TECS", # only Plane has TECS @@ -3174,6 +3169,19 @@ def LoggerDocumentation_whitelist(self): "SORC", # soaring is pure magic "QBRK", # quadplane "FWDT", # quadplane + "VAR", # variometer only applicable on Plane + ]) + if vinfo_key != 'ArduCopter' and vinfo_key != "Helicopter": + ret.update([ + "ARHS", # autorotation + "AROT", # autorotation + "ARSC", # autorotation + "ATDH", # heli autotune + "ATNH", # heli autotune + "ATSH", # heli autotune + "GMB1", # sologimbal + "GMB2", # sologimbal + "SURF", # surface-tracking ]) if vinfo_key == 'ArduCopter': ret.update([