|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
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?
|
|
#2
|
||||
|
||||
|
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"); Code:
DriverStationLCD.getInstance().updateLCD(); |
|
#3
|
||||
|
||||
|
Re: DriverStation User Message Problem
Ah yeah, I use those methods. They were on the old code, but they don't seem to work.
|
|
#4
|
||||
|
||||
|
Re: DriverStation User Message Problem
Quote:
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(); } |
|
#5
|
||||
|
||||
|
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(); ![]() |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|