No code, idk why

hi, our code was working fine before someone decided to go ahead and mess it all up with out us knowing

here is our code

yeah for some reason it won’t detect code now, i’ve looked into the reasons and why they happen, analyzed all the code, still nothing

if someone could help me out, id love you forever
no homo

thank you!!!

What error are you getting? You can see the error in the console in the Driver Station.

ERROR  -44021  Resetting robot TCP CommsFRC: The size of the LED Color Array does not match the String Length.  Driver Station 
ERROR  -44021  Resetting robot TCP CommsFRC: The size of the LED Color Array does not match the String Length.  Driver Station

Are there any specific lines in the code referenced in the error traceback?

well, it keeps coming up with this error afterwards and its like the same warning but like a million of them

at frc.robot.subsystems.ColorMatch.(ColorMatch.java:32)

thats literally all it says and like theres a million of them

Do you have a riolog terminal that you can run, and not just driver station’s error messaging? What I’m trying to get at here is if there’s a type of error message before the million location messages…

Line 32 in ColorMatch.java is
private final ColorMatch m_colorMatcher = new ColorMatch();
Creating a ColorMatch object inside your color match class is probably recursive in a bad way, which is why the error is showing up a million times as it keeps trying to create an object of itself with ITSELF already inside. I hate recursion, its a headache lol. I don’t know how it would relate to an LED array error, but maybe take that line out to see what it would fix? Hope this helps!

1 Like

Your issue is that you aren’t using the rev ColorMatch class, you’re using your own which leads to recursion which overflows the memory and causes the error. To fix this you need to add
import com.revrobotics.ColorMatch;
Since your class has the same name, either set the type of m_colorMatcher to com.revrobotics.ColorMatch fully written out or rename your class

3 Likes

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