Go to Post If it is good enough for Paul and JVN it's good enough for me. - Vikesrock [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

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 13-01-2013, 21:50
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
Printing over other text

Hello! I'm having a small bit of trouble. Nothing critical, but I was wondering if someone could quickly clear something up for me. How do I print text (to the driver station) which completely replaces the previous line? Here is my code:
Code:
                        if (joyTrigger)
			{
				dsLCD->Printf(DriverStationLCD::kUser_Line1, 1, "Trigger");
				dsLCD->UpdateLCD();
				Wait(0.1);
			}
			else if (Button2)
			{
				dsLCD->Printf(DriverStationLCD::kUser_Line1, 11, "BottomThumbButton");
				dsLCD->UpdateLCD();
				Wait(0.1);
			}
What it outputs is the current button (on the joystick). When I press a different button, it overwrites only the space it needs, so if I had it print something like "1111111111" and then something like "22222", it would end up printing "2222211111". I'm pretty sure it's just taking over the spaces, and not pushing the old text to the end of the line where it disappears. I know I could fix it by adding a bunch of spaces after each print, but is there another way? Thanks!
Reply With Quote
 


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 00:18.

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