-
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
process_console command history #15
process_console command history #15
Conversation
First drat of TRD for license and copyright rules for the Tock project.
…ignore all files without license headers.
ba4b649
to
f44fb38
Compare
Also, a recommendation is to run |
Our suggestion is to do one of the following:
|
I would go with the second bullet-point, if it's ok with you @MATrix22. |
Yes, it is ok, i will try to make the modifications on Sunday if it's alright? |
…ate examples, include "Copyright Tock Contributors" in the examples.
License policy 2023-01-23 core call updates
…ividual contributor copyright from the main example.
@CosminGGeorgescu I created this char room to discuss futher implementations |
Testing the implementation on the nrf52840dk chip I found that typing the same command multiple times when pressing the up arrow promts all the inserted commands multiple times even though they are the same, I think it would be better if the command equals to the previous command we should not to insert into the structure. @CosminGGeorgescu what do you thing about this? |
Intended as to mimic an unconfigured Bash. However, if @alexandruradovici or @valexandru object, a |
@CosminGGeorgescu do you have any branch protection? @MATrix22 gers an error when trying to push to. |
Should be good by now. |
…ommand history is disabled
…ion for the ProcessConsole using custom COMMAND_HISTORY_LEN
…d, just the modifications were registred, not all command
…ces and remove unnecessary white spaces between command words
…ing + adding new bytes does not accumulate test between unfinished commands
2ceb400
to
3726a3e
Compare
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.
Let's send this to upstream. When writing the pull request, please fill out the form from the pull request template and actually run the make prepush
command.
PR sent tock#3381. |
Please write the full pull request message from here to upstream, including the code sizes and the fact that this changes does actually decrease code size if disabled. |
Co-authored-by: Alexandru Radovici <msg4alex@gmail.com>
Instead of checking if the buffer is filled up, try to get the byte from the desired position. If returns Some(byte_buffer) update the byte from `EOL` to `byte`, if None returned do nothing. (P.S: the same functionality is achieved). Tested on `nrf52840dk` and works as expected.
Just changed the inner method to match the same style as the `insert_byte` method (also tested on the `nrf52840dk` board).
Pull Request Overview
This pull request adds an easy-to-use Bash-like command history for the process console.
Added features
main.rs
.up
ordown
by pressingup
anddown
arrow keys respectively.up
ordown
arrow saves the unfinished command and can be fetched back by going to the bottom of command history.up
ordown
arrow).Code size for IMIX binary build with enabled/disabled command history:
Testing Strategy
The implementation of the command history was tested on the
nrf52840dk
andesp32-c3-devkitM-1
boards.Files changed
capsules/process_console.rs
~ implementation for command history
boards/components/process_console.rs
~ added a new branch to process_console_component_static macro for easily enable/disable the command history
Documentation Updated
Updated the documentation in
doc/Process_Console.md
accordingly :Formatting
make prepush