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_Camera: add time based triggering support #24357
Conversation
Let's make sure that distance based triggering and time interval triggering cannot be active at the same time. So if one is activated it should disable the other. |
8e4cc7a
to
ca354b1
Compare
@rmackay9 In the newer patch when time and distance both triggering is enabled at the same time then only time triggering will be done. Is it good? |
Ah, it seems in the mavlink spec, "Total Images: 0 to capture forever/until MAV_CMD_IMAGE_STOP_CAPTURE".. I think we're not handling this. This may mean that we DO need the enabled boolean. Or some way to indicate whether we're taking pictures forever or not. You could change num_remaining to be a signed integer (int16_t might be fine if we think 32K images is OK. and I think it is) and use "-1" to mean take pictures forever. Or you could change the enabled boolean to be an enum (DISABLED, ENABLED, ENABLED_FOREVER).. anyway, I'll leave this to you to decide. |
using -1 makes solving this easier and concise. so choosing that. let me know if you want the another method. |
f41bded
to
0630b5f
Compare
This looks correct to me. The use of -1 to specify take pictures forever is a little unusual in AP but it's OK I think. @peterbarker how do you feel about this? |
Refrence to mavlink PR #2024 For further upgrading this PULL according to the new definition of MAV_CMD_IMAGE_START_CAPTURE |
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.
We probably want to add an instance field to that message....
I think for MAV_CMD_IMAGE_STOP_CAPTURE we should have a separate PR. where we can add functionality to stop capture no matter what type of triggering we are doing (distance, time). |
I think PeterB's requests have been addressed
Great stuff, let's merge after it passes CI. |
Tested in SiYi Zr10.