How do you simulate autonomous mode?

I still need to make a few changes to my autonomous code which may be a little tricky now that our robot has shipped but between now and the competition I would like to fine tune this code…

Is there a way to set up my MCC18 C compiler code and/or MPLAB to allow me to step through and simulate the autonomous code in MPLAB?

I recall in older versions of MPLAB (and at least for assembly code) that a person could get a sense of timing loop delays and I am wondering if this fature is also available with the C compiler code…

Please advise on how I can set this up…

Thank you

There is a built in simulator in MPLAB which will allow you to step through your code, but it’s not that easy to use. You have to hard code in values for any inputs since it can’t read them, because they’re obviously not attached. I don’t think it has an accurate time representation though.

Also, make sure that any code modification you do now is in your fix-it-windows. Now that ship date has passed, you are not allowed to modify code that will be used at competition aside from these windows.

To the best of my knowledge, there is no way to “simulate” the code operation and have it run just on a PC.

If you had last year’s FRC & OI, you could use that and run the code with a pretty simple setup.

BUT…keep in mind the rules regarding the “fix-it-window” and further work on the robot, as these rules DO include the software that runs on the robot. The rules to read are R19 & R22.

What is a “fix-it” window?

Is that the 5 hour time that we have the Thursday before the competition to modify the exisiting designs and only to fix what is broken?

My autonomous mode is broken, can I fix it then?

Please advise

Thanks

It’s defined in the manual, section 8 - The Robot:

FIX-IT-WINDOWS – Two 5-hour work periods following the deadline for shipping the ROBOT, or following the close of a regional competition, in which ALL teams may manufacture parts in preparation for future competitions. During the FIX-IT WINDOWS, software for either the ROBOT or Operator Interface may be developed without restriction. The FIX-IT WINDOWS are limited to single continuous time periods with a maximum duration of 5 hours each. Part or all of the team may participate in the work conducted during this period. The FIX-IT WINDOWS can not be subdivided into multiple work sessions of lesser duration.

See also <R19> and <R22>.