PX4-Autopilot icon indicating copy to clipboard operation
PX4-Autopilot copied to clipboard

PWM Out Sim: provide same interface as in hardware

Open Pedro-Roque opened this issue 1 year ago • 3 comments

Solved Problem

pwm_out_sim had a different interface to the values of PWM_MAIN_{MIN/MAX/FUNC/DIS/FAIL}{i} than hardware. This PR attempts at fixing that.

Solution

  • Added missing parameters to the module in question
  • Added the required interface in pwm_out_sim.cpp
  • Removed redundant "MAGIC" parameters in pwm_out_sim.hpp

Changelog Entry

For release notes:

Feature/Bugfix XYZ
New parameter: XYZ_Z
Documentation: Need to clarify page ... / done, read docs.px4.io/...

Alternatives

Keeping it as it was did not work since it would not allow for different PWM values than those hardcoded...

Test coverage

  • Unit/integration test: local format and unit tests checked out

Context

Pedro-Roque avatar May 16 '24 18:05 Pedro-Roque

This pull request has been mentioned on Discussion Forum for PX4, Pixhawk, QGroundControl, MAVSDK, MAVLink. There might be relevant details there:

https://discuss.px4.io/t/px4-sync-q-a-may-22-2024/38872/1

DronecodeBot avatar May 22 '24 15:05 DronecodeBot

We need to check this doesn't break the HIL configs. Anything else using pwm_out_sim might require parameter defaults.

dagar avatar Jun 19 '24 15:06 dagar

This pull request has been mentioned on Discussion Forum for PX4, Pixhawk, QGroundControl, MAVSDK, MAVLink. There might be relevant details there:

https://discuss.px4.io/t/px4-sync-q-a-june-19-2024/39303/1

DronecodeBot avatar Jun 19 '24 16:06 DronecodeBot

@dagar how should we fix this?

Pedro-Roque avatar Feb 05 '25 17:02 Pedro-Roque