PhotonVision / photonvision

PhotonVision is the free, fast, and easy-to-use computer vision solution for the FIRST Robotics Competition.
https://photonvision.org
GNU General Public License v3.0
262 stars 166 forks source link

Revert "Warn when getBestCameraToTarget returns 0, 0, 0" #1351

Closed mcm001 closed 2 weeks ago

mcm001 commented 2 weeks ago

Reverts PhotonVision/photonvision#1334 . photon itself was calling into the HAL https://github.com/PhotonVision/photonvision/pull/1350/files#diff-4135f5230372b5a6cd4d1224d3f60dd9ec8a4aabc49c8b50f216de74deb4b1f3 which statically initializes the HAL in mode 0 (try if not initialized yet) https://github.com/wpilibsuite/allwpilib/blob/3a0ee5c9a7666e180383fc0d6eb11a89a6122547/wpilibj/src/main/java/edu/wpi/first/wpilibj/DriverStation.java#L421 which then restarts timing https://github.com/wpilibsuite/allwpilib/blob/3a0ee5c9a7666e180383fc0d6eb11a89a6122547/hal/src/main/native/sim/HAL.cpp#L362

Defering proper implementation due to the large quantity of shared code between photon-lib and actual code, and the difficulty of telling if we're on a rio or simulator or on a coprocessor running photon.