-
Notifications
You must be signed in to change notification settings - Fork 13.7k
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
vmount: support absolute angles #10525
Conversation
@julianoes how are you testing this? One problem I have with vmount for #10502 is not knowing the other use cases to check for any regressions. |
@dagar I haven't tested it yet which is why it's WIP. I'm planning to cherry-pick it for H520 and test it then against the SDK. |
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.
Looks good so far.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
@bkueng any thoughts what we should do with this? |
Closing as stale. |
Note to self, need to work on this. |
e739260
to
931fda9
Compare
Rebased, currently testing and fixing this. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
@julianoes YOu might want to pin this |
This will change anyway when the new gimbal messages come to MAVLink, closing. |
Re-opening this because it's needed after all. |
931fda9
to
763012d
Compare
763012d
to
d2bbeb6
Compare
@bkueng would be great if you could review this again some time. |
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.
Looks good. Can you cleanup the commits (there's a style fix)?
src/modules/vmount/input_mavlink.cpp
Outdated
param = vehicle_command.param7; | ||
} | ||
|
||
if (int(param) == 0) { |
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 guess you need to round or add the 0.5 here
if (int(param) == 0) { | |
if (int(param+0.5f) == 0) { |
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.
Thx.
src/modules/vmount/input_mavlink.cpp
Outdated
for (int i = 0; i < 3; ++i) { | ||
float param; | ||
|
||
if (i == 0) { |
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.
You could do: float params[] = { vehicle_command.param5, vehicle_command.param6, vehicle_command.param7 };
to keep this shorter.
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.
Nice, I'll do something like that.
4a6a37e
to
266e244
Compare
@bkueng if you could have another quick look over this, that would be great. And then I can probably merge it. |
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.
Can you squash the style fix commit?
The mavlink spec now supports absolute angles as well, see: mavlink/mavlink#944
We previously did not set param2 to param7 of DO_MOUNT_CONFIGURE.
It is most convenient to use a yaw angle relative to body for testing. Also, we set stabilize_axis to true for testing.
If last_active is initialized at 0 it means that input via mavlink is already enabled but that's generally not the case.
266e244
to
e187491
Compare
@bkueng style commit is squashed, let's wait for CI. |
The mavlink spec now supports absolute angles as well, see:
mavlink/mavlink#944