mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
[wpilib] Add timestamp getters with configurable time base (#7378)
This commit is contained in:
@@ -106,7 +106,7 @@ void Drivetrain::UpdateOdometry() {
|
||||
// latency delay -- on a real robot, this must be calculated based either on
|
||||
// known latency or timestamps.
|
||||
m_poseEstimator.AddVisionMeasurement(visionMeasurement2d,
|
||||
frc::Timer::GetFPGATimestamp());
|
||||
frc::Timer::GetTimestamp());
|
||||
}
|
||||
|
||||
void Drivetrain::SimulationPeriodic() {
|
||||
|
||||
@@ -67,5 +67,5 @@ void Drivetrain::UpdateOdometry() {
|
||||
m_poseEstimator.AddVisionMeasurement(
|
||||
ExampleGlobalMeasurementSensor::GetEstimatedGlobalPose(
|
||||
m_poseEstimator.GetEstimatedPosition()),
|
||||
frc::Timer::GetFPGATimestamp() - 0.3_s);
|
||||
frc::Timer::GetTimestamp() - 0.3_s);
|
||||
}
|
||||
|
||||
@@ -41,5 +41,5 @@ void Drivetrain::UpdateOdometry() {
|
||||
m_poseEstimator.AddVisionMeasurement(
|
||||
ExampleGlobalMeasurementSensor::GetEstimatedGlobalPose(
|
||||
m_poseEstimator.GetEstimatedPosition()),
|
||||
frc::Timer::GetFPGATimestamp() - 0.3_s);
|
||||
frc::Timer::GetTimestamp() - 0.3_s);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user