mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-26 01:51:40 +00:00
Add sequence ID, capture, publish and recieve timestamp to PhotonPipelineResult (#1305)
Closes #1304
This commit is contained in:
@@ -180,7 +180,7 @@ class PacketTest {
|
||||
|
||||
@Test
|
||||
void pipelineResultSerde() {
|
||||
var ret1 = new PhotonPipelineResult(1, List.of());
|
||||
var ret1 = new PhotonPipelineResult(1, 2, 3, List.of());
|
||||
var p1 = new Packet(ret1.getPacketSize());
|
||||
PhotonPipelineResult.serde.pack(p1, ret1);
|
||||
var unpackedRet1 = PhotonPipelineResult.serde.unpack(p1);
|
||||
@@ -188,7 +188,9 @@ class PacketTest {
|
||||
|
||||
var ret2 =
|
||||
new PhotonPipelineResult(
|
||||
1,
|
||||
2,
|
||||
3,
|
||||
List.of(
|
||||
new PhotonTrackedTarget(
|
||||
3.0,
|
||||
@@ -235,7 +237,9 @@ class PacketTest {
|
||||
|
||||
var ret3 =
|
||||
new PhotonPipelineResult(
|
||||
2,
|
||||
3,
|
||||
4,
|
||||
5,
|
||||
List.of(
|
||||
new PhotonTrackedTarget(
|
||||
3.0,
|
||||
@@ -289,7 +293,9 @@ class PacketTest {
|
||||
public void testMultiTargetSerde() {
|
||||
var result =
|
||||
new PhotonPipelineResult(
|
||||
2,
|
||||
3,
|
||||
4,
|
||||
5,
|
||||
List.of(
|
||||
new PhotonTrackedTarget(
|
||||
3.0,
|
||||
|
||||
@@ -35,7 +35,9 @@ public class PhotonPipelineResultTest {
|
||||
|
||||
a =
|
||||
new PhotonPipelineResult(
|
||||
2,
|
||||
3,
|
||||
4,
|
||||
5,
|
||||
List.of(
|
||||
new PhotonTrackedTarget(
|
||||
3.0,
|
||||
@@ -77,7 +79,9 @@ public class PhotonPipelineResultTest {
|
||||
new TargetCorner(7, 8)))));
|
||||
b =
|
||||
new PhotonPipelineResult(
|
||||
2,
|
||||
3,
|
||||
4,
|
||||
5,
|
||||
List.of(
|
||||
new PhotonTrackedTarget(
|
||||
3.0,
|
||||
@@ -121,7 +125,9 @@ public class PhotonPipelineResultTest {
|
||||
|
||||
a =
|
||||
new PhotonPipelineResult(
|
||||
2,
|
||||
3,
|
||||
4,
|
||||
5,
|
||||
List.of(
|
||||
new PhotonTrackedTarget(
|
||||
3.0,
|
||||
@@ -167,7 +173,9 @@ public class PhotonPipelineResultTest {
|
||||
List.of(1, 2, 3)));
|
||||
b =
|
||||
new PhotonPipelineResult(
|
||||
2,
|
||||
3,
|
||||
4,
|
||||
5,
|
||||
List.of(
|
||||
new PhotonTrackedTarget(
|
||||
3.0,
|
||||
@@ -218,7 +226,9 @@ public class PhotonPipelineResultTest {
|
||||
public void inequalityTest() {
|
||||
var a =
|
||||
new PhotonPipelineResult(
|
||||
2,
|
||||
3,
|
||||
4,
|
||||
5,
|
||||
List.of(
|
||||
new PhotonTrackedTarget(
|
||||
3.0,
|
||||
@@ -260,7 +270,9 @@ public class PhotonPipelineResultTest {
|
||||
new TargetCorner(7, 8)))));
|
||||
var b =
|
||||
new PhotonPipelineResult(
|
||||
2,
|
||||
3,
|
||||
4,
|
||||
5,
|
||||
List.of(
|
||||
new PhotonTrackedTarget(
|
||||
7.0,
|
||||
@@ -304,7 +316,9 @@ public class PhotonPipelineResultTest {
|
||||
|
||||
a =
|
||||
new PhotonPipelineResult(
|
||||
2,
|
||||
3,
|
||||
4,
|
||||
5,
|
||||
List.of(
|
||||
new PhotonTrackedTarget(
|
||||
3.0,
|
||||
@@ -350,7 +364,9 @@ public class PhotonPipelineResultTest {
|
||||
List.of(3, 4, 7)));
|
||||
b =
|
||||
new PhotonPipelineResult(
|
||||
2,
|
||||
3,
|
||||
4,
|
||||
5,
|
||||
List.of(
|
||||
new PhotonTrackedTarget(
|
||||
3.0,
|
||||
|
||||
@@ -39,7 +39,9 @@ public class PhotonPipelineResultProtoTest {
|
||||
// non multitag result
|
||||
result =
|
||||
new PhotonPipelineResult(
|
||||
2,
|
||||
3,
|
||||
4,
|
||||
5,
|
||||
List.of(
|
||||
new PhotonTrackedTarget(
|
||||
3.0,
|
||||
@@ -87,7 +89,9 @@ public class PhotonPipelineResultProtoTest {
|
||||
// multitag result
|
||||
result =
|
||||
new PhotonPipelineResult(
|
||||
2,
|
||||
3,
|
||||
4,
|
||||
5,
|
||||
List.of(
|
||||
new PhotonTrackedTarget(
|
||||
3.0,
|
||||
|
||||
Reference in New Issue
Block a user