Send User Messages (Driver Station)

what class/code is used in sending messages to the Driver Station’s “User Messages” box?

http://www.wbrobotics.com/javadoc/edu/wpi/first/wpilibj/smartdashboard/SmartDashboard.html

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

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.

I created a method that helps us display stuff easier


 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();
}

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.