mirror of
https://github.com/ArduPilot/ardupilot.git
synced 2026-10-06 19:00:27 +08:00
Three places looped over af_labels asking whether a label named an alternative function, and none of them used the entry which matched. str.startswith() takes a tuple of prefixes and does the whole test at once, so ask it that way instead; two of the three are in get_alt_function(), which is called for every pin line. Processing all 443 ChibiOS hwdefs goes from 0.335s to 0.325s. The parse state of all 490 boards is unchanged. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>