docs(photon-targeting): correct PhotonPipelineMetadata timestamp Javadocs#2497
Closed
JosephTLockwood wants to merge 2 commits into
Closed
docs(photon-targeting): correct PhotonPipelineMetadata timestamp Javadocs#2497JosephTLockwood wants to merge 2 commits into
JosephTLockwood wants to merge 2 commits into
Conversation
…docs
The getCaptureTimestampMicros / getPublishTimestampMicros Javadocs
claim "coprocessor's time base", but NTDataPublisher applies the
TimeSyncClient offset to both values before publishing — the
on-wire value is in the Time Sync Server's nt::Now timebase, not
the coprocessor's local clock.
The field-level comment at PhotonPipelineMetadata.java:25-26 already
states the correct timebase ("wpi::nt::Now on the time sync server").
This commit aligns the getter Javadocs (which users see in IDE
autocomplete and online API docs) with that truth.
The Python per-field comment carried the same misleading prose;
updated to match.
No code or behavior change.
…stampMicros Javadoc Spotless (google-java-format) rejected the prior wrap because the first line fell under the 100-col target — its preferred split lands "time base" on line 1 and "real robot." on line 2. CI Java Formatting job failed on this file only. Pure whitespace reflow; identical wording.
4 tasks
Contributor
|
Let's pull this fix into #2496 instead |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The getter Javadocs on
PhotonPipelineMetadataclaim the timestamp fields are in the coprocessor's time base, but that's not what's on the wire:NTDataPublisher.java:200-211 adds the
TimeSyncClientoffset to both values before publishing, with the in-line comment "Transform the metadata timestamps from the local wpi::nt::Now timebase to the Time Sync Server's timebase". The field-level comment at PhotonPipelineMetadata.java:25-26 already correctly says "The timebase iswpi::nt::Nowon the time sync server."So the field-level prose is right; the getter Javadocs (which users actually see in IDE autocomplete + online API docs) are stale. A user trusting the getter docs would build the wrong FPGA conversion on the robot side.
Fix
Aligns the two getter Javadocs with the field-level truth. Same fix for the equivalent per-field comment in the Python port (photonPipelineResult.py:13-15).
No code, behavior, or test changes.
Test plan
Related
getTimestampSeconds()Javadocs to say "Time Sync Server's time base" — this PR makes the field-level getter Javadocs match. Either PR can land first; they're independent.