Go to Post Is it legal to build 2 robots? yes. Is it crazy to do so? maybe. - Andy Baker [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 01-03-2012, 18:50
DavisC DavisC is offline
Registered User
FRC #0539 (Titans)
Team Role: College Student
 
Join Date: Jul 2011
Rookie Year: 2010
Location: Virginia
Posts: 200
DavisC is just really niceDavisC is just really niceDavisC is just really niceDavisC is just really nice
Print into User Messages on DS

So this question is pretty simple, how do I print a message into the User Messages box on the Driver Station?
Also is there a different #include needed?
__________________
FRC Team 539
Student Member: 2010 Breakaway - 2014 Aerial Assist
Mentor: 2015 Recycle Rush - present
Reply With Quote
  #2   Spotlight this post!  
Unread 01-03-2012, 19:12
RufflesRidge RufflesRidge is offline
Registered User
no team
 
Join Date: Jan 2012
Location: USA
Posts: 989
RufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant future
Re: Print into User Messages on DS

Check out the DriverStationLCD class. You should not need any additional includes, it should be covered by the wpilib.h include (I'm pretty sure on that, but it's been a while since I've used that particular feature).
Reply With Quote
  #3   Spotlight this post!  
Unread 07-03-2012, 09:18
normpear2 normpear2 is offline
Team Programming/Electrical Co-Lead
FRC #2603 (Highland FIRST Robotics Team #2603)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2011
Location: Medina, Ohio
Posts: 14
normpear2 is an unknown quantity at this point
Send a message via AIM to normpear2 Send a message via MSN to normpear2 Send a message via Yahoo to normpear2
Re: Print into User Messages on DS

I will post the lines needed for printing to the Dashboard LCD when my school lets out today. (If I remember anyway...)
Reply With Quote
  #4   Spotlight this post!  
Unread 08-03-2012, 22:28
WizenedEE's Avatar
WizenedEE WizenedEE is offline
Registered User
AKA: Adam
FRC #3238 (Cyborg Ferrets)
Team Role: Leadership
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Anacortes, WA
Posts: 395
WizenedEE is a name known to allWizenedEE is a name known to allWizenedEE is a name known to allWizenedEE is a name known to allWizenedEE is a name known to allWizenedEE is a name known to all
Re: Print into User Messages on DS

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.
Reply With Quote
  #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: 671
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
  #6   Spotlight this post!  
Unread 10-03-2012, 19:09
garyk garyk is offline
Programming Mentor: 668, 972, 2643
FRC #0668 (Apes of Wrath)
Team Role: Mentor
 
Join Date: Dec 2006
Rookie Year: 2005
Location: Santa Clara (Silicon Valley) Calif.
Posts: 94
garyk is a jewel in the roughgaryk is a jewel in the roughgaryk is a jewel in the roughgaryk is a jewel in the rough
Re: Print into User Messages on DS

Windriver => File => New => Example => VxWorks Downloadable Kernel Module Sample Project => Next => FRC Driver Station LCD Text => Finish

gives you a working example.
__________________

Silicon Valley Regional 2005, 2006 972
Silicon Valley Regional 2007 668 Xerox Creativity Award
Championship Event 2007 668
Portland Regional 2008 668
Silicon Valley Regional 2008 668, 972
Beta Test Team 2008 668 (with 100 & 254)
Silicon Valley Regional 2009 668 Regional Chairman's Award; 2643
Sacramento Regional 2009 668 Winning Alliance (thanks, 1717 & 2473!), 2010 Winning Alliance 3256
CalGames 2006, 2007, 2008, 2009, 2010, 2011 Field Tech
NorCal FTC Regional 2008, 2009 Inspector
Championship Event 2009
San Diego, Silicon Valley Regionals; Champ. Event 2010 668, 2643, 3256
Silicon Valley, Madera Regional 2012 2643
WRRF Programming Instructor 2006-2016
Regional Woodie Flowers Award 2014 2643 Utah Regional

Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 03:04.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi