View Single Post
  #3   Spotlight this post!  
Unread 02-02-2012, 19:37
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: Printing to the DriverStation LCD

Quote:
Originally Posted by Ross3098 View Post
Last year we used the command:
Code:
DriverStationLCD *m_LCD;
 
m_LCD->GetInstance();
 
//Code.............................
 
m_LCD->Printf(DriverStationLCD::kUser_Line1, 1, "Message");
m_LCD->UpdateLCD();
No, your code is declaring a DriverStationLCD pointer m_LCD but it is uninitialized. Your code will fault when you call m_LCD->GetInstance(). Instead, your code should look something like this:
Code:
DriverStationLCD *m_LCD;
 
m_LCD = DriverStationLCD::GetInstance();
__________________
Reply With Quote