- [CAN SPARK] IDs: 60, Error Invalid Cannot set motor type to kBrushed for SPARK without a dock connected.
This error occurs for all the brushed motors. What does this mean?
This error occurs for all the brushed motors. What does this mean?
Can you share a bit more context with what you’re trying to accomplish? Sharing your code would greatly help us identify your problem.
Dock seems like a term used with the Spark Flex motor controllers, are you using a Vortex and trying to set it as brushed? Or is this a spark flex without the dock attached connected to a brushed motor? Or is it a spark Max?
When docked to an adapter, the SPARK Flex can control any existing NEO or compatible brushless/brushed DC motor.
Agree with others we need more information though, also it may be worth reaching out to Rev if it is for the newer controllers as the community is less familiar with the Flexs
The line throwing an error is just:
private final CANSparkMax rollerMotor = new CANSparkMax(
ScoringConstants.rollerMotorPort, MotorType.kBrushed);
The motor in question is brushed. The SparkMax is set to brushed (verified through the hardware client). The most puzzling part of this is that the issue periodically fixes itself at seemingly random. However the error reappears after a little while, and nothing relating to the motor has been changed.
It is a CANSparkMax connected to a brushed motor.
Are you using CANSparkLowLevel.MotorType
or CANSparkMaxLowLevel.MotorType
? The latter is deprecated.
https://codedocs.revrobotics.com/java/com/revrobotics/cansparkmax
I am using the former. The only difference between the SparkMax’s that are working and the ones that aren’t, is that the latters are brushed and the formers are brushless.
Is it possible to share your entire project with us? A couple things to check:
Do the easy checks first - have only one motor on the CAN bus at a time and verify all ids are unique (not two or more 60, for sure) and the motor works or not if alone.