Team 3018 TechnaPWN Code reveal

The point of this reveal is to give teams an alternative paradigm. A very important aspect of good programming is to keep an open mind to different methods. Do what works for you, try new things, but most importantly, try to improve. Don’t get stuck in a box and believe that there’s only one solution.


Written in RobotC, view on Github, or Download Zip. (0-Nora.c is the main file.) Best viewed with tabs 4 spaces long.

Main differences from other code I have seen:
-Does not use the competition template.
-The only task is task main(). This is to avoid bug introduction, and to aid in debugging.
-Uses the Sense-Plan-Act paradigm. Get inputs (including gamepads), record them, plan the next moves, and act upon those plans.
-Readable autonomous routines. Much more concise and readable than most autonomous structures.

Features:
Powerful, concise, and easily versatile autonomous routine structure.
Slew controller, incorporating different rates for different subsystems.
Preset lift heights, making the driver’s job much easier.
Autonomous routine testing without a competition switch.
Code for strafing with mecanums/x-drive.
Somewhat modular, as many variable are static inside that file.
Customizable menu system, including selection of auto routines, viewing sensor, battery, and motor values, and an advanced motor test. (Requires potentiometer)
Free to use and hack


Constructive criticism would be great.

Feel free to ask questions. If you don’t understand what something does, go ahead and ask, and I will be more than happy to answer you.

1 Like

Nice work Joseph. I will download and give it a much better look at the weekend. Sure wish we could monitor the joystick batteries in ROBOTC though (he says remembering Arts division qualification match 2 in Anaheim) :slight_smile:

1 Like

My family is still making jokes about that match. :stuck_out_tongue:
At least we learned not to use old rechargeables!

Your family are not the only ones making jokes about it. :wink:

-Does not use the competition template.
-The only task is task main(). This is to avoid bug introduction, and to aid in debugging.
-Uses the Sense-Plan-Act paradigm. Get inputs (including gamepads), record them, plan the next moves, and act upon those plans.
-Readable autonomous routines. Much more concise and readable than most autonomous structures.

Features:
Powerful, concise, and easily versatile autonomous routine structure.
Slew controller, incorporating different rates for different subsystems.
Preset lift heights, making the driver’s job much easier.
Autonomous routine testing without a competition switch.
Code for strafing with mecanums/x-drive.
Somewhat modular, as many variable are static inside that file.
Customizable menu system, including selection of auto routines, viewing sensor, battery, and motor values, and an advanced motor test. (Requires potentiometer)
Free to use and hack

You guys always impress me with the code that you guys come out with every year. Great work!