Page 1 of 1

App Developer - Console Text Viewer Functions

Posted: Thu Jun 27, 2024 12:46 pm
by jay_dee
Hi, These requests are specifically for the ConsoleTextViewer, for use on App Dev 2D Panels but I assume it is driven by the Console features.
In addition to the current Console Write functions, are any of these possible?

Set active Line
Set Cursor Position in Line.
Write Text at current Cursor Position.
Clear Specific Whole Line.
Clear from Cursor Position to End of line.
Clear from Cursor Position to Start of line.
Clear X Characters from Cursor Position.

This could create a powerful tool for sending messages and variable to a user defineable text menu, like a simplified VT100.
Alternative approach would be an App Dev 2D Panel version of a traditional LCD or GLCD Component, with user definable Rows and Columns.

Certainly not 5 Minutes work I am sure but very handy for Add Dev users! :)
J.

Re: App Developer - Console Text Viewer Functions

Posted: Tue Jul 02, 2024 12:25 pm
by BenR
Hello,

I've made a start on adding these functions into the console writer component. Hopefully shouldn't take long to complete.

Re: App Developer - Console Text Viewer Functions

Posted: Tue Jul 02, 2024 12:45 pm
by jay_dee
Thanks Ben,
Outputing simple text strings works pretty well for me as a Field diagnostic feature. I think it was Martin who put me onto VT100
Integrating a simple subset of this with App Dev, could look pretty nifty!
I look forward to any progress you can make.
This was last week, using my current serial diagnostics for monitoring a couple of custom projects to solve a problem for a customer, using Pi PICOs to do some CAN juggling!
VT100 (Medium).jpg
VT100 (Medium).jpg (111.33 KiB) Viewed 8740 times
At the customer (Medium).jpg
At the customer (Medium).jpg (124.36 KiB) Viewed 8740 times

Re: App Developer - Console Text Viewer Functions

Posted: Tue Jul 02, 2024 1:14 pm
by medelec35
jay_dee wrote:
Tue Jul 02, 2024 12:45 pm
Outputing simple text strings works pretty well for me as a Field diagnostic feature. I think it was Martin who put me onto VT100
Integrating a simple subset of this with App Dev, could look pretty nifty!
Ah, yes I remember that post well.
It's a shane the VT100 link does not work and images are missing.


What a great setup you have there!

Re: App Developer - Console Text Viewer Functions

Posted: Tue Jul 02, 2024 1:57 pm
by BenR
Ooh yes that looks like a brilliant setup :D thanks for sharing. What type of car is that?

I've completed the component additions and added the suggested functionality using the macro names shown below.

Set active Line - SetCursorPosition
Set Cursor Position in Line - SetCursorPosition
Write Text at current Cursor Position - AddStringAtCursor
Clear Specific Whole Line - ClearLine
Clear from Cursor Position to End of line - ClearFromCursorToLineEnd
Clear from Cursor Position to Start of line - ClearFromLineStartToCursor
Clear X Characters from Cursor Position - ClearXCharsFromCursorPosition

I've given it a quick test and it seems to be working but I haven't gone to town in terms of error checking so let me know if you find anything.

The up to date wiki page is here: https://www.flowcode.co.uk/wiki/index.p ... ndicators)

Re: App Developer - Console Text Viewer Functions

Posted: Tue Jul 02, 2024 3:35 pm
by jay_dee
Thanks Ben, I'll have a play!!
Customer project car...as ever I'm covered by NDA's but its fair to say it will be making its first public appearance at Goodwood festival of speed. I think its a chunk above a mil! Trust me, there are lot of little FC based problem solvers running around in Racecars, Hypercars and LeMans 24H... :) J.

Re: App Developer - Console Text Viewer Functions

Posted: Tue Jul 02, 2024 4:38 pm
by jay_dee
Maybe I'm doing something silly or miss interpreted its use. Started to create a basic menu in PC App Dev but not able to get anything to display on the ConsoleTextViewer when running as a simulation or as a deplyed app.
I linked ConsoleTextViewer to ConsoleWriter.
I have refreshed the database, restarted FC.
Console_Test_V2.fcsx
(17.66 KiB) Downloaded 359 times
:?

Re: App Developer - Console Text Viewer Functions

Posted: Wed Jul 03, 2024 9:48 am
by BenR
Hello,

Investigating for you now.

It seems to work if you fist do an AddString to initially add the data and then you can cursor around. I'll see if I can also make it work how you're trying to use it.

Re: App Developer - Console Text Viewer Functions

Posted: Wed Jul 03, 2024 10:23 am
by medelec35
Hi J.
Out of curiosity, have you seen this web page?

Re: App Developer - Console Text Viewer Functions

Posted: Wed Jul 03, 2024 10:26 am
by BenR
Hello again,

Right hopefully should work much better now.

If you want a fixed width font such as your values all appearing lined up then I've also added the ability for the console viewer to change the font and so you will be able to change the font to a fixed width font such as courier new.

Unfortunatley the text field isn't able to replicate the console window colours. If you need colours then you will have to use the console window for now.