Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 10:50 11 Nov 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : GtxTerm Issue.

Author Message
Phil23
Guru

Joined: 27/03/2016
Location: Australia
Posts: 1667
Posted: 08:54am 07 May 2018
Copy link to clipboard 
Print this post

Probably for Rob,

Been pretty much relying on it for most of my console viewing & a bit of editing.
Fired it up yesterday to interact with my Ceiling Heating. All looked fine; then I hit one of the hot keys & my menu didn't display.

Screen caps will better explain, where I ran simultaneous connections with Gfx & Teraterm.



This is the normal data screen, with the hot keys listed at the bottom.




This is what I get when I hit "P" to change to a different control point.

It's the very bottom two lines that are missing; not that clear in the pics.





The screen cap misses it, but there's a red flashing cursor at the same place as in TT.


Cheers

Phil. Edited by Phil23 2018-05-08
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2463
Posted: 12:19pm 07 May 2018
Copy link to clipboard 
Print this post

has the text ever been visible in an earlier version of GFXterm? it sounds like you may possibly be printing black text on a black background.

when you bring up the right-click menu and select 'select and copy' you should see a monochrome version of the screen, black text on a grey background. is the missing text visible there?

and are you using any escape sequences to position the cursor or to set a scroll region? you can reset GFXterm while it is running by pressing alt-R. as i recall this resets colours to their defaults, as well as resetting any scroll region that has been set.


cheers,
rob :-)
 
Phil23
Guru

Joined: 27/03/2016
Location: Australia
Posts: 1667
Posted: 08:36pm 07 May 2018
Copy link to clipboard 
Print this post

  robert.rozee said   has the text ever been visible in an earlier version of GFXterm? it sounds like you may possibly be printing black text on a black background.[/quote]

Don't Recall if I've changed a setting in the past anywhere other than in TT,

[Quote]when you bring up the right-click menu and select 'select and copy' you should see a monochrome version of the screen, black text on a grey background. is the missing text visible there?[/quote]

No Still not Visible.

[Quote]and are you using any escape sequences to position the cursor or to set a scroll region?


This writes the screen every 500mS.
I do position it a bit & clear certain bits.
See below.

  Quote  sub process2
Local Integer Pn

if MenuUp=0 then ' don't mess up the menu screen

request_DO
20, 1 '------------------------------------- Put the green light on

Print Esc+"[f"; 'Move cursor to upper left corner
Print " P# Description M C_Val Pre_3 Pre_2 Pre_1 R_Val D_Val On/Up Of/Dn";Esc+"[K" ' Clear to EOL
Print "================================================================================";Esc+"[K"

For Pn=1 To Last_Pt
if S_Desc$(Pn)<>"" And Pn > 9 then
if Pn=Pt then Print Esc+"[4m"; Else Print Esc+"[0m"; 'Set the Underline Attribute for Active Point
'If Pn=Pt then Print Esc+"[33m"; Else Print Esc+"[34m"; 'Set the Underline Attribute for Active Point
if Pn=Pt then Print "* "; Else Print " ";
Print Str$(Pn,2);" ";S_Desc$(Pn);Tab(21);
if I(Pn,Mode)=1 then Print " A"; Else Print " D";
Print Str$(V(Pn,Cln_Val),4,2);Str$(V(Pn,Prev_Val3),4,2);Str$(V(Pn,Prev_Val2),4,2);Str$(V(Pn,Prev_Val1),4,2);
Print Str$(V(Pn,Value),4,2);Str$(V(Pn,Def_Val),4,2);
Print Str$(I(Pn,Curr_onup),4);"/";Str$(I(Pn,Time_onup));Tab(73);Str$(I(Pn,Curr_offdwn),3);"/";Str$(I(Pn,Time_offdwn));Esc+"[K"
End if
Next Pn

Print Esc+"[J"; 'Clear to end of Screen....
Print Esc+"[22;1f"; 'Move Cursor to line 22
Print "--------------------------------------------------------------------------------"
Print "Options:- (P)-Change Point. (A/D)-Mode. (*)-Default. (+/-)-Up/Down Counters"
Print "Current Time is :- "; Time$;" System Up Time is:- "; UpTime();Esc+"[f";

request_DO
20,0 'green light off
Timer_Con=Timer
End if
End sub




When I hit P, Inkey$ drops me here, with the value of MenuUp being 0...

  Quote   CASE "P","P"
if MenuUp=1 then Print "Changing pt Number"
inp_desc$ =
"Enter Point Number (Currently " + Str$(pt )+ "):"
Print inp_desc$+Esc"[J";
input "",inp_val
if inp_val > last_pt OR inp_val=0 then
Print "INVALID Entry"
Else
pt = inp_val
End if
if MenuUp = 1 then domenu

CASE "*"



Could be that Esc[J is clearing the entire line.
I believe Esc[J should clear from the cursor to End of screen, but find that varies.
Some definitions say cursor position down, others say current line down.


Phil.

Edited by Phil23 2018-05-09
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2463
Posted: 05:50am 08 May 2018
Copy link to clipboard 
Print this post

you are indeed right, it was a bug in the implementation of Esc[J
after clearing to the end of the current line, my code was supposed to fully clear any subsequent lines down to the end of the screen. instead it started fully clearing at the current line. the fix was adding "+1" in the appropriate place.

give the attached version a try:
2018-05-08_153959_GFXterm_8-may-2018.zip

(it contains a few other small fixes in other places too)

have been under the weather for the past few weeks (a rather persistent stomach bug that is doing the rounds here in nz), when i'm up to it will package up and upload the new version (and sources) to the document register.


cheers,
rob :-)
 
Phil23
Guru

Joined: 27/03/2016
Location: Australia
Posts: 1667
Posted: 09:39am 08 May 2018
Copy link to clipboard 
Print this post

Thanks Rob,

Works as expected now.

Cheers
Phil.
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025