mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-19 00:41:41 +00:00
Cache pose calculations in PhotonPoseEstimator (#788)
* Add pose caching to Java * Refactor strategy fallthrough * Hopefully add pose caching to C++ * Make Java switch same order as enum and C++ switch * C++ absolute value in timestamp check * Fix Java NPE * Use `units::second_t` in timestamp Co-authored-by: Matt <matthew.morley.ca@gmail.com> * Expand Java unit test * Copy comments into C++ * Add tests to C++ * Run format * Update PhotonCamera.cpp * Probably fix bad access exception * a * init timestamp * Remove prints --------- Co-authored-by: Matt <matthew.morley.ca@gmail.com> Co-authored-by: Joseph Eng <joseng2358@gmail.com>
This commit is contained in:
@@ -74,7 +74,10 @@ PhotonCamera::PhotonCamera(const std::string_view cameraName)
|
||||
: PhotonCamera(nt::NetworkTableInstance::GetDefault(), cameraName) {}
|
||||
|
||||
PhotonPipelineResult PhotonCamera::GetLatestResult() {
|
||||
if (test) return testResult;
|
||||
if (test) {
|
||||
return testResult;
|
||||
}
|
||||
|
||||
// Prints warning if not connected
|
||||
VerifyVersion();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user