Go to Post PS. Never write to a forum when your cat is trying to lie on the keyboard while you type. It made my bad spelling worse. - Seth Mallory [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 14-01-2011, 14:24
wdell wdell is offline
Registered User
AKA: William Dell
FRC #3999 (Shadetree Mechanics)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Killeen, Texas
Posts: 55
wdell has a spectacular aura aboutwdell has a spectacular aura about
Problem sending messages to Driver Station LCD

Every time I try to send a message to the LCD I get a NullPointerException, no matter what I try or who's code I copy. If it hits the line

Code:
DriverStationLCD.getInstance().println(DriverStationLCD.Line.kMain6, 1, msg);
it throws an exception. What am I doing wrong?

Thanks!
Reply With Quote
  #2   Spotlight this post!  
Unread 14-01-2011, 18:05
ArchVince's Avatar
ArchVince ArchVince is offline
Registered User
FRC #1290 (Si Se Puede)
Team Role: Alumni
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Chandler High School
Posts: 26
ArchVince will become famous soon enough
Re: Problem sending messages to Driver Station LCD

Ah, the LCD. I'm pretty sure that you just forgot an import.
Did you import BOTH of these?
PHP Code:
import edu.wpi.first.wpilibj.DriverStationLCD;
import edu.wpi.first.wpilibj.DriverStationLCD.Line
If so...In my code I always use
PHP Code:
Line.kUser6 
instead of
PHP Code:
DriverStationLCD.Line.kUser6 
but that probably wouldn't make a difference.
Also, make sure you update the LCD. You won't see any output otherwise.
__________________
PETA wants your help finding Schrödinger.

Last edited by ArchVince : 14-01-2011 at 18:09.
Reply With Quote
  #3   Spotlight this post!  
Unread 14-01-2011, 19:16
rrossbach rrossbach is offline
Registered User
AKA: Ron R
FRC #2607 (RoboVikings)
Team Role: Mentor
 
Join Date: Nov 2008
Rookie Year: 2008
Location: Warrington PA
Posts: 90
rrossbach is a splendid one to beholdrrossbach is a splendid one to beholdrrossbach is a splendid one to beholdrrossbach is a splendid one to beholdrrossbach is a splendid one to beholdrrossbach is a splendid one to beholdrrossbach is a splendid one to behold
Re: Problem sending messages to Driver Station LCD

Quote:
Originally Posted by wdell View Post
Every time I try to send a message to the LCD I get a NullPointerException, no matter what I try or who's code I copy. If it hits the line

Code:
DriverStationLCD.getInstance().println(DriverStationLCD.Line.kMain6, 1, msg);
it throws an exception. What am I doing wrong?

Thanks!
Please post the exception you're getting (including the stack trace) and we can try to help

- Ron
Team #2607 controls mentor
__________________

FIRST Mid-Atlantic Volunteer
FRC Team #2607 Mentor
Reply With Quote
  #4   Spotlight this post!  
Unread 15-01-2011, 11:46
wdell wdell is offline
Registered User
AKA: William Dell
FRC #3999 (Shadetree Mechanics)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Killeen, Texas
Posts: 55
wdell has a spectacular aura aboutwdell has a spectacular aura about
Re: Problem sending messages to Driver Station LCD

ArchVince's suggestion seems to have worked. Weird, since I'm pretty sure I tried that once. Must have had the syntax wrong.

Thanks for all the help!
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 12:57.

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