diff --git a/photon-lib/src/main/native/cpp/photon/PhotonCamera.cpp b/photon-lib/src/main/native/cpp/photon/PhotonCamera.cpp index 47be45075..407dc7c10 100644 --- a/photon-lib/src/main/native/cpp/photon/PhotonCamera.cpp +++ b/photon-lib/src/main/native/cpp/photon/PhotonCamera.cpp @@ -189,7 +189,9 @@ std::optional PhotonCamera::GetDistCoeffs() { } void PhotonCamera::VerifyVersion() { - if (!PhotonCamera::VERSION_CHECK_ENABLED) return; + if (!versionCheckEnabled) { + return; + } if ((frc::Timer::GetFPGATimestamp() - lastVersionCheckTime) < VERSION_CHECK_INTERVAL) diff --git a/photon-lib/src/main/native/include/photon/PhotonCamera.h b/photon-lib/src/main/native/include/photon/PhotonCamera.h index 6d29754bf..eb1d1b5ff 100644 --- a/photon-lib/src/main/native/include/photon/PhotonCamera.h +++ b/photon-lib/src/main/native/include/photon/PhotonCamera.h @@ -153,7 +153,7 @@ class PhotonCamera { std::optional GetDistCoeffs(); inline static void SetVersionCheckEnabled(bool enabled) { - PhotonCamera::VERSION_CHECK_ENABLED = enabled; + versionCheckEnabled = enabled; } std::shared_ptr GetCameraTable() const { return rootTable; } @@ -192,7 +192,7 @@ class PhotonCamera { private: units::second_t lastVersionCheckTime = 0_s; - inline static bool VERSION_CHECK_ENABLED = true; + bool versionCheckEnabled = true; inline static int InstanceCount = 0; void VerifyVersion();