alpha 7 - #2566
Conversation
096280e to
bf6bdb0
Compare
This comment was marked as resolved.
This comment was marked as resolved.
6ff2c64 to
486aae9
Compare
Signed-off-by: samfreund <samf.236@proton.me>
| * field layout, or cannot be parsed. This way a {@code null} return is never used to signal | ||
| * failure; callers that detect a migration simply persist the result and parse it. |
There was a problem hiding this comment.
"This way a {@code null} return is never used to signal failure; callers that detect a migration simply persist the result and parse it."
I'm having trouble parsing this sentence -- help me deslop?
There was a problem hiding this comment.
Doing it this way means we don't have to write a bunch of null check boilerplate. See SQLConfigProvider line 315 or thereabouts, we just check if the migrated string is the same or not instead of having a bunch of null checks and then checking for changes etc.
|
|
||
| @Test | ||
| public void testMigrateOldFieldLayout() { | ||
| // exact serialization format produced by the old AprilTagFieldLayout |
There was a problem hiding this comment.
we can actually check in a copy of https://github.com/wpilibsuite/allwpilib/blob/2026/fieldImages/src/main/native/resources/edu/wpi/first/fields/2026-rebuilt.json instead
| processedMat, | ||
| type, | ||
| MathUtils.wpiNanoTime() - latency, | ||
| NetworkTablesJNI.now() - latency, |
There was a problem hiding this comment.
Just a general note we should double check latency measurements remain sane to catch any obvious unit conversion errors on all our supported platforms + also intentionally run a TSP client and server with out of sync clocks to verify the E2E latency stays ~the same
| } | ||
|
|
||
| @Test | ||
| public void testMigrateNewFieldLayoutUnchanged() { |
There was a problem hiding this comment.
I know that migrateFieldLayoutJson uses "unchanged" to mean "it's already correct". Is there another data structure that can more explicitly encode that?
|
|
||
| void PhotonCamera::CheckTimeSyncOrWarn(photon::PhotonPipelineResult& result) { | ||
| if (result.metadata.timeSinceLastPong > 5L * 1000000L) { | ||
| if (result.metadata.timeSinceLastPong > INT64_C(5) * 1000000000L) { |
There was a problem hiding this comment.
Maybe 2027 is the year we make timeSinceLastPong a unit type. This INT64_C() * MAGIC CONSTANT thing is gross
There was a problem hiding this comment.
up to you matt, but I'd ask for a separate PR
c2180b2 to
1654691
Compare
Signed-off-by: samfreund <samf.236@proton.me>
Signed-off-by: samfreund <samf.236@proton.me>
Signed-off-by: samfreund <samf.236@proton.me>
Signed-off-by: samfreund <samf.236@proton.me>
No description provided.