View Single Post
  #2   Spotlight this post!  
Unread 16-02-2013, 23:59
omsahmad's Avatar
omsahmad omsahmad is offline
Registered User
FRC #1595 (Dragons)
 
Join Date: Oct 2010
Rookie Year: 2011
Location: Spokane, WA
Posts: 66
omsahmad is just really niceomsahmad is just really niceomsahmad is just really niceomsahmad is just really niceomsahmad is just really nice
Re: Printing values to user messages box

Quote:
Originally Posted by Kevin Sevcik View Post
You need to use standard printf formatting.

Your line should be something like:
lcd->Printf(DriverStationLCD::kUser_Line3, 1, "Rate: %f", shooterOne->GetSpeed());

Also, calling the Clear() method first tends to prevent weird overwriting problems that muddle the output.
I put the parentheses after GetSpeed, I just forgot them here. I did not have %f, however. I'll try it out tomorrow.

Thank you.

EDIT: It worked perfectly, thanks

Last edited by omsahmad : 17-02-2013 at 13:04.
Reply With Quote