Skip to content

Conversation

lucascheuer
Copy link
Contributor

Solved Problem

I found that when instance start is set in an actuator output yaml to something besides 1 then the parameters don't match the expected from mixer_module.cpp. I submitted an issue here

Fixes #23615

Solution

  • I added a const to the constructor of MixingOutput called instance_start that defaults to 1
  • I added a const instance_start to initParamHandles
  • When initParamHandles the const from the constructor is used and passed in
  • In initParamHandles instead of adding 1 to each parameter name, the instance_start parameter is added

Changelog Entry

For release notes:

Feature/Bugfix: Correct param handles are now selected when instance_start is used in actuator output drivers

Alternatives

We could also remove the functionality that is already available in the metadata generator, but that seems silly as this is only adding consts that shouldn't affect size or speed.

Test coverage

  • Tested on the actuator outputs used for Vertiq motors for work

Context

From the issue, when instance start is 0. This is nice if the channels match an ID in the output device so that there isn't confusion about off by 1 labeling.

Before:
Screenshot 2024-08-23 164942

After:
Screenshot 2024-08-23 170415

…d in actuator yaml files they parameters are able to be used
@dagar dagar merged commit ca47f6f into PX4:main Aug 26, 2024
50 of 51 checks passed
Ali-barari pushed a commit to Ali-barari/AvesAID that referenced this pull request Apr 29, 2025
…ce start is changed in actuator yaml files they parameters are able to be used (PX4#23616)

Co-authored-by: Luca Scheuer <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants