Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Java (http://www.chiefdelphi.com/forums/forumdisplay.php?f=184)
-   -   Print to Driver Station? (http://www.chiefdelphi.com/forums/showthread.php?t=142402)

NegativeZero 23-01-2016 14:17

Print to Driver Station?
 
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/...rrors-warnings)

Thank you in advance!

euhlmann 23-01-2016 15:15

Re: Print to Driver Station?
 
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

Re: Print to Driver Station?
 
Quote:

Originally Posted by euhlmann (Post 1528980)
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

Re: Print to Driver Station?
 
Quote:

Originally Posted by Arhowk (Post 1528987)
have you tried DriverStation.reportError?

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

Code:

CTRE CAN Recieve Timeout at edu.wpi.first.wpilibj.hal.CanTalonJNI.GetAppliedThrottle(Native Method)
edu.wpi.first.wpilibj.CANTalon.get(CANTalon.java:577)
edu.wpi.first.wpilibj.CANSpeedController.updateTable(CANSpeedController.java:159)
edu.wpi.first.wpilibj.CANTalon.updateTable(CANTalon.java:1773)
edu.wpi.first.wpilibj.CANTalon.initTable(CANTalon.java:1765)
edu.wpi.first.wpilibj.livewindow.LiveWindow.initializeLiveWindowComponents(LiveWindow.java:86)
edu.wpi.first.wpilibj.livewindow.LiveWindow.setEnabled(LiveWindow.java:108)
edu.wpi.first.wpilibj.IterativeRobot.startCompetition(IterativeRobot.java:101)
edu.wpi.first.wpilibj.RobotBase.main(RobotBase.java:241)

My code is
Code:


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?


All times are GMT -5. The time now is 10:18.

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