Closed mcm001 closed 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.
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.