Go to Post This is high school robotics for fun and education. Let's try and keep it that way. - Rod [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #16   Spotlight this post!  
Unread 08-02-2010, 18:57
kennypu kennypu is offline
Registered User
FRC #2467
 
Join Date: Jan 2010
Location: Hawaii
Posts: 40
kennypu is an unknown quantity at this point
Re: outputting data to DS's usermessage

i see, I just needed to know the class name where I needed to get the functions from. So just use the functions from DriverStationLCD correct? Thanks x]
Reply With Quote
  #17   Spotlight this post!  
Unread 08-02-2010, 19:02
jhersh jhersh is offline
National Instruments
AKA: Joe Hershberger
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 1997
Location: Austin, TX
Posts: 1,006
jhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond repute
Re: outputting data to DS's usermessage

Code:
DriverStationLCD *myDS_LCD = DriverStationLCD::GetInstance();
Reply With Quote
  #18   Spotlight this post!  
Unread 08-02-2010, 20:31
bcieslak
 
Posts: n/a
Re: outputting data to DS's usermessage

Quote:
Originally Posted by jhersh View Post
Code:
DriverStationLCD *myDS_LCD = DriverStationLCD::GetInstance();
when we do this we get a no robot code error on the driver station...anybody else have this problem??

Brian
Reply With Quote
  #19   Spotlight this post!  
Unread 08-02-2010, 20:34
Radical Pi Radical Pi is offline
Putting the Jumper in the Bumper
AKA: Ian Thompson
FRC #0639 (Code Red Robotics)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2010
Location: New York
Posts: 655
Radical Pi has a spectacular aura aboutRadical Pi has a spectacular aura aboutRadical Pi has a spectacular aura about
Re: outputting data to DS's usermessage

Yeah there is a bug in WPILib right now that crashes any user code trying to get a DriverStationLCD. If you revert to the version released at the beginning of the season you should be able to use it until a fix is released. Just download the old workbench update and install it
Reply With Quote
  #20   Spotlight this post!  
Unread 08-02-2010, 22:43
BradAMiller BradAMiller is offline
Registered User
AKA: Brad
#0190 ( Gompei and the Herd)
Team Role: Mentor
 
Join Date: Mar 2004
Location: Worcester, MA
Posts: 590
BradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant future
Re: outputting data to DS's usermessage

There seems to have been a compiler or linker bug that was causing a static const int variable to not initialize correctly that just started happening. I posed a new version here:

http://first.wpi.edu/FRC/frccupdates.html

That seems to fix the problem. That's the only change in this version so there's no need to update if you aren't using the DriverStationLCD class.
__________________
Brad Miller
Robotics Resource Center
Worcester Polytechnic Institute
Reply With Quote
  #21   Spotlight this post!  
Unread 09-02-2010, 13:39
bcieslak
 
Posts: n/a
Re: outputting data to DS's usermessage

Quote:
Originally Posted by Radical Pi View Post
Yeah there is a bug in WPILib right now that crashes any user code trying to get a DriverStationLCD. If you revert to the version released at the beginning of the season you should be able to use it until a fix is released. Just download the old workbench update and install it
thanks for the tip Radical Pi ..we pulled up the old DriverstationLCD.cpp file, fixed a type mismatch in the .h file that gave a warning and rebuilt. All is well in the world again (or at least until another update comes out).

BC
Reply With Quote
  #22   Spotlight this post!  
Unread 09-02-2010, 14:30
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,572
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: outputting data to DS's usermessage

Quote:
Originally Posted by bcieslak View Post
thanks for the tip Radical Pi ..we pulled up the old DriverstationLCD.cpp file, fixed a type mismatch in the .h file that gave a warning and rebuilt. All is well in the world again (or at least until another update comes out).

BC
It's already out, to fix this issue: http://forums.usfirst.org/showthread.php?t=14573
Reply With Quote
  #23   Spotlight this post!  
Unread 09-02-2010, 21:19
pafwl pafwl is offline
Franciose
AKA: Frank Larkin
FRC #0272 (Cyber Crusaders)
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 1998
Location: Lansdale, Pennsylvania
Posts: 108
pafwl has much to be proud ofpafwl has much to be proud ofpafwl has much to be proud ofpafwl has much to be proud ofpafwl has much to be proud ofpafwl has much to be proud ofpafwl has much to be proud ofpafwl has much to be proud ofpafwl has much to be proud ofpafwl has much to be proud of
Re: outputting data to DS's usermessage

The fix works but breaks the Camera. LCD is working great.
Reply With Quote
  #24   Spotlight this post!  
Unread 10-02-2010, 18:39
yoyodyne yoyodyne is offline
Registered User
AKA: Greg Smith
FRC #0116 (Epsilon Delta)
Team Role: Engineer
 
Join Date: Jan 2006
Rookie Year: 2004
Location: Reston, VA
Posts: 61
yoyodyne is a splendid one to beholdyoyodyne is a splendid one to beholdyoyodyne is a splendid one to beholdyoyodyne is a splendid one to beholdyoyodyne is a splendid one to beholdyoyodyne is a splendid one to beholdyoyodyne is a splendid one to behold
Re: outputting data to DS's usermessage

We had the same problem so we replaced each instance of kLineLength with 21 in WPiLib and recompiled WPiLib. Not an ideal solution but it works. We have to modify WPiLib anyway to fix other problems and to get it to calibrate the gyro and one of the accelerometers in parallel and added a method so we could get the gyro rate to support a closed loop "arc turn".

I am still interested in seeing an example of how to use the Printf function to print to the dashboard user data so we can use the logging function since we are using the serial port for the jag CAN bus, not the driver station LCD. When we try to add the Printf output to the high or low priority dashboard packer we get errors in the DS display. I guess it's time to bite the bullet and figure out exactly how the data structures are configured. Does anyone know if there is documentation on this besides looking at the DS labview code?

Thanks,

Greg
Reply With Quote
  #25   Spotlight this post!  
Unread 10-02-2010, 20:49
jhersh jhersh is offline
National Instruments
AKA: Joe Hershberger
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 1997
Location: Austin, TX
Posts: 1,006
jhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond repute
Re: outputting data to DS's usermessage

Quote:
Originally Posted by yoyodyne View Post
I am still interested in seeing an example of how to use the Printf function to print to the dashboard user data so we can use the logging function since we are using the serial port for the jag CAN bus, not the driver station LCD. When we try to add the Printf output to the high or low priority dashboard packer we get errors in the DS display. I guess it's time to bite the bullet and figure out exactly how the data structures are configured. Does anyone know if there is documentation on this besides looking at the DS labview code?
You can only use the Printf -OR- the Add* + Finalize functions... not both on the same packer at the same time (without calling Finalize and waiting for a new DS packet). To use the Printf, simply stop calling the other functions on that packer. Then on the Dashboard side, instead of calling "unpack from string" on the received string, and instead use the string as is and write it to a file or an indicator or whatever.

-Joe
Reply With Quote
  #26   Spotlight this post!  
Unread 11-02-2010, 22:15
yoyodyne yoyodyne is offline
Registered User
AKA: Greg Smith
FRC #0116 (Epsilon Delta)
Team Role: Engineer
 
Join Date: Jan 2006
Rookie Year: 2004
Location: Reston, VA
Posts: 61
yoyodyne is a splendid one to beholdyoyodyne is a splendid one to beholdyoyodyne is a splendid one to beholdyoyodyne is a splendid one to beholdyoyodyne is a splendid one to beholdyoyodyne is a splendid one to beholdyoyodyne is a splendid one to behold
Re: outputting data to DS's usermessage

Quote:
You can only use the Printf -OR- the Add* + Finalize functions... not both on the same packer at the same time (without calling Finalize and waiting for a new DS packet). To use the Printf, simply stop calling the other functions on that packer. Then on the Dashboard side, instead of calling "unpack from string" on the received string, and instead use the string as is and write it to a file or an indicator or whatever.
Thanks Joe.

How do you wait for a new DS packet?
Reply With Quote
  #27   Spotlight this post!  
Unread 12-02-2010, 02:41
jhersh jhersh is offline
National Instruments
AKA: Joe Hershberger
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 1997
Location: Austin, TX
Posts: 1,006
jhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond repute
Re: outputting data to DS's usermessage

Quote:
Originally Posted by yoyodyne View Post
Thanks Joe.

How do you wait for a new DS packet?
You can call IsNewControlData() on the DriverStation object.

Generally this shouldn't be necessary for this use case since usually the dashboard is expecting one or the other... so your robot program should only be using one or the other.

The only case I can see where you would use this is if you would like to print one set of messages each time a packet goes out, then you could use this to tell when that happens.

-Joe
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Voltage not outputting to the Drivers Station Ryutso Electrical 8 09-02-2010 11:39
Periodic Task Data --> Robot Data Kahn! NI LabVIEW 3 10-02-2009 19:38
Sending user data, parsing user data. demosthenes2k8 NI LabVIEW 3 30-01-2009 13:51
PWMs not outputting in Autonomous 937Programmers Programming 15 08-02-2007 21:25


All times are GMT -5. The time now is 14:30.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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