chipKIT® Development Platform

Inspired by Arduino™

Serial monitor

Created Sat, 27 Apr 2013 22:06:55 +0000 by majenko


Sat, 27 Apr 2013 22:06:55 +0000

I have been taking a look at the serial monitor with a view to overhauling it.

The current serial monitor consists of a simple text box that incoming text gets appended to. That is insanely simple - too simple to be usable for anything sensible.

To that end I have started working on a new version. I'm not happy with it yet - not by a long shot - as it consists of a grid of 80x25 JLabel widgets each with 1 character in it. While it works, it's not perfect - especially when you change the size of the window. The labels all stretch and warp making it look a bit off. Still, I have some ANSI codes working with it - clear screen, cursor positioning and foreground colour (more to come).

The autoscroll checkbox has morphed into a cursor enable/disable checkbox as autoscroll is now meaningless.

As always, this is in my testbed version: [url][/url] so have a play and see what you think.

Jacob Christ

Sun, 28 Apr 2013 22:29:57 +0000

This feature might be nice as an alternative terminal rather than a replacement, unless of course what you said holds, that at first use a user may ask why did I upgrade since nothing appears to have changed.



Sun, 28 Apr 2013 23:38:26 +0000

Yeah, as I said, this is a WiP and I'm not yet happy with it.

Ideally it would be functionally equivalent to the existing serial monitor but with the addition of reacting properly to ANSI control codes. At the moment it isn't.

There's no copy function - no idea how that could be implemented. I have looked at other Java terminal emulators, and they appear to do it all graphically, so how they'd do copy I haven't the faintest idea. I'd like to do away with the individual JLabels as that seems a bit clunky to me, but the only other option seems to be to do it graphically pasting text into a canvas some how. Unless there are other ways I don't know about? (suggestions please).

Otherwise, if that can't be (easily) done, then yes, having it as an "alternate" serial monitor (maybe a second check-box at the bottom for ANSI terminal on/off) would be a possibility.