Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   C/C++ (http://www.chiefdelphi.com/forums/forumdisplay.php?f=183)
-   -   VT100 escape sequences or up a line on NetConsole (http://www.chiefdelphi.com/forums/showthread.php?t=115306)

Toa Circuit 23-03-2013 09:24

VT100 escape sequences or up a line on NetConsole
 
Does the NetConsole support VT100 escape sequences, or is there any other way for me to go up a line in it? Here is the code I want to use:

Code:

cout << "\x1b[A";
So that I can overwrite previous buffer stuff.

jhersh 25-03-2013 03:23

Re: VT100 escape sequences or up a line on NetConsole
 
Quote:

Originally Posted by Toa Circuit (Post 1251506)
Does the NetConsole support VT100 escape sequences, or is there any other way for me to go up a line in it? Here is the code I want to use:

Code:

cout << "\x1b[A";
So that I can overwrite previous buffer stuff.

I don't believe the NetConsole client supports that escape sequence, but trying it would be your best bet.

Toa Circuit 25-03-2013 10:50

Re: VT100 escape sequences or up a line on NetConsole
 
:eek:
Quote:

Originally Posted by jhersh (Post 1252265)
I don't believe the NetConsole client supports that escape sequence, but trying it would be your best bet.

Our robot is in the bag... would it be possible for someone to test if it works?

nightpool 04-04-2013 23:59

Re: VT100 escape sequences or up a line on NetConsole
 
I'm going to (without testing) give you a pretty solid "no dice". The NetConsole is pretty limited in what it supports. There are a few replacements out there, but if you're looking to update things frequently (what I inferred from your question) you're probably better off in the long run learning and using the smart dashboard.

Smart Dashboard calls are pretty easy to drop in, here are some common conversions:

For numbers, replace
Code:

cout <<  "Value: " << number_val << endl; // Substitute printf's to taste
with
Code:

SmartDashboard::PutNumber('Value', number_val);
For booleans:
Code:

cout << is_running ? "Motor is running" : "No motor running" << endl;
with
Code:

SmartDashboard::PutBoolean("motor running", is_running);
Of course, don't take my word for it, always check the docs, for example the copy hosted here: http://www.virtualroadside.com/WPILi...dashboard.html or the one that came with your WPILib installation (at C:\WindRiver\docs\extensions\frc\WPILib C++ Reference.chm).


All times are GMT -5. The time now is 12:51.

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