Screen Update on CoolTerm for Raspberry Pi

If you have specific questions or problems with any of my Freeware applications, post them here.

Screen Update on CoolTerm for Raspberry Pi

Postby WarrenLeachPDX » Tue Mar 15, 2022 10:45 pm

Hello Roger,

CoolTerm is really cool. I've tried the rest and it is the best.

I have just started using CoolTerm on the Raspberry Pi and after the screen is filled with text (something on each line), each time a character is typed the screen is cleared and the entire stored buffer, including what scrolled off the top, is rewritten. It gets slower each time because there are more characters to send. Typing any character causes this. It is quite off-putting.

I'm using CoolTerm 1.9.1 on a Raspberry Pi 4 with the current Raspian.

Thank you,

Warren Leach
Posts: 2
Joined: Tue Mar 15, 2022 10:30 pm

Re: Screen Update on CoolTerm for Raspberry Pi

Postby roger » Wed Mar 16, 2022 3:27 pm

Hi Warren,

This is a known problem, and I haven't found a good solution around this yet. The terminal window (regardless of the current viewing mode) is essentially a live visualization of the receive buffer contents. This is fundamentally how CoolTerm has worked since its inception, and this had never been a problem while CoolTerm was only available for Mac and Windows. The Linux and ultimately the Pi versions came much later since it was not possible to build for these platforms at that time. Unfortunately, the the UI package in the distro used for the Raspberry PI doesn't support double-buffering the way other platforms do, so when the text control is told to update its contents with the new receive buffer contents, the control deletes the current contents and then applies the new contents. The problem is that the control forces a refresh after the contents are cleared, causing it to flash blank and the scrollbar to move up before the new contents are applied. I.e. a simple command like
Code: Select all
textfield.text = NewText
to assign new text to the textfield causes the textfield control to be drawn twice instead of just once after the new text has been applied. Other platforms don't do that. I have tried GTK calls to freeze the control temporarily to prevent the flicker to no avail. Fixing this would require things under the hood to change fundamentally, and I'm not prepared to do that. I'll keep looking for solutions to this problem, but I can't make any promises at this point. The only way to lessen the annoyance is to reduce the receive buffer size.

I'm currently working on a "avoid flicker" hack feature that can be enabled on Linux builds where users have an issue with this. This would only be available for plain text view mode. Instead of replacing the textfield contents each time new data is received, it appends the new data to what's already there. However, this will prevent several special character handling features from working properly (such as e.g. the feature to filter out ANSI escape sequences when they bytes in a sequence are not received at the same time) since the operate on the entire buffer contents before the data is sent to the text display. However, if a user isn't using any of these options, being able to turn on this hack should provide relief from the flicker.
I should have something ready for testing a in a few weeks. Let me know if you're interested in testing it.

User avatar
Site Admin
Posts: 290
Joined: Fri Apr 24, 2009 12:41 am

Re: Screen Update on CoolTerm for Raspberry Pi

Postby WarrenLeachPDX » Thu Mar 17, 2022 8:14 pm

Thanks for the explanation. Fortunately I don't need escape sequences so your fix won't be a problem.

The problem is solved in test build 1034 after checking the "Avoid Plain Text Flicker" option. Thanks for sending that.

One more picky thing. Sometimes the bottom of the output is sometimes not being scrolled correctly. If I show the help in the device I'm connected to, the bottom 20 lines are not scrolled into view. A simple workaround is to press return which brings the bottom line into view so it's not a big problem.

I will be using CoolTerm in a live stream product presentation and now I can use a Raspberry Pi instead of a laptop to go from RS232 to HDMI.

Thank you,

Posts: 2
Joined: Tue Mar 15, 2022 10:30 pm

Return to Support

Who is online

Users browsing this forum: No registered users and 1 guest