View Single Post
  #3   Spotlight this post!  
Unread 12-02-2013, 14:08
evinugur evinugur is offline
Registered User
FRC #1073
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2010
Location: US
Posts: 13
evinugur is an unknown quantity at this point
Re: Lightweight Extensions to WPILib (C++)

Greetings apalrd,

Thank you very much for your sound advice. I did not know what an inline function was in C++ until you gave me your suggestion to implement one it did make sense to use a simple function.

Originally we had thought of using a Queue for Stallable so that we could easily push data through (we shuffle through our array of collected voltages right now), but the rookie we were working with did not know much about programming so we thought it would be a good idea to teach her some basic concepts like looping and such before handing her more complicated data structures. Even though iterative looping might not be the best approach on our hardware, the array is very tiny, and we have a hefty 700Mhz processor to work with so we should be fine for now.
Your solution was still much more efficient than dancing through a queue, and we will implement it once we're actually done with our main robot code.

Cheers