Go to Post The teams that know how to build good robots are the same teams that know how to build good teams, and they engage the students every step of the way. - Chris is me [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
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 18-03-2010, 01:22
Geek 2.0 Geek 2.0 is offline
Registered User
FRC #0107
Team Role: Programmer
 
Join Date: Sep 2009
Rookie Year: 2008
Location: Holland, MI
Posts: 120
Geek 2.0 will become famous soon enough
Virtual Console Backspace Character?

This isn't all that important, but it's a curious thing for me... Is there a backspace command we can send to the Virtual Console to backspace the last character sent? I tried "\b" but it didn't work...

Again, it's not important, but ever since the build season ended, programming (outside of competitions, that is) has been rather dull, so I'm adding "fun" code. (and yes, I realize the danger of this)
Reply With Quote
  #2   Spotlight this post!  
Unread 18-03-2010, 18:38
Robototes2412's Avatar
Robototes2412 Robototes2412 is offline
1 * 4 != 14
FRC #2412 (Robototes)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2007
Location: Bellevue
Posts: 312
Robototes2412 is on a distinguished road
Re: Virtual Console Backspace Character?

The standard linux escape list can be shown here:

List of escaped characters

Yes, im referencing an AWK manual, but it has the list I use all the time.

The closest character to it is a space because there is to backspace escaped sequence. It is interpreted by the scanf, raw_input, readline, or whatever function your language of choice uses to get input from the user.

A word of advice: fun code blows up speed controllers
Reply With Quote
  #3   Spotlight this post!  
Unread 24-03-2010, 21:34
LukeS LukeS is offline
4272 mentor, 1024 alumnus
AKA: Luke Shumaker
FRC #4272
Team Role: Mentor
 
Join Date: Mar 2009
Rookie Year: 2009
Location: Indianapolis, IN
Posts: 60
LukeS is an unknown quantity at this point
Re: Virtual Console Backspace Character?

'\b' for backspace should work, however, it will not be able to delete a newline, so you may have problems with println appending newlines. Though, I haven't tried this on the cRIO or anything.

And when messing around be careful, but hey anything worth doing has some risk.
Reply With Quote
  #4   Spotlight this post!  
Unread 25-03-2010, 12:03
Geek 2.0 Geek 2.0 is offline
Registered User
FRC #0107
Team Role: Programmer
 
Join Date: Sep 2009
Rookie Year: 2008
Location: Holland, MI
Posts: 120
Geek 2.0 will become famous soon enough
Re: Virtual Console Backspace Character?

Quote:
Originally Posted by LukeS View Post
'\b' for backspace should work, however, it will not be able to delete a newline, so you may have problems with println appending newlines. Though, I haven't tried this on the cRIO or anything.

And when messing around be careful, but hey anything worth doing has some risk.
Yeah, I tried '\b' but it didn't work. Really, all I was trying to make was a "spinning" line, with |, \, -, and / looping so that it created the illusion that it was spinning. Now this might seem pointless, but there actually was a reason... I was getting sick of the disabled loop spitting out endless lines of code, yet I wanted a way to tell if it was still reading from the cRIO. Not important though. I might look at it more in my spare time (as if I have any now).
Reply With Quote
  #5   Spotlight this post!  
Unread 25-03-2010, 12:23
TubaMorg TubaMorg is offline
Programmermechanicalelect ricalcoach
AKA: Dan
FRC #1480 (Robatos Locos)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Houston
Posts: 450
TubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond repute
Re: Virtual Console Backspace Character?

Are you talking about the driver station console? If so it is treated analogous to the LCD screen of last year which means you are essentially "painting" characters on the screen. To delete characters you have to output a space at that position.

Example:

"here is some text"
to just say 'here' you would have to output
"here "
to erase the entire line:
" "

So for your thing instead of backspace:
"|"
" "
"\"
" "
"-"
" "
"|"
etc.....

Also keep in mind that an update signal must be sent each time the LCD text is set or it won't appear animated.

If I am totally misunderstanding what you are trying to do...apologies!
You can try a unicode backspace too: \u0008
__________________
I don't need a signature.
Reply With Quote
  #6   Spotlight this post!  
Unread 25-03-2010, 17:00
LukeS LukeS is offline
4272 mentor, 1024 alumnus
AKA: Luke Shumaker
FRC #4272
Team Role: Mentor
 
Join Date: Mar 2009
Rookie Year: 2009
Location: Indianapolis, IN
Posts: 60
LukeS is an unknown quantity at this point
Re: Virtual Console Backspace Character?

Quote:
Originally Posted by TubaMorg View Post
Are you talking about the driver station console? If so it is treated analogous to the LCD screen of last year which means you are essentially "painting" characters on the screen.
I think he's talking about the `System.out' (stdout in non-Java lingo) stream--In Netbeans, and you click run, the output box will start streaming stdout from the cRIO once it is done compiling.

Although, We have found that unless you need more than 21 columns per line (the physical size of last year's LCD), using the text area on the driver station is better for just about everything. If certain aspects of it are a pain, borrow our LCD.java from our code.

Quote:
Originally Posted by Geek 2.0 View Post
Yeah, I tried '\b' but it didn't work. Really, all I was trying to make was a "spinning" line, with |, \, -, and / looping so that it created the illusion that it was spinning. Now this might seem pointless, but there actually was a reason... I was getting sick of the disabled loop spitting out endless lines of code, yet I wanted a way to tell if it was still reading from the cRIO. Not important though. I might look at it more in my spare time (as if I have any now).
Hey you don't need to explain the importance of a baton to me.
Reply With Quote
  #7   Spotlight this post!  
Unread 26-03-2010, 00:12
Joe Hershberger Joe Hershberger is offline
National Instruments
AKA: jhersh
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: Nov 2005
Rookie Year: 1997
Location: Austin, TX
Posts: 148
Joe Hershberger is a name known to allJoe Hershberger is a name known to allJoe Hershberger is a name known to allJoe Hershberger is a name known to allJoe Hershberger is a name known to allJoe Hershberger is a name known to all
Re: Virtual Console Backspace Character?

It's a console, right? So why not try the backspace? Have you tried ctrl-h (0x08)?

-Joe
Reply With Quote
  #8   Spotlight this post!  
Unread 28-03-2010, 19:00
Robby Unruh's Avatar
Robby Unruh Robby Unruh is offline
*insert random dial-up tone here*
FRC #3266 (Robots R Us)
Team Role: Coach
 
Join Date: Feb 2010
Rookie Year: 2010
Location: Eaton, OH
Posts: 338
Robby Unruh will become famous soon enough
Re: Virtual Console Backspace Character?

Quote:
Originally Posted by Joe Hershberger View Post
It's a console, right? So why not try the backspace? Have you tried ctrl-h (0x08)?

-Joe
If what Joe said doesn't work, you could try \010, a backup for \b.
Reply With Quote
  #9   Spotlight this post!  
Unread 29-03-2010, 01:56
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: Virtual Console Backspace Character?

Quote:
Originally Posted by Robby Unruh View Post
If what Joe said doesn't work, you could try \010, a backup for \b.
Last I checked, 010 == 0x08 == 8. Welcome to the world of octal... aka base-8 numbers.
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
Animated Character Help 16MentalTempest 3D Animation and Competition 13 29-03-2009 15:53
Line Continuation Character in MPLAB? brianafischer Programming 4 27-01-2007 19:26
Name That Character! Amber H. Chit-Chat 18 17-01-2003 15:44
character studio archiver 2001 2 23-06-2002 23:41
ss of team 30's main character =) RobDeCotiis 3D Animation and Competition 0 18-02-2002 08:19


All times are GMT -5. The time now is 11:16.

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