Go to Post Only time will tell for sure, but it seems that the current software providers are hatching up a pretty good solution to the problem. - dlavery [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
  #1   Spotlight this post!  
Unread 07-02-2013, 16:09
wag2625 wag2625 is offline
Registered User
FRC #2625
 
Join Date: Feb 2013
Location: Canada
Posts: 4
wag2625 is an unknown quantity at this point
Driver Station User Messages Not Updating

Hello, we are currently working on vision tracking for our robot using Wind River C++. We were attempting to use messages as debugs and realized that we are not receiving updates in the 'User Messages' section of the Driver Station.

This is the code being used to send and update messages to the Driver Station:

Code:
dsLCD->Printf(DriverStationLCD::kUser_Line1, 1,"Message\n");
dsLCD->UpdateLCD();
The user message will sometimes print once when the code is first deployed, but will not continue to update after that. We have tried running this command at various points throughout the program without success.

Any ideas???
Reply With Quote
  #2   Spotlight this post!  
Unread 07-02-2013, 20:12
ekapalka's Avatar
ekapalka ekapalka is offline
Registered User
FRC #3216
 
Join Date: Dec 2012
Location: Bermuda
Posts: 277
ekapalka has a spectacular aura aboutekapalka has a spectacular aura about
Re: Driver Station User Messages Not Updating

I'm not sure if this fixes your problem, but we've been printing data to the driver station like this:
Code:
//initialize		
DriverStationLCD *dsLCD = DriverStationLCD::GetInstance();
Code:
dsLCD->Printf(DriverStationLCD::kUser_Line1, 1, "Here is some text");
dsLCD->UpdateLCD();
Wait(0.1);
or like this:
Code:
dsLCD->PrintfLine(DriverStationLCD::kUser_Line1, "Here is some more text");
dsLCD->UpdateLCD();
Wait(0.1);
Because you defined the line to print on (the number after kUser_Line1, x), you don't need the /n to go to the next line (I think). This may need confirmation. Good luck :D
Reply With Quote
  #3   Spotlight this post!  
Unread 08-02-2013, 09:58
kenfox kenfox is offline
Registered User
FRC #3322 (Eagle Imperium)
Team Role: Mentor
 
Join Date: Jan 2013
Rookie Year: 2013
Location: Ann Arbor, MI
Posts: 51
kenfox is a glorious beacon of lightkenfox is a glorious beacon of lightkenfox is a glorious beacon of lightkenfox is a glorious beacon of lightkenfox is a glorious beacon of light
Re: Driver Station User Messages Not Updating

Quote:
Originally Posted by wag2625 View Post
Code:
dsLCD->Printf(DriverStationLCD::kUser_Line1, 1,"Message\n");
dsLCD->UpdateLCD();
The user message will sometimes print once when the code is first deployed, but will not continue to update after that.
I haven't used the LCD yet, but it works by sending a big block of text that sets every character on the display. You don't want to include newlines (even if the LCD hardware handles them, it would mess up the position of the other text being displayed).

Your code will write "Message" on line 1 starting at column 1. If you run it again it will do the same thing. Maybe try something like this to see if it's updating:

Code:
dsLCD->Printf(DriverStationLCD::kUser_Line1, 1, "Time %8.3f", Timer::GetPPCTimestamp());
dsLCD->UpdateLCD();
Reply With Quote
  #4   Spotlight this post!  
Unread 12-02-2013, 15:46
wag2625 wag2625 is offline
Registered User
FRC #2625
 
Join Date: Feb 2013
Location: Canada
Posts: 4
wag2625 is an unknown quantity at this point
Re: Driver Station User Messages Not Updating

Thanks, we were able to debug the code with that
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


All times are GMT -5. The time now is 18:20.

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