Spark Max PID Parameters Not Programming

Last event we had a problem where the Spark Max programmed PID values weren’t being used. This leads to a slow pregame, where we need to wait for connection and then manually input the values through our SmartDashboard debug interface. Without the values, our lift position control oscillates. Yes we have made code changes, but not seeing where it effects the motor controller PID programming.

We did not have the problem in the first two events. We do similar PID programming for velocity control for our drive subsystem, which doesn’t seem to be effected.

Our latest code is on github (https://github.com/Team2959/2019DeepSpaceRobotProject) in our “Climb-Branch” branch. (This is a C++ command based program. LiftAndShuttleSubsystem contains the SparkMax motor controller code. There are also common functions in the utilities directory in the file MotorControllerHelper for setup and SmartDashboard interaction.)

I will be doing a diff again between our master branch (one that worked at Shepherd event) and the climb branch (not holding the PIDs at Forrest Hills).

Things already done:

  • Commented out the reset to factory defaults when initializing the motor and PID values
  • Move the initial motor setup from RobotInit to construction (our drive system does the latter)

Any suggestions welcome! I would love not to have to worry about this during MI States competition.

Thank you for the help!
Kevin Russell
Software Mentor
FRC #2959 CW Tech Robotarians