-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implementing Escape State Machine for process console and command navigations #19
Implementing Escape State Machine for process console and command navigations #19
Conversation
About the suggestions, I would like to modify the
I would like to know what do you think about this perspective? |
I have changed the code a bit in order to encapsulate the history functionality in another structure, however I have not put the existance of the escape machine under the COMMAND_HISTORY_LEN > 1 condition, because for futher implementations for Left and Right functionalities we will not be needed the COMMANS_HISTORY_LEN. Also if you disagree with the encapsulation we can forget about this and go back to the commit When we will implement the Left, Right, Home and End, keys the code will be changed a little bit more because we have to get rid of the |
Also in jettr's message he metioned something about a |
For this implementation the size has increased around 200 bytes in both enabled and disabled states, because the escape machine is not designed in general just for the command history |
Kind reminder to review this, I need this in order to continue with further implementations. :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks really nice.
With this new commit, I have solved the review problems. As usually, I have run With your confirmation I would like to move on the next phase, in order to implement So the next phases that I have in mind are:
Please, I would like to know if it is alright for the next steps. Thanks for the review. |
Yes, the PR looks very nice, start implementing the rest. |
With these commits, I have implemented the left, right, home, end and delete functionalities. As usual I have tested the implementation on a nrf52840dk board. I have also signed some constants to |
Moving to implement the |
As I have seen so far the ProcessConsole does not support escape sequences, because there are several ways to clear the screen using some escape sequences for example Another way of implementing the Is there a way to achieve this, by using escape sequences? Thanks for the answer. |
…wn Arrows) according to jettr's feedback
…field, working on it
…ant for most used ANSI characters
… modified insertion and deletion inside a command
This PR was send successfully to the upstream: tock#3414 |
@mihai-negru any updates here? |
Hi, sorry, I was a bit busy with math olympics, I am getting back to work this week in order to create the test script file for the escape state macilhine |
Hi, this pull request was merged into tock master at tock#3414 |
fc6256c
into
UPB-CS-OpenSourceUpstream:master
Thanks
Thanks to jettr for the escape state machine code snapshot and feedback
Pull Request Overview
This pull request implements the jettr's suggestion of implementing an escape state machine (tock#3381 (comment)).
Also this pull request implements new features over typing experience in the
ProcessConsole
, in order to make typing more dynamic.Added features
Left
andRight
arrows in order to navigate through a typing command.Home
andEnd
commands to move at the beginning or end of a command.Delete
key to remove the character under the cursor.Flash size for IMIX binary build:
new_code + history_size
Testing Strategy
This pull request was tested on a
nrf52840dk
boardChanged Files
capsules/core/src/process_console.rs
Documentation Updated
Updated the documentation in
doc/Process_Console.md
accordingly:TODO or Help Wanted
Feedback relating to optimize the new features and how to make a better
command_history
.Formatting
make prepush
.