Skip to content

autotest: add sanity check that greylisted items are not documented #30104

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 23 additions & 12 deletions Tools/autotest/vehicle_test_suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -3095,7 +3095,6 @@ def LoggerDocumentation_greylist(self):
"FTN3", # gyrofft
"IE24", # generator
"IEFC", # generator
"RTCM", # GPS
"SBRE", # septentrio

"SAF1", # blimp-sim
Expand All @@ -3122,24 +3121,14 @@ def LoggerDocumentation_greylist(self):
"SMVZ", # Sim-Volz

"SORC", # Soaring
"VAR", # soaring

"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
"ATUN", # Copter autotune
])

def LoggerDocumentation_whitelist(self):
Expand Down Expand Up @@ -3167,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
Expand All @@ -3176,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([
Expand Down Expand Up @@ -3306,6 +3312,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.
Expand Down
7 changes: 7 additions & 0 deletions libraries/AP_GPS/AP_GPS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
Loading