Skip to content
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

Merged
merged 1 commit into from
Nov 16, 2023
Merged

AP_Mount: set clock on SIYI #25543

merged 1 commit into from
Nov 16, 2023

Conversation

tridge
Copy link
Contributor

@tridge tridge commented Nov 15, 2023

this means photos on microSD have correct date, based on time we get from GPS, and allows for easier geo-reference

Copy link
Contributor

@rmackay9 rmackay9 left a 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.

@tridge
Copy link
Contributor Author

tridge commented Nov 15, 2023

I think it would be better to move this down below the "request firmware" section.

thanks, done.
I left in the "5 times" code as we have no way to validate this pkt has gotten through, and it will be annoying if users sometimes get back timestamps on photos

@@ -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) {
Copy link
Contributor

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.

Copy link
Contributor

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.

@tridge tridge removed the DevCallEU label Nov 15, 2023
this means photos on microSD have correct date
@tridge tridge merged commit 7472f76 into ArduPilot:master Nov 16, 2023
86 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Pending
Development

Successfully merging this pull request may close these issues.

2 participants