Tools: break callisto SITL config to a common method#32828
Open
Ryanf55 wants to merge 1 commit intoArduPilot:masterfrom
Open
Tools: break callisto SITL config to a common method#32828Ryanf55 wants to merge 1 commit intoArduPilot:masterfrom
Ryanf55 wants to merge 1 commit intoArduPilot:masterfrom
Conversation
* Reduces code duplication Signed-off-by: Ryan Friedman <25047695+Ryanf55@users.noreply.github.com>
hunt0r
approved these changes
Apr 18, 2026
Contributor
hunt0r
left a comment
There was a problem hiding this comment.
Hurray DRY code!
Opinion: Dicts are most appropriate when the structure of their information is not known in advance. In cases like this one, it's less convenient, but slightly stronger, to use a more structured alternative (e.g. namedtuple, dataclass).
I'm happy to say more if anyone is interested... but it's a minor improvement and definitely not something I'd block over. This is great as-is.
Contributor
Author
peterbarker
requested changes
Apr 18, 2026
| defaults_filepath=self.model_defaults_filepath('Callisto'), | ||
| model="octa-quad:@ROMFS/models/Callisto.json", | ||
| **self.callisto_sitl_kwargs(), | ||
| wipe=True, |
Contributor
There was a problem hiding this comment.
Better swipe this one too - but add a comment that we do wipe the parameters....
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Classification & Testing (check all that apply and add your own)
Description
Pull out the args needed for callisto into a function that returns kwargs.
You can then use the
**operator to unpack the kwargs nicely.