Store the last pose on update (#1207)

* Store the last pose on update

* Don't clear lastPose if pose isn't calculated

---------

Co-authored-by: Mohammad Durrani <46766905+mdurrani808@users.noreply.github.com>
This commit is contained in:
Tim Winters
2024-02-05 09:50:36 -05:00
committed by GitHub
parent 7666f152bb
commit 0eb0a4e3c5
2 changed files with 5 additions and 2 deletions

View File

@@ -186,6 +186,9 @@ std::optional<EstimatedRobotPose> PhotonPoseEstimator::Update(
ret = std::nullopt;
}
if (ret) {
lastPose = ret.value().estimatedPose;
}
return ret;
}