Thread: Console output
View Single Post
  #2   Spotlight this post!  
Unread 21-01-2010, 01:43
Abrakadabra Abrakadabra is offline
Here We Go !!!
AKA: Scott Kukshtel, Mr. K
FRC #3467 (The Windham Windup!)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2002
Location: Windham, New Hampshire
Posts: 159
Abrakadabra has a brilliant futureAbrakadabra has a brilliant futureAbrakadabra has a brilliant futureAbrakadabra has a brilliant futureAbrakadabra has a brilliant futureAbrakadabra has a brilliant futureAbrakadabra has a brilliant futureAbrakadabra has a brilliant futureAbrakadabra has a brilliant futureAbrakadabra has a brilliant futureAbrakadabra has a brilliant future
Re: Console output

Check out the DriverStationLCD class in WPILib. It's named for the 6 line LCD on last year's DS, but now writes to the 6 line "User Messages" space on the "Operation" tab of the 2010 DS UI. (Not sure why it's not in the documents - probably because it was released mid-season last year, and was only made an "official" part of WPILib this year.)

You can display any data you like using standard printf()-style formatting (just pay attention to line lengths - 21 characters is not very much).

Also, note (and you will soon find out) that pushing the joystick forward returns -1, and pulling it back returns +1. It's usually not a critical issue because all of the WPILib routines account for it, but if you are directly reading the stick and driving a motor using the return value, you will want to account for it, because it is is a little non-intuitive. Makes perfect sense when flying a plane, but it's backwards for driving!

HTH.
Reply With Quote