I was wondering if anyone could tell me the best way to move code written in WPILIB to Eclipse on a different computer?
The team got a new computer and we are trying to move it.
(sorry if this does not make sense, I know nothing about programming)
First question to ask your programmer: Is the code on GitHub/hosted somewhere? If not, take the project folder and put in on a USB to move it over and it should work. If it is on GitHub/hosted somewhere, you can just clone the project from GitHub/download it from wherever it is hosted.
Second more important question: Why Eclipse? VS Code (to my knowledge) is strongly recommended over Eclipse with extension support and more. If you installed WPILib on this new computer (as you would want to), you should already have FRC VS Code installed.
Large issue on our team: We do not have a programmer this year we only have some new members we are trying to teach.
Is there a way we can tell if the code is on Github or hosted somewhere?
(Thank you or the advice on using VS instead we will do that :). )
Look in the top directory of the code and see if there is a directory called “.git” (period at the front). If so, the Git repository is listed in “.git/config”, which is a text file. If there is not “.git” directory, it is probably not checked in.
If I could recommend an approach, since you are (mostly) starting from scratch:
- copy all the files you can to a folder on a USB drive. This, for now, is your “archive” of the past work. Guard this USB drive with your life.
- Start to go through some of the introductory material. You want to be sure you have as good of an understanding as to how to program a robot without the previous code first.
- Then, start a new robot project following the “known-good-paths” that @mdurrani834 pointed out above. There’s also some docs out there on using Git
- Finally, and most importantly: Treat the previous year’s code as a reference for how you do stuff this year, but not the ultimate source of truth as to how the robot should work. While you won’t have the background to know why everything was done the way it was, you’ll at least want to be sure you understand what it does before you roll it into your new codebase.
What I’m recommending you avoid: you don’t want to be simultaneously learning “How to do software” and also “debug why last year’s code doesn’t work”. Try to separate those out as much as possible. It’s gonna be rough if you’re not entirely sure what the old code does, and don’t have the tools to figure it out.
Granted, time is probably the main constraint. I say all this assuming you’ve still got a few months of dedicated time to do the ramp up. If you’re really really crunched for time, well… eeh. Compromise!
Thank you very much we still have time
oh oki i see thank you