Trying to get swerve working with a Duty Cycle Encoder as the absolute encoder. Absolute values are coming into the dashboard as expected, but the wheels are never set to the correct value. If you restart the robot code, they get a slightly different value every time. Can’t seem to pinpoint what is causing this.
Seems like the program would be using the relative values vs the absolute, but not sure. Any advice is appreciated.
Needed to add delay in setting absolute value:
new Thread(() -> {
try {
Thread.sleep(3000);
resetModulesToAbsolute();
SmartDashboard.putBoolean("True",true);
}catch (Exception e) {
}
}).start();
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.