View Single Post
  #4   Spotlight this post!  
Unread 17-02-2012, 14:48
DjScribbles DjScribbles is offline
Programming Mentor
AKA: Joe S
FRC #2474 (Team Excel)
Team Role: Mentor
 
Join Date: Oct 2011
Rookie Year: 2012
Location: Niles MI
Posts: 284
DjScribbles is a splendid one to beholdDjScribbles is a splendid one to beholdDjScribbles is a splendid one to beholdDjScribbles is a splendid one to beholdDjScribbles is a splendid one to beholdDjScribbles is a splendid one to beholdDjScribbles is a splendid one to beholdDjScribbles is a splendid one to behold
Re: Freebie LV-MaxSonar-EZ1 Code (Sonar Range Finder)

I chose to write this as a class to make it more standardized with other similar sensors (and so I could use it with a PID).

As for all in the h file, my attempt was to just have all of the operations compiled as inline for the sake of simplicity, however it may not be completely legal (my native language is C, so I'm a bit rusty in C++fu). I know you can do this with individual functions, however the whole class may cause issues. I'll upload it as a cpp and h file just to avoid the confusion/possibility of broke tomorrow.

Thanks
Reply With Quote