Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Java (http://www.chiefdelphi.com/forums/forumdisplay.php?f=184)
-   -   Send User Messages (Driver Station) (http://www.chiefdelphi.com/forums/showthread.php?t=102788)

gixxy 14-02-2012 10:43

Send User Messages (Driver Station)
 
what class/code is used in sending messages to the Driver Station's "User Messages" box?

notmattlythgoe 14-02-2012 10:45

Re: Send User Messages (Driver Station)
 
http://www.wbrobotics.com/javadoc/ed...Dashboard.html

One of the put() methods depending on what data you want to send.

Joe Ross 14-02-2012 11:43

Re: Send User Messages (Driver Station)
 
Quote:

Originally Posted by gixxy (Post 1126375)
what class/code is used in sending messages to the Driver Station's "User Messages" box?

The DriverStationLCD class.

Quote:

Originally Posted by notmattlythgoe (Post 1126376)
http://www.wbrobotics.com/javadoc/ed...Dashboard.html

One of the put() methods depending on what data you want to send.

The SmartDashboard class is for sending data to the SmartDashboard, not to the UserMessages area of the driver station.

notmattlythgoe 14-02-2012 11:45

Re: Send User Messages (Driver Station)
 
Quote:

Originally Posted by Joe Ross (Post 1126405)
The DriverStationLCD class.



The SmartDashboard class is for sending data to the SmartDashboard, not to the UserMessages area of the driver station.

You are right, my mistake.

Intel i7 14-02-2012 12:29

Re: Send User Messages (Driver Station)
 
I created a method that helps us display stuff easier

Code:

public static void disp(int line, String msg)
{
DriverStationLCD.Line l;
switch (line)
{
case 1:
l = DriverStationLCD.Line.kUser2;
break;
case 2:
l = DriverStationLCD.Line.kUser3;
break;
case 3:
l = DriverStationLCD.Line.kUser4;
break;
case 4:
l = DriverStationLCD.Line.kUser5;
break;
case 5:
l = DriverStationLCD.Line.kUser6;
break;
case 6:
l = DriverStationLCD.Line.kMain6;
break;
default:
l = DriverStationLCD.Line.kUser2;
break;
}

DriverStationLCD.getInstance().println(l, 1, msg);
DriverStationLCD.getInstance().updateLCD();
}


Herbblood 14-02-2012 20:14

Re: Send User Messages (Driver Station)
 
println(DriverStationLCD.Line, int, StringBuffer) - Method in class edu.wpi.first.wpilibj.DriverStationLCD
Print formatted text to the Driver Station LCD text buffer.
and don't forget LCD update.


All times are GMT -5. The time now is 10:44.

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