The limelight Case Study: DEEP SPACE 2019 example uses TimedRobot. Would I be able to use the same exact code except in IterativeRobot without making any changes?
Technically, yes, but why would you want to use IterativeRobot since TimedRobot is objectively better?
It should be the same, but I wouldn’t recommend iterative as it is deprecated and even recommended by first to switch to timed robot instead.
Would I be able to transfer all of our current code into TimedRobot without a problem just doing copy and paste into the different sections?
Unless you are doing something super fancy, I would think so.
All of our code was written before TimedRobot came out. Is it better to move the vision into iterative or move all the code into timed?
Alright. Thanks y’all
I would move your code into TimedRobot.
From what I’m aware, the main change was that the loop timing was changed from driver station update packets to a timer run on the Rio. Making the code timing more consistent and reliable.
Just to make sure I don’t mess something up, I would just make a new project using TimedRobot and then copy and paste the old sections of code into the new project ex. The robotinit into the new robotinit.
You can just literally replace the mentions of IterativeRobot in your code with TimedRobot. No need to create a new project for a trivial change.
Out of curiosity, since you state that your code is at least 2 years old and your team is doing pretty well this season, where is your code?
What do you mean?
I’m not following…
I mean, I’m just personally curious as to what goes into winning robots programming wise.
But yes, if you are reusing code from previous years without making it publicly available, this is a violation of R16.
Just to clarify. We do not use exact code from previous years. We still make new projects every year (to stay within the rules as we have never been successful in installing a github) but we reference code from previous years to guide us when writing the new code. When that first code was written, there was no TimedRobot and we had no idea what that was when it came out so we used what we were used to. That’s what I mean by our code being from before TimedRobot was released. We just never made the switch.
So to summarize:
There is no reason the Limelight wouldn’t work with IterativeRobot.
TimedRobot is better than IterativeRobot, so you might as well switch to TimedRobot.
You can switch to TimedRobot just by changing all instances of IterativeRobot in your program to TimedRobot (there shouldn’t be any reason why you’d have to start a new project).
If you’re reusing code in part or in whole from a previous season, you should post that old code online according R16. Writing new code with reference to previous code is a gray area, and IMO the test to determine whether you’d have to post the old code is something similar to determining whether a piece of code is copyrighted. That is, copying algorithms or structural components is okay without releasing old source code, but copying small or large portions line for line is not. That’s my interpretation at least.
(Editorial note: I seriously don’t understand why teams are adverse to posting code online, especially those who aren’t the best of the best. We do all of our development publicly.)