-
Notifications
You must be signed in to change notification settings - Fork 13.3k
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
AUX outputs param setup fix #5990
Conversation
Flash overflow. So we're just at the limit. |
@tops4u It would be great if you could test this. |
@LorenzMeier Checked and failed : See #5989 |
92b55d0
to
c6cc9fd
Compare
@tops4u This works now, I just tested it. Paramter PWM_AUX_DISARMED set to 1490 and rebooted:
|
@julianoes Can you briefly review? |
@kd0aij Can you review and maybe test this one? |
@@ -122,7 +122,7 @@ get_parameter_value(const char *option, const char *paramDescription) | |||
if (strncmp("p:", option, 2) == 0) { | |||
|
|||
char paramName[32]; | |||
strncpy(paramName, option + 2, 16); | |||
strncpy(paramName, option + 2, 17); |
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.
Is 17 the maximum length of a parameter name?
Everything else looks good to me.
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.
Param name + 1 (null termination). See: http://pubs.opengroup.org/onlinepubs/7908799/xsh/strncpy.html.
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.
I knew that exactly 17 bytes should be written to paramName, but I couldn't find any guarantee that option points to a string with length < 17
Interesting that PWM_AUX_DISARMED is 16 bytes long.
Dusted off the Pixhawk1 F450; AUX outputs working, as is the default aux_disarmed parameter. Will do a short flight test next.
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.
For future reference, the parameter name length limit of 16 characters is enforced in src/Tools/px4params/srcparser.py
@kd0aij Any chance you could flash & take this for a short flight? |
Test flight went OK. For some reason I had to recalibrate the ESCs before this would fly again, and I ran out of battery after just a minute in the air, but performance in stabilized and altctl with EKF2 was nominal. |
Thanks for the baseline testing. Rebased and applied. |
No description provided.