DriverStation User Message Problem

So using Java, we ran a code that prints a message onto the DriverStation’s User Messages during teleop, but the print doesn’t show up. We tried running our old code from Logomotion onto the robot, but that didn’t print anything either. Any ideas to why user messages isn’t working?

I had a similar problem (not with old code though). Are you using this method of sending messages?

DriverStationLCD.getInstance().println(DriverStationLCD.Line.kUser2, 1,"your message");

Do you have this bit of code after you’ve sent all your messages?

DriverStationLCD.getInstance().updateLCD();

Ah yeah, I use those methods. They were on the old code, but they don’t seem to work.

So this is the code I currently have. Have you got your DriverStation to print any user messages?

package edu.wpi.first.wpilibj.templates;

import edu.wpi.first.wpilibj.IterativeRobot;
import edu.wpi.first.wpilibj.AnalogChannel;
import edu.wpi.first.wpilibj.DriverStationLCD;

public class RobotTemplate extends IterativeRobot {

AnalogChannel b_sonar;
DriverStationLCD b_LCD;
static final int sonarPort = 6;
long lSonarCount;

public void robotInit() {
       b_sonar = new AnalogChannel(sonarPort);
       b_LCD = DriverStationLCD.getInstance();
       b_LCD.updateLCD();
}


public void autonomousPeriodic() {
b_sonar.getVoltage();

}


public void disabledInit(){
     b_LCD.println(DriverStationLCD.Line.kMain6, 1, "Print");
}
 
public void teleopPeriodic() {
    //lSonarCount = b_sonar.getAccumulatorCount();
    b_LCD.println(DriverStationLCD.Line.kUser4, 15, "Ultrasonic distance: " + b_sonar.getVoltage());
    b_LCD.updateLCD();
}

This has been a huge problem for me too this year. I’m using C++ and the code:


DriverStationLCD *m_LCD;

m_LCD->GetInstance();

m_LCD->Printf(DriverStationLCD::kUser_Line1, 1, "Message");

m_LCD->UpdateLCD();


Has no effect. I redeployed our 2011 code to it for the sake of User Message printing but all of the old commands gave no effect as well.:frowning: