Hi there
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.
Thank you
(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.
Relevant Docs:
WPILib Installation Guide â FIRST Robotics Competition documentation
Visual Studio Code Basics and the WPILib Extension â FIRST Robotics Competition documentation
Importing an Eclipse project into VS Code â FIRST Robotics Competition documentation (wpilib.org)
WPILib Commands in Visual Studio Code â FIRST Robotics Competition documentation
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
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.