![]() |
outputting data to DS's usermessage
Is there a simple way instead of doing the whole packing,etc. thing in the DS example to output text to the 'user messages' section in the DS? Can you just eg just do cout<<"hello world" or printf() to output messages? Thanks.
|
Re: outputting data to DS's usermessage
Look inside WPILib at the Dashboard.cpp file, especially at the function "Printf()". I think it allows you to print there, but I haven't tested it out.
|
Re: outputting data to DS's usermessage
Quote:
|
Re: outputting data to DS's usermessage
Quote:
|
Re: outputting data to DS's usermessage
We have been trying to output data to the driver station using DriverStationLCD and have not been successful. We are doing everything exactly like we did last year (which worked fine)--we establish a pointer and do a "Get Instance" and then use a printf statement to send the message, but nothing is appearing in the driver station message space. Is there something different this year regarding the way it works?
|
Re: outputting data to DS's usermessage
Quote:
|
Re: outputting data to DS's usermessage
Wasn't the DriverStationLCD class created to print text to the actual physical screen of the Driver Station last year?
To my knowledge, you print strings to the User Messages region in the dashbard using the Dashboard class. |
Re: outputting data to DS's usermessage
Quote:
-Joe |
Re: outputting data to DS's usermessage
Thanks for the response. And yes..I forgot to call update. I will test it tomorrow but expect that was my only problem.
|
Re: outputting data to DS's usermessage
I used this feature very successfully last year but only on 1 line. I had high hopes for this year.
I started trying to use this but cannot get it to work. I am writing to one line again. In this case the pointer is locally declared each time I come into the function I am using to write it. DriverStationLCD *p_dsLCD = DriverStationLCD::GetInstance(); p_dsLCD->Printf(DriverStationLCD::kUser_Line6, 1, "test" ); p_dsLCD->UpdateLCD(); I applied the last software update and now I get and errro on cRio boot. Warning: module 0x134ad80 (FRC_UserProgram.out) holds reference to undefined symbol _ZN16DriverStationLCD11kLineLengthE. (unloading partially loaded module FRC_UserProgram.out) ...FRC_UserProgram failed to load. If I comment out his code I am fine. Any ideas? |
Re: outputting data to DS's usermessage
Have you tried doing a clean and build?
|
Re: outputting data to DS's usermessage
We are also having pafwl's issue, and will post if we figure anything out. Cleaning does not resolve the issue.
|
Re: outputting data to DS's usermessage
Clean and Build did not fix the issue.
We commented out all the lines that use DriverStationLCD and that did not fix the issue. At this point we are in the process of reinstalling WindRiver workbench and not install the latest patch. Can someone please assist. Thanks, Sunit |
Re: outputting data to DS's usermessage
We are also having this problem with kLineLength. When we comment out the DriverStationLCD code the problem goes away. I looked at the new source code for the library and I didn't see anything obvious as to what would cause this. I'm beginning to suspect that something went wrong with the wpilib.a build in the latest update.
I haven't tried building the WPILIB from sources yet. |
Re: outputting data to DS's usermessage
We are also having the same problem. Anyone have a workaround for this?
|
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]
|
Re: outputting data to DS's usermessage
Code:
DriverStationLCD *myDS_LCD = DriverStationLCD::GetInstance(); |
Re: outputting data to DS's usermessage
Quote:
Brian |
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
|
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. |
Re: outputting data to DS's usermessage
Quote:
BC |
Re: outputting data to DS's usermessage
Quote:
|
Re: outputting data to DS's usermessage
The fix works but breaks the Camera. LCD is working great.
|
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 |
Re: outputting data to DS's usermessage
Quote:
-Joe |
Re: outputting data to DS's usermessage
Quote:
How do you wait for a new DS packet? |
Re: outputting data to DS's usermessage
Quote:
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 |
| All times are GMT -5. The time now is 12:39. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi