-
Notifications
You must be signed in to change notification settings - Fork 17.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
AP_Mount: set clock on SIYI #25543
AP_Mount: set clock on SIYI #25543
Conversation
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 it would be better to move this down below the "request firmware" section. As it is, I think you'll find that the time is only set if the gimbal is powered up at the same time as the autopilot. If the gimbal is powered up say 30seconds after the autopilot the time will never be set.
Doing this may also remove the need to setting the time 5 times.
thanks, done. |
libraries/AP_Mount/AP_Mount_Siyi.cpp
Outdated
@@ -68,6 +69,15 @@ void AP_Mount_Siyi::update() | |||
} else { | |||
request_configuration(); | |||
} | |||
|
|||
// send UTC time to the camera | |||
if (_got_hardware_id && sent_time_count < 5) { |
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 don't think we need the _got_hardware_id here.. it's already checked above and has a return after 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.
it's an existing problem but we could also remove the "} else {" the precedes the "request_configuration". The only reason to do this is that it makes it more clear that the request_configuration() and set_time are run together.
this means photos on microSD have correct date
this means photos on microSD have correct date, based on time we get from GPS, and allows for easier geo-reference