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:
@@ -245,7 +245,7 @@ public class Drivetrain {
|
||||
|
||||
// Apply vision measurements. For simulation purposes only, we don't input a latency delay -- on
|
||||
// a real robot, this must be calculated based either on known latency or timestamps.
|
||||
m_poseEstimator.addVisionMeasurement(visionMeasurement2d, Timer.getFPGATimestamp());
|
||||
m_poseEstimator.addVisionMeasurement(visionMeasurement2d, Timer.getTimestamp());
|
||||
}
|
||||
|
||||
/** This function is called periodically during simulation. */
|
||||
|
||||
@@ -167,6 +167,6 @@ public class Drivetrain {
|
||||
m_poseEstimator.addVisionMeasurement(
|
||||
ExampleGlobalMeasurementSensor.getEstimatedGlobalPose(
|
||||
m_poseEstimator.getEstimatedPosition()),
|
||||
Timer.getFPGATimestamp() - 0.3);
|
||||
Timer.getTimestamp() - 0.3);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -99,6 +99,6 @@ public class Drivetrain {
|
||||
m_poseEstimator.addVisionMeasurement(
|
||||
ExampleGlobalMeasurementSensor.getEstimatedGlobalPose(
|
||||
m_poseEstimator.getEstimatedPosition()),
|
||||
Timer.getFPGATimestamp() - 0.3);
|
||||
Timer.getTimestamp() - 0.3);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user