View Single Post
  #9   Spotlight this post!  
Unread 22-01-2010, 12:43
TheDominis TheDominis is offline
Registered User
FRC #2152
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Port Orange, Florida
Posts: 88
TheDominis has a spectacular aura aboutTheDominis has a spectacular aura about
Re: Printing Float to Dashboard

Quote:
Originally Posted by byteit101 View Post
I wonder why they decided to use printf instead of the C++ streams. this would be much easier, and more modular, you don't need to know what you are putting in, and you could even (if it implements it) output a whole joystick
dsLCD.Printf(line,collum, "JoyY: %f",stick.GetY);
vs
dsLCD(line,collum)<<"JoyY:"<<stick.GetY();
I think C programmers maintain WPI library's C++ version so they use familiar functions.

Also using an std::stringstream would be a great idea. However, I would just remove the column index completely as you can use seekp().
Reply With Quote