-
Notifications
You must be signed in to change notification settings - Fork 13.6k
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
moved set_camera_zoom and do_set_servo to commander #14809
Conversation
I'm a bit confused here. What exactly does it fix? And why? |
Both SET_CAMERA_ZOOM and DO_SET_SERVO can be mission items now and be performed if you send a COMMAND_LONG. Before this PR, you could have DO_SET_SERVO as mission item, but not as command, and SET_CAMERA_ZOOM as command, but not as mission item. |
Right. And this actually works? 😲 |
After reaching waypoint with SET_CAMERA_ZOOM, param1=2, param2=50:
After reaching waypoint with SET_CAMERA_ZOOM, param1=2, param2=100:
After reaching waypoint with DO_SET_SERVO, param1=1, param2=1500:
A manual DO_SET_SERVO:
A manual SET_CAMERA_ZOOM:
|
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 think this is good. I just would like @dagar to double check it.
4c822b3
to
6c0e026
Compare
@hamishwillee I think you are more on track on the DO_SET_SERVO requests on slack...is this a feasible solution for it? The only problem is the collision with actuator_controls_2 from the vmount module. |
I prefer to avoid the collision, and rather go for aux in control group |
The camera that we use is happy with getting the PWM signal just once for setting the zoom, so publishing actuator_controls_2 once was sufficient to get the zoom controlled, of course with a corresponding mixer file. |
It was just brought to my attention that my PR for DO_SET_SERVO (#15281) conflicts with this. Not really sure what's going on here, or who should continue DO_SET_SERVO work? After talking with @bkueng, I am currently working on mapping DO_SET_SERVO to control group 3 RC aux 1-3. I am also adding support for the new MAV_CMD_DO_SET_ACTUATOR message. |
This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions. |
Describe problem solved by this pull request
SET_CAMERA_ZOOM was handled in mavlink_receiver before and DO_SET_SERVO only in mission_blocks. Moved both to the Commander.cpp. Also changed the formula for DO_SET_SERVO, as it probably required some very specific mixer before. Now it merely scales the 0-2000 input in the command to -1 to 1 and the rest is up to the mixer.