Visual Code WPILib error

I have been struggling with the new addition of Visual Studio Code. I first had a problem with the CTRE libraries not installing properly, now the problem i’m having is that WPILib is not installing properly. I installed the latest version earlier which should be WPILib 2019.2.1, I have the roborio updated to image version 13, and I have all of the CTRE libraries installed correctly. I would really appreciate any insight on this if possible. These are the errors I was receiving.

If anyone could help that would be great and there are any questions that you need me to answer i will be more than willing to answer them.

Have you tried doing the Build Robot Code tasks and does that reveal anything different?

I have tried that multiple times and it gives the same errors that I recieved when I Deployed the code.

Is this your first time trying to deploy some code to the RoboRIO with VSCode?

yes :frowning:

If you have a repository on GitHub, mind if I could take a look at what you have going on?

I do not have a repository on Github, since I haven’t been able to figure out how to integrate Github into Visual Studio Code yet. Although, I can upload in just a minute.

If you download GIT then after download reload VSCode, you should be able to do CTRL + P (or View > Command Palette, then type in Git and a list of commands would show up. Otherwise take the easy way out and just use Github Desktop (not recommended but sometimes helpful to have).

Here is the link for the code.

Lines 69 and 70 are using variables that have not been declared nor initialized. That is problem number one.

Same with the motor setting lines:


rm, lm, rs, ls don’t appear to be in scope for that method. Also, those set methods have invalid syntax, they would need to read rm.Set( (2*v+w)/2 ); to be value for the call (I believe).

Those are C++ code errors. kLeftHand for example is part of the Joystick class so you need to qualify that with frc::Joystick::kLeftHand or similar.

Thank you I will try that and see what happens