Sentient swerve (doesn't stop driving sometimes) pls help

we have decided to switch from 2 falcons for our swerve to a falcon for the drive motors and a neo for the angle motors since we have done that we have done that we have a problem that at random times while driving the swerve just doesn’t stop it just keep going to the direction it was traveling at and we aren’t able to stop it no matter what we have to disable and redeploy the code pls help

our repo: GitHub - primo4586/RobotCode2023: Our robot code for the 2023 FRC Season: CHARGED UP
swerve: https://github.com/primo4586/RobotCode2023/blob/dev/src/main/java/frc/robot/subsystems/Swerve.java
swerve module: https://github.com/primo4586/RobotCode2023/blob/dev/src/main/java/frc/robot/SwerveModule.java
drive command: https://github.com/primo4586/RobotCode2023/blob/dev/src/main/java/frc/robot/commands/TeleopSwerve.java

In your driver station, select the circled window mode and check the version number on the title bar. If it’s 23.0 you need to redownload FRC game tools.

image

Its 23.1 i have re-downloaded it a few days ago to see if that maybbe the problem

Another thing worth checking is that your joystick is giving the correct values. I recently wasted far more time than I’d care to admit looking for code bugs, when it turned out to be a faulty joystick.

1 Like

Happened to us at a regional this year. Frantically checking code for a half hour before our next match and sure enough when we check driver station: our joystick thinks it’s at 80 percent output at all times when no input was being given. Relieved but frustrated at the same time

we have found the problem it was high can utilization

1 Like

How is this fixed? We are having a similar issue

The easiest way is to get a canivor.

If like us you can’t you can try lowering the status frames of the motor controller’s and such we have found that the spark Max’s were the biggest user of the can and you can set them so that they won’t send status frames periodically only when called and that lowered the can usage by like 10 percent for 4 motors

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.