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

fmu fix MAIN/AUX parameters #9925

Merged
merged 3 commits into from Jul 17, 2018
Merged

fmu fix MAIN/AUX parameters #9925

merged 3 commits into from Jul 17, 2018

Conversation

dagar
Copy link
Member

@dagar dagar commented Jul 16, 2018

@dagar dagar requested review from bkueng and LorenzMeier July 16, 2018 14:48
@dagar
Copy link
Member Author

dagar commented Jul 16, 2018

Sensors isn't the right owner for PWM parameters, but it's fine for now.
The single parameter file pwm_params.c was split into 2 files (MAIN and AUX) and used to centralize all PWM parameters. I also added AUX 7&8.

@dagar
Copy link
Member Author

dagar commented Jul 16, 2018

image

Unfortunately all 8 PWM disarmed parameters are still set active as a result of the init script.

@dagar
Copy link
Member Author

dagar commented Jul 16, 2018

@mcsauder this reminds me that we could cleanup a good portion of the init script PWM_* variable mess by using parameters directly.

@dagar dagar added the bug label Jul 16, 2018
bkueng
bkueng previously approved these changes Jul 17, 2018
Copy link
Member

@bkueng bkueng left a comment

Choose a reason for hiding this comment

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

One suggestion, otherwise looks good

@@ -928,13 +922,23 @@ PX4FMU::update_pwm_rev_mask()

for (unsigned i = 0; i < _max_actuators; i++) {
char pname[16];
int32_t ival;

if (_class_instance == CLASS_DEVICE_PRIMARY) {
Copy link
Member

Choose a reason for hiding this comment

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

Move this out of the loop, and use const char* pname_format = "PWM_MAIN_REV%d"?

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

@dagar dagar merged commit 8985403 into master Jul 17, 2018
@dagar dagar deleted the pr-fmu_params branch July 17, 2018 23:59
@dagar dagar added this to the Release v1.8.1 milestone Jul 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing PWM_MAIN_REV* params in v1.8.0
2 participants