mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-19 00:41:41 +00:00
Remove strict WPILib version requirement (#2307)
This commit is contained in:
@@ -29,7 +29,6 @@
|
||||
#include <string_view>
|
||||
#include <vector>
|
||||
|
||||
#include <WPILibVersion.h>
|
||||
#include <frc/Errors.h>
|
||||
#include <frc/RobotController.h>
|
||||
#include <frc/Timer.h>
|
||||
@@ -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 =
|
||||
|
||||
Reference in New Issue
Block a user