Log in

View Full Version : Print to Driver Station?


NegativeZero
23-01-2016, 14:17
Hello,

I am looking for a way to display messages in the driver station using a function other than println()'s, as i am afraid that this may result in too much processor usage on the roborio. I am aware of the DriverStationLCD class, but that appears to have been removed from the latest version of WPILib. (http://wpilib.screenstepslive.com/s/3120/m/8559/l/96657-frc-driver-station-errors-warnings)

Thank you in advance!

euhlmann
23-01-2016, 15:15
With the roborio, processor usage on a simple print shouldn't be an issue.

You could also use networktables and print to the smartdashboard

Arhowk
23-01-2016, 15:21
With the roborio, processor usage on a simple print shouldn't be an issue.

You could also use networktables and print to the smartdashboard

You'd be surprised (though I shall say nothing as I aim not to provide un-researched claims of the Driver Station and the roboRIO)

have you tried DriverStation.reportError?

NegativeZero
25-01-2016, 18:17
have you tried DriverStation.reportError?

I have tried that, but i am being thrown a lot of warnings/errors.

CTRE CAN Recieve Timeout at edu.wpi.first.wpilibj.hal.CanTalonJNI.GetAppliedTh rottle(Native Method)
edu.wpi.first.wpilibj.CANTalon.get(CANTalon.java:5 77)
edu.wpi.first.wpilibj.CANSpeedController.updateTab le(CANSpeedController.java:159)
edu.wpi.first.wpilibj.CANTalon.updateTable(CANTalo n.java:1773)
edu.wpi.first.wpilibj.CANTalon.initTable(CANTalon. java:1765)
edu.wpi.first.wpilibj.livewindow.LiveWindow.initia lizeLiveWindowComponents(LiveWindow.java:86)
edu.wpi.first.wpilibj.livewindow.LiveWindow.setEna bled(LiveWindow.java:108)
edu.wpi.first.wpilibj.IterativeRobot.startCompetit ion(IterativeRobot.java:101)
edu.wpi.first.wpilibj.RobotBase.main(RobotBase.jav a:241)

My code is


String DSPrint;

protected void execute () {

if (Robot.oi.driver.getRawButton(8) == 1)
{
DSPrint = Button On;
DriverStation.reportError(DSPrint, false);
}

else
{
DSPrint = Button Off;
DriverStation.reportError(DSPrint, false);
}

}


Any ideas?