mirror of
https://github.com/PhotonVision/photonvision
synced 2026-07-01 02:41:42 +00:00
change verifyversion to use member variable
This commit is contained in:
@@ -189,7 +189,9 @@ std::optional<cv::Mat> PhotonCamera::GetDistCoeffs() {
|
||||
}
|
||||
|
||||
void PhotonCamera::VerifyVersion() {
|
||||
if (!PhotonCamera::VERSION_CHECK_ENABLED) return;
|
||||
if (!versionCheckEnabled) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ((frc::Timer::GetFPGATimestamp() - lastVersionCheckTime) <
|
||||
VERSION_CHECK_INTERVAL)
|
||||
|
||||
@@ -153,7 +153,7 @@ class PhotonCamera {
|
||||
std::optional<cv::Mat> GetDistCoeffs();
|
||||
|
||||
inline static void SetVersionCheckEnabled(bool enabled) {
|
||||
PhotonCamera::VERSION_CHECK_ENABLED = enabled;
|
||||
versionCheckEnabled = enabled;
|
||||
}
|
||||
|
||||
std::shared_ptr<nt::NetworkTable> 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();
|
||||
|
||||
Reference in New Issue
Block a user