-
Notifications
You must be signed in to change notification settings - Fork 13.6k
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
Conversation
dagar
commented
Jul 16, 2018
- fixes Missing PWM_MAIN_REV* params in v1.8.0 #9859
Sensors isn't the right owner for PWM parameters, but it's fine for now. |
@mcsauder this reminds me that we could cleanup a good portion of the init script PWM_* variable mess by using parameters directly. |
There was a problem hiding this 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
src/drivers/px4fmu/fmu.cpp
Outdated
@@ -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) { |
There was a problem hiding this comment.
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"
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done