Vs code marking stuff for removal when it’s being used

We are trying to fix this issue of stuff being marked for removal in the code that we are using. Will this effect hoe it runs? Picture below

That is not what is says. It is telling you that “CANSparkMaxLowLevel.MotorType” has been deprecated, which means it will be removed next year. This is in fact correct; REV has deprecated that class.

A search of the docs will give you the fix and it is pretty easy:
https://codedocs.revrobotics.com/java/com/revrobotics/cansparkmaxlowlevel

1 Like

The displayed message ALSO says exactly what to do. (Just change the MotorType import)

1 Like

My team has the same problem, but even when we change the import, when we use the int, MotorType constructor, the message still says that it is deprecated. It says to instead use CANSparkLowLevel.MotorType, which is what we are doing?

Thats a documentation bug on their end. Use CANSparkLowLevel.MotorType.kBrushless

We are getting issues with idle mode

And issues with motor control group
image

And issues with phoenix 6
image

IdleMode moved to CANSparkBase (since both Max and Flex use it)

1 Like

I don’t encourage hijacking other threads for your own issues, but since we’re already here…

@Christopher149 already covered the IdleMode solution

MotorControllerGroup is gone. The replacement is to just set your motors to follow the primary in the group. (Noted under here: New for 2024 — FIRST Robotics Competition documentation)

Phoenix 6 is packaged under com.ctre.phoenix6: Overview (CTRE Phoenix 6 Java 24.2.0)

Thanks. Apologies for the breech of protocol. (I was fed this thread by CD as I was making my own, thought they wanted us to loop in).

Appreciate the IdleMode info for sure. Super easy fix. Good to know about the MotorControllerGroup… Now sorting out the sensors configuration issue…