-
Notifications
You must be signed in to change notification settings - Fork 747
pconsole: support a "hibernation" mode #3557
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
Conversation
This prevents it from parsing commands and showing the prompt, which is useful for using a console-based app with the pconsole included in the kernel.
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.
I like the idea here.
How does this work in practice with an interactive application? Does the pconsole
win all user text input unless it's hibernating?
In practice from a user's point of view, if pconsole is active it works exactly as it does today. If pconsole is hibernating it works exactly as if the pconsole was not started or not included on the board. |
Example, with breaks I added manually
|
This looks good to me. I think there is maybe a slightly more elegant version that (a) uses control sequences (which might require special support from tockloader, I'm not sure) and (b) hides input from apps and app output from the console when pconsole is active. But this is better than what we have and I like it! |
Pull Request Overview
This pull request updates the process console to include a "hibernation" mode where the process console is still listening but doesn't respond to any commands or show the prompt. This allows the process console to get out of the way of an app that is using the console (particularly interactive apps).
This adds two pconsole commands:
console-start
console-stop
to implement this.
Boards can choose which mode to default to by calling either
pconsole.start()
orpconsole.start_hibernated()
.Additionally:
rx_in_progress
which was set but never readTesting Strategy
Using the pconsole with an interactive app.
TODO or Help Wanted
n/a
Documentation Updated
/docs
, or no updates are required.Formatting
make prepush
.