[photon-lib java] Implement ProtobufSerializable (#1156)

* [photon-lib java] Fix classes with protobuf support not "announcing it"

Since they didn't implement `ProtobufSerializable` this meant that most other software didn't even know protobufs were even implemented.
In AdvantageKit for example this would cause it to not work it all and crash.

* Run `spotlessJavaApply`
This commit is contained in:
ArchB1W
2024-01-13 22:35:57 -05:00
committed by GitHub
parent 6917ec8401
commit b729d9e917
5 changed files with 10 additions and 5 deletions

View File

@@ -18,6 +18,7 @@
package org.photonvision.targeting;
import edu.wpi.first.math.geometry.Transform3d;
import edu.wpi.first.util.protobuf.ProtobufSerializable;
import java.util.ArrayList;
import java.util.List;
import org.photonvision.common.dataflow.structures.Packet;
@@ -25,7 +26,7 @@ import org.photonvision.common.dataflow.structures.PacketSerde;
import org.photonvision.targeting.proto.PhotonTrackedTargetProto;
import org.photonvision.utils.PacketUtils;
public class PhotonTrackedTarget {
public class PhotonTrackedTarget implements ProtobufSerializable {
private static final int MAX_CORNERS = 8;
private final double yaw;