GithubHelp home page GithubHelp logo

Would like to contribute about tinyconsole HOT 5 OPEN

imrenor avatar imrenor commented on June 12, 2024
Would like to contribute

from tinyconsole.

Comments (5)

hsaturn avatar hsaturn commented on June 12, 2024

Hi

Thanks for your comment. To be honest, I'm surprised that one could be interrested with this lib.

Add full support for xterm over telnet. I have TinyConsole working over a websocket stream, but control commands are currently very sketchy. Need to understand and comply with telnet protocol.

Telnet with TinyConsole works out of the box with ESPTelnet (I've make the author accept a very little PR for this). But the point is that it is slow...

The slowness seems to be related to lot of packets transmitted. I tried a bufferize output with no success. I need this too, but am too busy with TinyMqtt to work on Console yet.

In my memory, setting Stream* serial to a ESPTelnet instance was doing the job if you want to check.

Add callback for ASCII C0 control characters. See [my branch](https://github.com/imrenor/TinyConsole/tree/DEV_imrenor_ASCII_C0_Contol_Keys_Callback)

The main goal is to provide an api for a command line interpreter to be able to manipulate input and cursor in response to C0 characters. A good example is tab completion.
Current TODO is to solve passing input and cursor to C0 callback. E.g. as parameters to callback function. I'd like to know your opinion on this one. 

Good idea. I wanted to integrate a generic tab completion instead. Would suffice in many cases as a bash style completion would probably be too huge for an embedded device but I tought of it too with a command descriptionsFor example a description like
pin # [output|input]# expects a number

I'll probably reach this with my roomba project.

Focus a bit more on being instance based instead of the global TinyConsole approach. In my scenario each telnet session should have their own TinyConsole instance. Serial TinyConsole access is optional. I was thinking of adding support for define NO_GLOBAL_TINYCONSOLE on top of current NO_GLOBALS and NO_GLOBAL_SERIAL. Also need to make sure that an instance and related resources can be fully destroyed once the telnet session end.

Why not. I hate global instance, but this is the way almost all libraries are built. I wanted not to pertub common users of the lib.But after all, if one wants a console, this is probably a guy who is aware of this....I don't like defines, because they are a pain when using the arduino IDE's. (Hard to add a define, I even not know how to do this).With platformio, this is not a problem.

Make debug option better. Currently it is only possible by changing TinyConsole.cpp. Add an external way of turning debug on and off. Possibly thru a variable. Downside is that debug code is always compiled, but I don't see that as a big problem on an ESP (takes only a small flash space). 

Hmmm.. not sure on that point. Debug code makes binary grow.

As I said, I really have no time yet for TinyConsole. I have issues on TinyMqtt which are critical, and even don't have a lot of time to spend on it unfortunately.
I'll have a look once major issues are solved. Especially with Telnet point (as I need this too)

Best regards

from tinyconsole.

hsaturn avatar hsaturn commented on June 12, 2024

If you want to contribute we should discuss about new features.

One rule if you want to contribute: write a unit test for new features.
Writing examples would be a good thing also.

Under linux, I've just wrote for you this bootstrap shell script. That could help you to understand how to write and run unit tests

cd $HOME
mkdir -p unit_tests
cd unit_tests
git clone https://github.com/hsaturn/TinyConsole.git
git clone https://github.com/hsaturn/EpoxyDuino.git
git clone https://github.com/bxparks/AUnit.git                                                                      
cd $HOME/unit_tests/TinyConsole/tests
make runtests

I guess you should be comfortable with dependencies: g++, make etc.

Note: this script should work under Cygwin, but this is not the case. For an unknown (and really strange) reason, the Injection folder under EpoxyDuino is removed during the compilation ..... So use with care, a whole folder is removed during the make process. Under windows this could be harmfull. I suggest you to use a virtual machine or to create a dedicated user under linux, this would prevent any unwanted deletion.

Best regards

from tinyconsole.

hsaturn avatar hsaturn commented on June 12, 2024

Note, this is not ESPTelnet but ESPTelnetStream

using Console.begin(ESPTelnetStream);

I'm trying to include this in TinyMqtt/examples/tiny-tests that makes intensive use of TinyConsole.

from tinyconsole.

imrenor avatar imrenor commented on June 12, 2024

Hi,

Thanks a lot for all the info above. I also don't have much time to work on my ESP projects, so don't expect an immediate boom of new features from me :)
I'll take a look at ESPTelnetStream also to get a better insight.
I'll also try the unit tests. I'm currently developing my embedded projects on an old windows laptop, but I'm in the process of moving them to my aws linux desktop. There it should work fine.

I'm also very interested in TinyMqtt, just not there yet :) At some point I'm aiming to setup an esp32 as an mqtt broker and TinyMqtt looks very promising.

Thanks again,
Norbert

from tinyconsole.

hsaturn avatar hsaturn commented on June 12, 2024

Hello

I will change almost all !
I need more than a console: a terminal.

Thus, TinyConsole will change a lot and will manage only the command line while a new class TinyTerm will handle the terminal itself.
In fact, this was a bad design to have a class handling both. (And... it breaks SOLID rules...)

I will try to keep as most as possible a similar interface, but I already know that this is not 100% possible.

TinyConsole handle a command line, while TinyTerm handles the Terminal. So, TinyConsole needs a TinyTerm to work properly.

I will probably release a 2.0 version because API will change.

from tinyconsole.

Related Issues (4)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.