I was attempting to test code for our limelight camera that we just finished writing, but once I built the code, it stayed as our code from last year on the robot. I then uninstalled and reinstalled the FRC Update Suite for this year, and made sure that I reimaged the RIO. Once I reimaged the RIO it says there is No Robot Code, and whenever I tried to build a project it is successful but still says there is no code. I have tried deploying the code both wirelessly and plugged in with a USB. I also tried deploying an example project but had the same results.
Have you checked the console output in the Driver Station? It’s likely there is an error there that’s causing the robot program to crash
My best guess without knowing the exact error is that you don’t have a JRE or native dependencies on the roboRIO, which you can deploy using:
./gradlew deployJreRoborio
./gradlew deployNativeLibsRoborio
./gradlew deployNativeZipRoborio
I just checked the console output, there are no errors appearing, and the only showing up are the warnings “44000 DS Disable Driver Station” and "Warning 44002 Ping Results: link-bad, DS radio(.4)-bad, robot radio(.1)-bad, roboRIO(.2)-GOOD, FMS-bad FRC: Driver Station ping status has changed. Driver Station " could those parts returning bad be a hardware issue?
I can try that but where exactly would I put that in. I was looking in the code and just wasn’t completely sure where those lines would go. Apologies if I’m missing something obvious with that.
Leave the VS Code window up and it should start a debug window type thing while still connected to the robot. Inside that console window you should see any errors that are generated by the robot code.
Alternately, if you’re using a previous year Rio, you need to flash the firmware on it to support 2019 code if you’re not already done so. I was able to attempt loading the robot code on an old rio setup for a practice bot and it went all kinds of sideways until I realized that was the issue.