diff --git a/photon-lib/py/setup.py b/photon-lib/py/setup.py index 672b99147..b3b848740 100644 --- a/photon-lib/py/setup.py +++ b/photon-lib/py/setup.py @@ -58,11 +58,11 @@ setup( version=versionString, install_requires=[ "numpy~=2.3", - "wpilib==2026.2.1", - "robotpy-wpimath==2026.2.1", - "robotpy-apriltag==2026.2.1", - "robotpy-cscore==2026.2.1", - "pyntcore==2026.2.1", + "wpilib>=2026.2.1,<2027", + "robotpy-wpimath>=2026.2.1,<2027", + "robotpy-apriltag>=2026.2.1,<2027", + "robotpy-cscore>=2026.2.1,<2027", + "pyntcore>=2026.2.1,<2027", "opencv-python;platform_machine!='roborio'", ], description=descriptionStr, diff --git a/photon-lib/src/main/java/org/photonvision/PhotonCamera.java b/photon-lib/src/main/java/org/photonvision/PhotonCamera.java index 752b3f530..d548e17f0 100644 --- a/photon-lib/src/main/java/org/photonvision/PhotonCamera.java +++ b/photon-lib/src/main/java/org/photonvision/PhotonCamera.java @@ -45,7 +45,6 @@ import edu.wpi.first.wpilibj.Alert; import edu.wpi.first.wpilibj.Alert.AlertType; import edu.wpi.first.wpilibj.DriverStation; import edu.wpi.first.wpilibj.Timer; -import edu.wpi.first.wpilibj.util.WPILibVersion; import java.util.ArrayList; import java.util.Arrays; import java.util.List; @@ -189,50 +188,6 @@ public class PhotonCamera implements AutoCloseable { static void verifyDependencies() { // spotless:off - if (!WPILibVersion.Version.equals(PhotonVersion.wpilibTargetVersion)) { - String bfw = """ - - - - - >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\s - >>> !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\s - >>> \s - >>> You are running an incompatible version \s - >>> of PhotonVision ! \s - >>> \s - >>> PhotonLib """ - + PhotonVersion.versionString - + " is built for WPILib " - + PhotonVersion.wpilibTargetVersion - + "\n" - + ">>> but you are using WPILib " - + WPILibVersion.Version - + """ - \n>>> \s - >>> This is neither tested nor supported. \s - >>> You MUST update WPILib, PhotonLib, or both. - >>> Check `./gradlew dependencies` and ensure\s - >>> all mentions of OpenCV match the version \s - >>> that PhotonLib was built for. If you find a - >>> a mismatched version in a dependency, you\s - >>> must take steps to update the version of \s - >>> OpenCV used in that dependency. If you do\s - >>> not control that dependency and an updated\s - >>> version is not available, contact the \s - >>> developers of that dependency. \s - >>> \s - >>> Your code will now crash. \s - >>> We hope your day gets better. \s - >>> \s - >>> !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\s - >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\s - """; - - DriverStation.reportWarning(bfw, false); - DriverStation.reportError(bfw, false); - throw new UnsupportedOperationException(bfw); - } if (!Core.VERSION.equals(PhotonVersion.opencvTargetVersion)) { String bfw = """ diff --git a/photon-lib/src/main/native/cpp/photon/PhotonCamera.cpp b/photon-lib/src/main/native/cpp/photon/PhotonCamera.cpp index f9290467f..8d963244b 100644 --- a/photon-lib/src/main/native/cpp/photon/PhotonCamera.cpp +++ b/photon-lib/src/main/native/cpp/photon/PhotonCamera.cpp @@ -29,7 +29,6 @@ #include #include -#include #include #include #include @@ -47,48 +46,6 @@ static constexpr units::second_t WARN_DEBOUNCE_SEC = 5_s; static constexpr units::second_t HEARTBEAT_DEBOUNCE_SEC = 500_ms; inline void verifyDependencies() { - if (!(std::string_view{GetWPILibVersion()} == - std::string_view{photon::PhotonVersion::wpilibTargetVersion})) { - std::string bfw = - "\n\n\n\n\n" - ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n" - ">>> !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n" - ">>> \n" - ">>> You are running an incompatible version \n" - ">>> of PhotonVision ! \n" - ">>> \n" - ">>> PhotonLib "; - bfw += photon::PhotonVersion::versionString; - bfw += " is built for WPILib "; - bfw += photon::PhotonVersion::wpilibTargetVersion; - bfw += - "\n" - ">>> but you are using WPILib "; - bfw += GetWPILibVersion(); - bfw += - "\n>>> \n" - ">>> This is neither tested nor supported. \n" - ">>> You MUST update WPILib, PhotonLib, or both.\n" - ">>> Check `./gradlew dependencies` and ensure\n" - ">>> all mentions of WPILib match the version \n" - ">>> that PhotonLib was built for. If you find a" - ">>> a mismatched version in a dependency, you\n" - ">>> must take steps to update the version of \n" - ">>> WPILib used in that dependency. If you do\n" - ">>> not control that dependency and an updated\n" - ">>> version is not available, contact the \n" - ">>> developers of that dependency. \n" - ">>> \n" - ">>> Your code will now crash. \n" - ">>> We hope your day gets better. \n" - ">>> \n" - ">>> !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n" - ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n"; - - FRC_ReportWarning(bfw); - FRC_ReportError(frc::err::Error, bfw); - throw new std::runtime_error(std::string{bfw}); - } if (!(std::string_view{cv::getVersionString()} == std::string_view{photon::PhotonVersion::opencvTargetVersion})) { std::string bfw =