You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 15, 2021. It is now read-only.
Describe the bug
When a PID control mode has been running on the Spark Max controller, the PID cannot be stopped by setting the output to zero. See "Additional context" for a possible cause and solution.
Quick Glance Configuration
SnobotSimPlugin version 2020-0.0.1
SnobotSim version 2020-0.0.1
GradleRIO version 2020.2.2
Your Operating System: Linux 5.3.0 (Pop!_OS 19.10)
To Reproduce
Create a robot with a Spark Max controller.
Simulate the robot, and run the motor with closed-loop velocity or position control.
Try to stop outputting from the motor using CANSparkMax.set(0) on the motor controller.
Observe that the motor continues to output.
Expected behavior
Calling the CANSparkMax.set(0) function should cause the motor to stop outputting. I have confirmed that this is what the real hardware does.
Additional context
I belive the problem is in RevManager.java:48. I think the issue is that set does not update mControlType. Changing set to setRawGoal should fix this.
What version of rev do are you using? I just noticed today that CTRE added super simple set() / get() stuff for the wpilib simulator in 5.17.6, REV might have done the same. I'm fixing CTRE right now
Describe the bug
When a PID control mode has been running on the Spark Max controller, the PID cannot be stopped by setting the output to zero. See "Additional context" for a possible cause and solution.
Quick Glance Configuration
To Reproduce
Expected behavior
Calling the CANSparkMax.set(0) function should cause the motor to stop outputting. I have confirmed that this is what the real hardware does.
Additional context
I belive the problem is in RevManager.java:48. I think the issue is that
set
does not update mControlType. Changingset
tosetRawGoal
should fix this.I haven't tested this, but it looks like there might be a similar problem in the CTRE motor controllers as well: CtreManager:72, CtreManager:92, CtreManager:132
The text was updated successfully, but these errors were encountered: