View Single Post
  #2   Spotlight this post!  
Unread 05-06-2012, 04:12 PM
apalrd's Avatar
apalrd apalrd is offline
More Torque!
AKA: Andrew Palardy (Most people call me Palardy)
VRC #3333
Team Role: College Student
 
Join Date: Mar 2009
Rookie Year: 2009
Location: Clarkston, MI
Posts: 1,347
apalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond repute
Re: paper: Killer Bees BuzzXVII 2012 Code

As in past years, I am releasing the Killer Bees 2012 code post-championship.

Major changes for this year:
-Beescript improvements to allow us to write "ScriptButtons" using a single threaded interpreter (a lock on the interpreter, and the ability to forcefully kill the interpreter if a higher-priority script must run). We intended to use this for auto-balance scripts, but never did. The functionality is still there, but unused. See the Script Buttons VI in the HMI folder for an example of use.

-RT thread for the gun speed controller - See gun_speed_control_feed_forward.VI in the gun folder for a description of the final algorithm, and the other tested algorithms (they're commented out in that VI so you can quickly find them all). I wanted to include the data we used in determining which controller was best, but the data files pushed the zip over a magic 8mb file limit on CD Media.

-Signals system allows me to send boolean triggers and have multiple subsystems trap the signals. I initially wrote Signals like UNIX signals, where each subsystem could register a callback function, but later decided I didn't like this, so I wrote the signal manager and signal trap as you see it now. Each instance owns it's own trap, so multiple traps of the same signal will not cause race conditions where only one will get the signal. The implementation is fairly generic, this system was designed to be re-usable.

As usual, feel free to ask questions or state comments.
__________________
Kettering University - Computer Engineering
Kettering Motorsports
Williams International - Commercial Engines - Controls and Accessories
FRC 33 - The Killer Bees - 2009-2012 Student, 2013-2014 Advisor
VEX IQ 3333 - The Bumble Bees - 2014+ Mentor

"Sometimes, the elegant implementation is a function. Not a method. Not a class. Not a framework. Just a function." ~ John Carmack
Reply With Quote