Skip to content
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

#272 - Scripting Input terminal #273

Merged
merged 11 commits into from
Oct 18, 2020
Merged

#272 - Scripting Input terminal #273

merged 11 commits into from
Oct 18, 2020

Conversation

vintagepc
Copy link
Owner

Description

Adds a terminal feature for scripting input as discussed at the group call - as suggested by @wavexx

Behaviour/ Breaking changes

Should not break anything existing. Terminal is not enabled by default, and:

  • Mouse over the terminal area to give it focus and have it receive the key commands. Terminal has focus when the _ cursor appears.
  • Is enabled by passing --terminal to the program arguments
  • Is locked while a script is running
  • Offers Tab auto-completion based on the shown suggestion
  • Entries are sticky for rapid command adjustment (i.e. they do not clear after being executed).
  • ESC key will clear the line if desired.
  • No left/right cursor positioning at the moment, DEL/Backspace will delete the last character.

Future ideas/improvements

  • Provide status readback of the last command you typed
  • Show command help too?
  • Polish - layout probably breaks if MMU is enabled. Will need to fix that.

Have you tested the changes?

Locally - This is a draft PR for others to chime in and offer suggestions/enhancements before we commit and fully integrate/polish it.

Other

Use caution when making changes; things will need to cross thread boundaries between the GL and AVR threads. -DTHREAD_SANITY=1 is your friend.

Linked issues:

@vintagepc vintagepc requested a review from wavexx October 15, 2020 18:09
@codecov-io
Copy link

codecov-io commented Oct 15, 2020

Codecov Report

Merging #273 into master will decrease coverage by 1.29%.
The diff coverage is 25.71%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #273      +/-   ##
==========================================
- Coverage   89.84%   88.55%   -1.30%     
==========================================
  Files         137      137              
  Lines        6167     6289     +122     
==========================================
+ Hits         5541     5569      +28     
- Misses        626      720      +94     
Impacted Files Coverage Δ
parts/ScriptHost.h 92.30% <0.00%> (-7.70%) ⬇️
parts/components/A4982.cpp 100.00% <ø> (ø)
parts/ScriptHost.cpp 56.72% <19.81%> (-14.71%) ⬇️
MK404.cpp 89.08% <50.00%> (-5.58%) ⬇️
utility/MK3S_Bear.h 100.00% <0.00%> (+40.00%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0f083c0...64a3f40. Read the comment docs.

@vintagepc vintagepc marked this pull request as ready for review October 16, 2020 20:45
@vintagepc vintagepc merged commit 8a8b048 into master Oct 18, 2020
@vintagepc vintagepc deleted the 272-input-terminal branch October 18, 2020 13:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE] Terminal Console
2 participants