Skip to content

Conversation

peterbarker
Copy link
Contributor

No description provided.

@peterbarker peterbarker force-pushed the pr/scripting-bindings-optional branch from acf077c to b4955cd Compare September 2, 2025 16:08
@tpwrules
Copy link
Contributor

tpwrules commented Sep 2, 2025

Let's standardize the define names so future work can make the bindings generator do this automagically.

Proposal

  • name is the singleton or other object name (e.g. AP::motors()) coming from the bindings.desc file
  • sanitize the name according to the rules i.e. AP__motors__ (replacing any of :.<>()- with _)
  • suffix _index to get symbol name (this what the generator does internally)
  • get the "rename" name if available, otherwise continue with sanitized name
  • substitute into AP_SCRIPTING_BINDING_%s_ENABLED the uppercased version of the name

@peterbarker
Copy link
Contributor Author

Current names conform to Thomas' suggestions.

This PR saves ~5400 bytes on CubeOrange / Copter when both are removed.

Copy link
Contributor

@tridge tridge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please test for no change on some boards

@peterbarker peterbarker merged commit 26ac908 into ArduPilot:master Oct 1, 2025
107 of 108 checks passed
@peterbarker peterbarker deleted the pr/scripting-bindings-optional branch October 1, 2025 08:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants