[hal,wpilib] Rename FPGA clock to monotonic clock (#8672)

- Remove status return from HAL level (clock getting should never fail)
- Remove 32-bit timestamp expand function
- Make monotonic_clock.hpp (formerly fpga_clock.hpp) header-only and
move to root hal include directory
This commit is contained in:
Peter Johnson
2026-03-15 15:08:41 -07:00
committed by GitHub
parent 1a5b023235
commit e944ae9aca
59 changed files with 233 additions and 358 deletions

View File

@@ -280,10 +280,9 @@ class WPILIB_DLLEXPORT PoseEstimator {
* camera.
* @param timestamp The timestamp of the vision measurement in seconds. Note
* that if you don't use your own time source by calling UpdateWithTime(),
* then you must use a timestamp with an epoch since FPGA startup (i.e.,
* the epoch of this timestamp is the same epoch as
* wpi::math::Timer::GetTimestamp(). This means that you should use
* wpi::math::Timer::GetTimestamp() as your time source in this case.
* then you must use a timestamp with the same epoch as
* wpi::Timer::GetMonotonicTimestamp(). This means that you should use
* wpi::Timer::GetMonotonicTimestamp() as your time source in this case.
*/
void AddVisionMeasurement(const Pose2d& visionRobotPose,
wpi::units::second_t timestamp) {
@@ -365,10 +364,9 @@ class WPILIB_DLLEXPORT PoseEstimator {
* camera.
* @param timestamp The timestamp of the vision measurement in seconds. Note
* that if you don't use your own time source by calling UpdateWithTime(),
* then you must use a timestamp with an epoch since FPGA startup (i.e.,
* the epoch of this timestamp is the same epoch as
* wpi::math::Timer::GetTimestamp(). This means that you should use
* wpi::math::Timer::GetTimestamp() as your time source in this case.
* then you must use a timestamp with the same epoch as
* wpi::Timer::GetMonotonicTimestamp(). This means that you should use
* wpi::Timer::GetMonotonicTimestamp() as your time source in this case.
* @param visionMeasurementStdDevs Standard deviations of the vision pose
* measurement (x position in meters, y position in meters, and heading in
* radians). Increase these numbers to trust the vision pose measurement

View File

@@ -288,10 +288,9 @@ class WPILIB_DLLEXPORT PoseEstimator3d {
* camera.
* @param timestamp The timestamp of the vision measurement in seconds. Note
* that if you don't use your own time source by calling UpdateWithTime(),
* then you must use a timestamp with an epoch since FPGA startup (i.e.,
* the epoch of this timestamp is the same epoch as
* wpi::math::Timer::GetFPGATimestamp(). This means that you should use
* wpi::math::Timer::GetFPGATimestamp() as your time source in this case.
* then you must use a timestamp with the same epoch as
* wpi::Timer::GetMonotonicTimestamp(). This means that you should use
* wpi::Timer::GetMonotonicTimestamp() as your time source in this case.
*/
void AddVisionMeasurement(const Pose3d& visionRobotPose,
wpi::units::second_t timestamp) {
@@ -379,10 +378,9 @@ class WPILIB_DLLEXPORT PoseEstimator3d {
* camera.
* @param timestamp The timestamp of the vision measurement in seconds. Note
* that if you don't use your own time source by calling UpdateWithTime(),
* then you must use a timestamp with an epoch since FPGA startup (i.e.,
* the epoch of this timestamp is the same epoch as
* wpi::math::Timer::GetFPGATimestamp(). This means that you should use
* wpi::math::Timer::GetFPGATimestamp() as your time source in this case.
* then you must use a timestamp with the same epoch as
* wpi::Timer::GetMonotonicTimestamp(). This means that you should use
* wpi::Timer::GetMonotonicTimestamp() as your time source in this case.
* @param visionMeasurementStdDevs Standard deviations of the vision pose
* measurement (x position in meters, y position in meters, and heading in
* radians). Increase these numbers to trust the vision pose measurement