-
Notifications
You must be signed in to change notification settings - Fork 17k
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
AP_Param: fixed param class conversion code #20388
Conversation
param class conversion was unconditionally overwriting the parameter from the old parameter. This meant if the user has set a value in an old firmware they could not change it in a new firmware. I hit this with ARSPD_TYPE. I had previously set this to 0 in a previous use of the board, and found that it kept resetting to 0 on the new firmware when I tried to enable airspeed
I think this is a gremlin that has been haunting us for a while! |
I think the bug fix is correct and makes sense. But I can't actually reproduce it with your steps.... which is bugging me a bit I also tried it a on CubeBlack in addition to SITL (I tried a couple time with each) |
the only user of this code is the airspeed conversion, so only impacts airspeed so far |
@hendjoshsr71 an easy way to reproduce is to use this eeprom.bin: |
Ok I can now reproduce it now with my own bin files. The difference was I doing: 4.1.7 -> 4.2Beta not master. When I went from 4.2Beta -> Master it got reset to zero after doing the 4.1.7->4.2Beta. There must be some difference between the two. |
Yes, I have merged this fix in beta4 |
@tridge I think I figured out how my testing missed this. I thought had I tested this scenario but .... When using mavproxy I realized that after Might it make sense when using sitl that |
param class conversion was unconditionally overwriting the parameter from the old parameter. This meant if the user has set a value in an old firmware they could not change it in a new firmware.
I hit this with ARSPD_TYPE. I had previously set this to 0 in a previous use of the board, and found that it kept resetting to 0 on
the new firmware when I tried to enable airspeed
To reproduce this bug: