Add version verification disable switch in photonlib (#437)

This commit is contained in:
Matt
2022-02-28 07:37:52 -05:00
committed by GitHub
parent 5655ca6890
commit 9090aa6bcc
5 changed files with 18 additions and 0 deletions

View File

@@ -45,6 +45,12 @@ public class PhotonCamera {
private final String path;
private static boolean VERSION_CHECK_ENABLED = true;
public static void setVersionCheckEnabled(boolean enabled) {
VERSION_CHECK_ENABLED = enabled;
}
Packet packet = new Packet(1);
/**
@@ -199,6 +205,8 @@ public class PhotonCamera {
}
private void verifyVersion() {
if (!VERSION_CHECK_ENABLED) return;
String versionString = versionEntry.getString("");
if (versionString.equals("")) {
DriverStation.reportError(