Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   FRC Control System (http://www.chiefdelphi.com/forums/forumdisplay.php?f=176)
-   -   DriverStation User Message Problem (http://www.chiefdelphi.com/forums/showthread.php?t=100235)

Nymph808 14-01-2012 21:09

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?

JewishDan18 15-01-2012 02:45

Re: DriverStation User Message Problem
 
I had a similar problem (not with old code though). Are you using this method of sending messages?

Code:

DriverStationLCD.getInstance().println(DriverStationLCD.Line.kUser2, 1,"your message");
Do you have this bit of code after you've sent all your messages?

Code:

DriverStationLCD.getInstance().updateLCD();

Nymph808 15-01-2012 03:10

Re: DriverStation User Message Problem
 
Ah yeah, I use those methods. They were on the old code, but they don't seem to work.

Nymph808 16-01-2012 16:33

Re: DriverStation User Message Problem
 
Quote:

Originally Posted by JewishDan18 (Post 1105887)
I had a similar problem (not with old code though). Are you using this method of sending messages?

Code:

DriverStationLCD.getInstance().println(DriverStationLCD.Line.kUser2, 1,"your message");
Do you have this bit of code after you've sent all your messages?

Code:

DriverStationLCD.getInstance().updateLCD();

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

Ross3098 21-01-2012 19:30

Re: DriverStation User Message Problem
 
This has been a huge problem for me too this year. I'm using C++ and the code:
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.:(


All times are GMT -5. The time now is 05:50.

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