Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   C/C++ (http://www.chiefdelphi.com/forums/forumdisplay.php?f=183)
-   -   outputting data to DS's usermessage (http://www.chiefdelphi.com/forums/showthread.php?t=81829)

kennypu 02-03-2010 06:20 PM

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.

1951-44U 02-03-2010 06:50 PM

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.

jhersh 02-04-2010 01:47 AM

Re: outputting data to DS's usermessage
 
Quote:

Originally Posted by kennypu (Post 912788)
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.

Yes.. use the DriverStationLCD class to write to the User Messages box on the Driver Station.

jhersh 02-04-2010 01:48 AM

Re: outputting data to DS's usermessage
 
Quote:

Originally Posted by 1951-44U (Post 912807)
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.

That sends to the dashboard, not the driver station. Use DriverStationLCD to write to the User Messages on the Driver Station.

Lucie365 02-04-2010 11:46 AM

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?

Joe Ross 02-04-2010 12:02 PM

Re: outputting data to DS's usermessage
 
Quote:

Originally Posted by Lucie365 (Post 913250)
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?

Are you calling update?

slavik262 02-04-2010 12:02 PM

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.

jhersh 02-04-2010 01:03 PM

Re: outputting data to DS's usermessage
 
Quote:

Originally Posted by slavik262 (Post 913267)
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.

You can do that too, but to see it, you need to add a text display to your dashboard. The DriverStationLCD interface is implemented in the "User Messages" box for the new DriverStation. Any code that would print on the Blue DS's LCD will now print in User Messages box of the soft DS.

-Joe

Lucie365 02-04-2010 09:32 PM

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.

pafwl 02-06-2010 06:45 AM

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?

bronxbomber92 02-06-2010 10:25 AM

Re: outputting data to DS's usermessage
 
Have you tried doing a clean and build?

Thyn 02-06-2010 11:30 AM

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.

sunit 02-06-2010 01:36 PM

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

Mike Mahar 02-07-2010 09:07 AM

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.

LyraS 02-07-2010 11:32 PM

Re: outputting data to DS's usermessage
 
We are also having the same problem. Anyone have a workaround for this?


All times are GMT -5. The time now is 09:39 AM.

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