|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
sending info to a console
so our team is using java this year, and we have been experiencing difficulty with sending output data to the classmate console. anyone have any way to help me out?
|
|
#2
|
|||
|
|||
|
Re: sending info to a console
If you are trying to send an output to the console on a development computer, you must use the System.out.print or println methods to send data to the console wheter it be strings, integers, characters etc.
If you want to send information to the dashboard, look through the sample code provided with the FRC plugin in NetBeans. Hope this helps - James D Edit: After re-reading your post it sounds like you are trying to send data to the User Messages section of the Dashboard. To access the lower part of the Dashboard you must use the class Dashboard. Here is an example of how to have a class object for the lower half of the Dashboard: Dashboard lowDashData = DriverStation.getInstance().getDashboardPackerLow( ); You then have to add clusters in order to be able to send your data. Again sorry if you already knew this but I hope this helped you Last edited by James Dempsey : 20-01-2010 at 20:15. Reason: Additional Information |
|
#3
|
|||
|
|||
|
Re: sending info to a console
yeah. i want something like the console from last year. we use windriver, and our team was able to get output data from the robot. thats what we are trying to replicate or get as close as possible
|
|
#4
|
|||
|
|||
|
Re: sending info to a console
I believe that's inaccurate. If you want to send strings to the User Messages, on the Driver Station, you need to use the DriverStationLCD class. If you want to send data to a Dashboard (where you would have to add a text box or other controls), then you use the Dashboard class.
|
|
#5
|
|||
|
|||
|
Re: sending info to a console
Yes my mistake. I was extremely tired when I responded to this post. The DashboardLCD class should be the class you would use. Here is the link for methods and such:
http://www.wbrobotics.com/javadoc/ed...tationLCD.html Again sorry for the confusion there on my misinformation, my bad. |
|
#6
|
|||
|
|||
|
Re: sending info to a console
i have the import for the driverstationlcd class, but i have no clue what to do with it... i think one of my fellow team members might have been able to solve this problem, but i don't know if it works. (that's tomorrow's job)
another note... does anyone know what 'private access' means, and how to get past it? |
|
#7
|
|||
|
|||
|
Re: sending info to a console
Quote:
|
|
#8
|
|||
|
|||
|
Re: sending info to a console
Quote:
this is my code... DriverStationLCD robot = new DriverStationLCD(); robot.println(DriverStationLCD.Line.kUser2,1,"this prints on the first line"); robot.updateLCD(); |
|
#9
|
||||
|
||||
|
Re: sending info to a console
Hi A Kenney03,
Call "DriverStationLCD getInstance()" instead of "new DriverStationLCD()". Since there can only be one DriverStationLCD, the private access prevents you from trying to create two objects to refer to the same item on the driver station. BTW, errors like this are easier to comment on if you can post the error message. I wasn't sure if you were talking about a compile error, network error, code error, or what :-) |
|
#10
|
|||
|
|||
|
Re: sending info to a console
ok. thank you. that helps. but new we are having trouble with the user messages system. is there a maximum limit on strings and lines? and how do we use the first line?
|
|
#11
|
|||
|
|||
|
Re: sending info to a console
Quote:
To use the first line, use the enum value to specify the first line. |
|
#12
|
|||
|
|||
|
Re: sending info to a console
Hey guys, first post here.
We are also having trouble with using DriverStationLCD. The code that I am attempting to use is as follows: Code:
textOut.println(DriverStationLCD.Line.kUser3, 2, message); textOut.updateLCD(); This code is executed periodically. The problem is that after it executes a few times the DS stops responding and must be restarted to regain functionality. This does not happen if I remove those two lines, so I'm fairly sure that they are the cause. Has anyone gotten this to work? Any help is greatly appreciated. |
|
#13
|
|||
|
|||
|
Re: sending info to a console
Nobody knows anything that could help?
|
|
#14
|
|||
|
|||
|
Re: sending info to a console
Where are they called from? How quickly are they called? Does rebooting the robot affect anything, or is restarting the driver station application the only thing that makes it work again?
|
|
#15
|
|||
|
|||
|
Re: sending info to a console
I just got in here a little while ago... It turns out that the problem was not related to the calls to DriverStationLCD, removing those lines only made the error occur much later. All is well now. Thanks.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Sending data from RC to OI | Nathan | Programming | 7 | 03-02-2008 22:32 |
| sending extra information to the OI | iwdu15 | Programming | 2 | 06-02-2007 20:05 |
| Sending variables to Auto Mode | Adrien | Programming | 4 | 19-02-2006 21:51 |
| Sending data back to the OI | DanDon | Programming | 13 | 26-01-2006 15:17 |
| Sending Data | Raven_Writer | Programming | 8 | 11-09-2003 16:28 |