Skip to content

Commit

Permalink
Fix naming
Browse files Browse the repository at this point in the history
  • Loading branch information
mcm001 committed May 5, 2024
1 parent ea52759 commit 4b7a662
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion photon-lib/src/main/native/cpp/photon/PhotonCamera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ PhotonCamera::PhotonCamera(nt::NetworkTableInstance instance,
PhotonCamera::PhotonCamera(const std::string_view cameraName)
: PhotonCamera(nt::NetworkTableInstance::GetDefault(), cameraName) {}

std::vector<PhotonPipelineResult> PhotonCamera::GetAllUnreadResult() {
std::vector<PhotonPipelineResult> PhotonCamera::GetAllUnreadResults() {
if (test) {
return testResult;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ std::optional<EstimatedRobotPose> PhotonPoseEstimator::Update() {
return std::nullopt;
}

auto results = camera->GetAllUnreadResult();
auto results = camera->GetAllUnreadResults();

std::optional<EstimatedRobotPose> ret;

Expand Down
10 changes: 5 additions & 5 deletions photon-lib/src/main/native/include/photon/PhotonCamera.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,18 +79,18 @@ class PhotonCamera {

/**
* The list of pipeline results sent by PhotonVision since the last call to
* GetAllUnreadResult(). Calling this function clears the internal FIFO queue,
* and multiple calls to GetAllUnreadResult() will return different
* GetAllUnreadResults(). Calling this function clears the internal FIFO queue,
* and multiple calls to GetAllUnreadResults() will return different
* (potentially empty) result arrays. Be careful to call this exactly ONCE per
* loop of your robot code! FIFO depth is limited to 20 changes, so make sure
* to call this frequently enough to avoid old results being discarded, too!
*/
std::vector<PhotonPipelineResult> GetAllUnreadResult();
std::vector<PhotonPipelineResult> GetAllUnreadResults();

[[deprecated(
"Replace with GetAllUnreadResult")]] inline const PhotonPipelineResult
"Replace with GetAllUnreadResults")]] inline const PhotonPipelineResult
GetLatestResult() {
const auto ret = GetAllUnreadResult();
const auto ret = GetAllUnreadResults();
if (!ret.size()) return PhotonPipelineResult();
return ret.back();
}
Expand Down

0 comments on commit 4b7a662

Please sign in to comment.