Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pwm_out_sim cleanup #9007

Merged
merged 2 commits into from
Mar 4, 2018
Merged

pwm_out_sim cleanup #9007

merged 2 commits into from
Mar 4, 2018

Conversation

dagar
Copy link
Member

@dagar dagar commented Mar 4, 2018

One of the intermittent CI mission test failures appears to be a problem with pwm_out_sim. While debugging I did a bit of a cleanup.

  • move to ModuleBase
  • strip down to PWM 8 and 16 modes only
  • remove all dead code
  • implement missing pwm ioctls (current value, rates, etc)
  • default rate 50Hz -> 400Hz

#define DRIVERS_PWM_OUT_SIM_PWMSIM_HPP_

/**
* @file hil.cpp
Copy link
Member

Choose a reason for hiding this comment

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

Needs update for correct file.

 - move to ModuleBase
 - strip down to PWM 8 and 16 modes only
 - remove all dead code
 - implement missing pwm ioctls (current value, rates, etc)
 - default rate 50Hz -> 400Hz
LorenzMeier
LorenzMeier previously approved these changes Mar 4, 2018
@dagar
Copy link
Member Author

dagar commented Mar 4, 2018

I'll test HIL quickly.

@dagar
Copy link
Member Author

dagar commented Mar 4, 2018

@dagar
Copy link
Member Author

dagar commented Mar 4, 2018

Reducing pwm sim task stack a bit.

image

@dagar dagar merged commit 6caeb2d into master Mar 4, 2018
@dagar dagar deleted the pr-pwm_out_sim branch March 4, 2018 19:12

)DESCR_STR");

PRINT_MODULE_USAGE_NAME("pwmsim", "driver");
Copy link
Member

Choose a reason for hiding this comment

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

This needs to match the shell command: pwm_out_sim (and the same for px4_task_spawn_cmd).

)DESCR_STR");

PRINT_MODULE_USAGE_NAME("pwmsim", "driver");
PRINT_MODULE_USAGE_COMMAND_DESCR("start", "Start the task (without any mode set, use any of the mode_* cmds)");
Copy link
Member

Choose a reason for hiding this comment

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

without any mode set is this correct? The constructor initializes with pwm16

Its only function is to take actuator_control uORB messages,
mix them with any loaded mixer and output the result to the
actuator_output uORB topic. PWMSim can also be performed with normal
PWM outputs, a special flag prevents the outputs to be operated
Copy link
Member

Choose a reason for hiding this comment

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

Can you document what the special flag is and how it's configured?

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants