mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
[ntcore] NetworkTables 4 (#3217)
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
|
||||
package edu.wpi.first.wpilibj.examples.shuffleboard;
|
||||
|
||||
import edu.wpi.first.networktables.NetworkTableEntry;
|
||||
import edu.wpi.first.networktables.GenericEntry;
|
||||
import edu.wpi.first.wpilibj.AnalogPotentiometer;
|
||||
import edu.wpi.first.wpilibj.Encoder;
|
||||
import edu.wpi.first.wpilibj.TimedRobot;
|
||||
@@ -22,7 +22,7 @@ public class Robot extends TimedRobot {
|
||||
|
||||
private final PWMSparkMax m_elevatorMotor = new PWMSparkMax(2);
|
||||
private final AnalogPotentiometer m_elevatorPot = new AnalogPotentiometer(0);
|
||||
private NetworkTableEntry m_maxSpeed;
|
||||
private GenericEntry m_maxSpeed;
|
||||
|
||||
@Override
|
||||
public void robotInit() {
|
||||
|
||||
@@ -32,10 +32,6 @@ 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()),
|
||||
|
||||
@@ -26,10 +26,6 @@ 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
|
||||
|
||||
Reference in New Issue
Block a user