Go to Post There's more than one way to skin a cat. - Al Skierkiewicz [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
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 11-02-2011, 02:17
Mk.32's Avatar
Mk.32 Mk.32 is offline
Registered User
AKA: Mark
FRC #2485 (W.A.R. Lords)
Team Role: Engineer
 
Join Date: Jan 2011
Rookie Year: 2011
Location: San Diego
Posts: 770
Mk.32 has much to be proud ofMk.32 has much to be proud ofMk.32 has much to be proud ofMk.32 has much to be proud ofMk.32 has much to be proud ofMk.32 has much to be proud ofMk.32 has much to be proud ofMk.32 has much to be proud ofMk.32 has much to be proud ofMk.32 has much to be proud of
JAVA Printing

Hello,
Is there any way to print something from the code and have it display to the user?
Tired System.out.print(); and didn't see anything come up.
Thanks in advance
__________________
Engineering mentor: Team 2485: WARLords 2013-

Team President: Team 3647 2010-2013
Reply With Quote
  #2   Spotlight this post!  
Unread 11-02-2011, 06:55
mwtidd's Avatar
mwtidd mwtidd is offline
Registered User
AKA: mike
FRC #0319 (Big Bad Bob)
Team Role: Mentor
 
Join Date: Feb 2005
Rookie Year: 2003
Location: Boston, MA
Posts: 714
mwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond repute
Re: JAVA Printing

public void output(String text){
System.out.println(text);
}
__________________
"Never let your schooling interfere with your education" -Mark Twain
Reply With Quote
  #3   Spotlight this post!  
Unread 11-02-2011, 13:19
Ben_R_R's Avatar
Ben_R_R Ben_R_R is offline
Assistant Programing Mentor
FRC #2194 (Fondy Fire)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2007
Location: WI
Posts: 21
Ben_R_R is an unknown quantity at this point
Re: JAVA Printing

That prints to the Net Beans console, useful for debugging, not so useful in competition though. Does any one know how to print to the Drive Station console?
__________________
2194 Alumni and Mentor
Reply With Quote
  #4   Spotlight this post!  
Unread 11-02-2011, 13:45
mwtidd's Avatar
mwtidd mwtidd is offline
Registered User
AKA: mike
FRC #0319 (Big Bad Bob)
Team Role: Mentor
 
Join Date: Feb 2005
Rookie Year: 2003
Location: Boston, MA
Posts: 714
mwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond repute
Re: JAVA Printing

printing to the driver station you only have 7 lines or so, and you have to replace previous lines. So utilizing it for debugging is a little difficult.

it doesnt work like a typical printf where you can keep going.
__________________
"Never let your schooling interfere with your education" -Mark Twain
Reply With Quote
  #5   Spotlight this post!  
Unread 12-02-2011, 13:25
morganfshirley morganfshirley is offline
Registered User
FRC #1571 (BraughtWurst)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Portland, OR
Posts: 3
morganfshirley is an unknown quantity at this point
Re: JAVA Printing

To output text to the Driver Station, you must create a DriverStationLCD object. Once it has been initialized, lines can be outputted using:

Code:
[DriverStationLCD object name].println(DriverStationLCD.Line.[line],
    [Priority], [message]);
You will also need to use a .updateLCD() command to get it to write to the Driver's Station.
Reply With Quote
  #6   Spotlight this post!  
Unread 12-02-2011, 13:48
Ben_R_R's Avatar
Ben_R_R Ben_R_R is offline
Assistant Programing Mentor
FRC #2194 (Fondy Fire)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2007
Location: WI
Posts: 21
Ben_R_R is an unknown quantity at this point
Re: JAVA Printing

Ah, yes that worked. For some reason I got a null pointer exception when I tried that before. It worked now though. Thanks!
__________________
2194 Alumni and Mentor
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 13:01.

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