[examples] Enable NT Flush in Field2d examples (#3013)

This commit is contained in:
Prateek Machiraju
2020-12-30 19:12:15 -05:00
committed by GitHub
parent 78b542737a
commit 8651aa73e8
4 changed files with 17 additions and 1 deletions

View File

@@ -33,6 +33,10 @@ public class Robot extends TimedRobot {
@Override
public void robotInit() {
// Flush NetworkTables every loop. This ensures that robot pose and other values
// are sent during every iteration.
setNetworkTablesFlushEnabled(true);
m_trajectory =
TrajectoryGenerator.generateTrajectory(
new Pose2d(2, 2, new Rotation2d()),

View File

@@ -26,6 +26,10 @@ public class Robot extends TimedRobot {
// Instantiate our RobotContainer. This will perform all our button bindings, and put our
// autonomous chooser on the dashboard.
m_robotContainer = new RobotContainer();
// Flush NetworkTables every loop. This ensures that robot pose and other values
// are sent during every loop iteration.
setNetworkTablesFlushEnabled(true);
}
@Override