-
Notifications
You must be signed in to change notification settings - Fork 13.4k
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
Vector asigment with vec.xy() = vec.xy() does not work [Bug] #22565
Comments
In 1.13 the position lock worked. This was broken by this commit which changed to using .xy instead of assigning each element separately. https://github.com/PX4/PX4-Autopilot/pull/20440/files#diff-6a93912921c62df6bced857c3dea68c3c275d25faa3f6c78866eafedc4e5612fR113 |
Thanks for reporting, I'm looking into this issue. |
@sverrevr Thanks for spotting and reporting this in detail! We'll have a look. |
Good job! And thanks for solving this so rapidly :) This solves the observed problem of the position lock not engaging. Position set points are now set when the joystick is released. |
Describe the bug
The following assignment fails:
So
lhs
is not getting assigned.This form of assignment is used multiple places in the code for example here:
PX4-Autopilot/src/modules/flight_mode_manager/tasks/ManualPosition/FlightTaskManualPosition.cpp
Lines 112 to 121 in c63214b
I noticed this change when the position lock no longer activated when testing 1.14
Note that the following test which is originally a part of
MatrixVector3Test.cpp
passes:To Reproduce
Add the following lines of code to
PX4-Autopilot/src/lib/matrix/test/MatrixVector3Test.cpp
Run:
make tests
Expected behavior
lhs
should be assigned, the tests should pass.Screenshot / Media
No response
Flight Log
Not relevant as it can be tested with unit tests
Software Version
Newest main when writing this issue: c63214b
And on 1.14 release
Flight controller
N/A
Vehicle type
None
How are the different components wired up (including port information)
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: