Skip to content

docs(photon-targeting): correct PhotonPipelineMetadata timestamp Javadocs#2497

Closed
JosephTLockwood wants to merge 2 commits into
PhotonVision:mainfrom
JosephTLockwood:docs/capture-timestamp-timebase
Closed

docs(photon-targeting): correct PhotonPipelineMetadata timestamp Javadocs#2497
JosephTLockwood wants to merge 2 commits into
PhotonVision:mainfrom
JosephTLockwood:docs/capture-timestamp-timebase

Conversation

@JosephTLockwood

Copy link
Copy Markdown
Contributor

Summary

The getter Javadocs on PhotonPipelineMetadata claim 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 TimeSyncClient offset 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 is wpi::nt::Now on 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

  • Documentation-only — no build risk

Related

…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.
@JosephTLockwood JosephTLockwood requested a review from a team as a code owner May 17, 2026 01:19
@github-actions github-actions Bot added the photonlib Things related to the PhotonVision library label May 17, 2026
@samfreund

Copy link
Copy Markdown
Member

…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.
@mcm001

mcm001 commented May 19, 2026

Copy link
Copy Markdown
Contributor

Let's pull this fix into #2496 instead

@mcm001 mcm001 closed this May 19, 2026
@JosephTLockwood JosephTLockwood deleted the docs/capture-timestamp-timebase branch May 21, 2026 06:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

photonlib Things related to the PhotonVision library

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants