View Single Post
  #5   Spotlight this post!  
Unread 09-03-2012, 01:52
mikets's Avatar
mikets mikets is offline
Software Engineer
FRC #0492 (Titan Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Bellevue, WA
Posts: 667
mikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of light
Re: Print into User Messages on DS

Quote:
Originally Posted by WizenedEE View Post
Some uncompiled code:
Code:
DriverStationLCD ds = DriverStationLCD::GetInstance();
int val = 42;
ds.Printf(DriverStationLCD::kUser_Line1, "My Value is: %d", val);
ds.UpdateLCD(); // Call at the end of teleop periodic if you're doing multiple printfs.
Minor correction. GetInstance gives you a pointer. So it should be:

Code:
DriverStationLCD *ds = DriverStationLCD::GetInstance();
int val = 42;
ds->PrintfLine(DriverStationLCD::kUser_Line1, "My Value is: %d", val);
ds->UpdateLCD(); // Call at the end of teleop periodic if you're doing multiple printfs.
__________________
Reply With Quote