Closed ABLomas closed 1 year ago
Configurator needs updating to read the WP P3 parameter as a Bitfield rather than a boolean as it does at the moment.
Configurator has been updated to read P3 as a bitfield. I thought I had tested that everything was toggled correctly. But something must have slipped through.
OK missed that change. I was going to do it but seems you've saved me the trouble.
So just updated Configurator and checked this and it appears that the Bit is being set but not unset, so once it's been set it gets stuck true.
The other problem is P3 is used as a boolean in various places which affects the altitude calculation depending on whether SL or relative altitude datum is used. Bit 0 needs checking rather than just the boolean state of the P3 value. I've made some changes that have fixed the obvious things, need to check other stuff isn't affected.
Do you want me to fix this @MrD-RC given it's related to the MSL Altitude stuff I did originally ?
@breadoven I found somewhere that was using P3 as a Boolean. So I've sorted that and fixed some other things too. The Elevation (m) and Grd Dist (m) seem to be working correctly to me. But, the elevation profile doesn't seem right. I couldn't see any references to P3 in there. Your thoughts? It may be fine though. It looks the same in 5.1 Configurator.
WP1
WP2
WP3
WP4
WP5
WP6
There is something causing issues in the elevation profile. If I disable the user actions, it looks as I would expect.
Got it. It was hidden in WaypointCollection
.
WP2 now for comparison
Short video demonstrating issue: https://user-images.githubusercontent.com/8989151/218552591-65620b35-67e2-451c-ae52-334931ab7444.mp4 Text version - mission waypoint with user action set has it's altitude set to MSL+preset altitude, while AGL setting is selected. This was registered as issue on another branch but it looks like firmware has nothing to do with it: https://github.com/iNavFlight/inav/issues/8798
In short - looks like INAV-configurator incorrectly parses bit0 in P3 field and and this is reason why alt is set to wrong value.