Skip to content

Commit

Permalink
Added command history and line editing
Browse files Browse the repository at this point in the history
  • Loading branch information
RetiredWizard committed Nov 21, 2023
1 parent 9f2c6f2 commit bfc98c5
Show file tree
Hide file tree
Showing 3 changed files with 228 additions and 97 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
**The PyDOS repository: https://github.com/RetiredWizard/PyDOS**

Currently this requires:
- CircuitPython 9.x (alpha) - See [releases](https://github.com/RetiredWizard/PyDOS_virtkeyboard/releases) for firmware download
- CircuitPython 9.x - See https://www.circuitpython.org/downloads for firmware download

The hardware currently supported uses one or more of:
- "dot clock"/"666" display
Expand All @@ -17,7 +17,9 @@ The hardware currently supported uses one or more of:

This has only been tested using the [HackTablet](https://hackaday.io/project/185831-hacktablet-crestron-tss-752-teardown-rebuild), the [MaTouch ESP32-S3 7"](https://www.makerfabs.com/index.php?route=product/product&product_id=774) and the [Adafruit TFT FeatherWing V2](https://www.adafruit.com/product/3315)

The [**lib/pydos_ui_virt.py**](https://github.com/RetiredWizard/PyDOS_virtkeyboard/blob/main/lib/pydos_ui_virt.py) file performs the keyboard abstraction for PyDOS.
The [**lib/pydos_ui_virt.py**](https://github.com/RetiredWizard/PyDOS_virtkeyboard/blob/main/lib/pydos_ui_virt.py) file performs the keyboard abstraction for PyDOS.

Up/Down arrow, command history and line editing is supported. The Hacktablet has the arrow icons printed along the right border of the screen but for other tablets the vitual keyboard bitmap has not yet been updated.

To setup the virtual keyboard in PyDOS follow the standard PyDOS installation instructions and after
the setup.bat file has been run perform the following steps:
Expand Down
2 changes: 1 addition & 1 deletion lib/gt911_touch.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,6 @@ def _read(self, register, length, irq_pin=None) -> bytearray:

i2c.write(bytes([((register & 0xFF00) >> 8),(register & 0xFF)]))
result = bytearray(length)
time.sleep(.06)

i2c.readinto(result)
if self._debug:
Expand All @@ -249,6 +248,7 @@ def _write(self, register, values) -> None:
values = [((register & 0xFF00) >> 8), (register & 0xFF)] + [(v & 0xFF) for v in values]
#print("register: %02X, value: %02X" % (values[0], values[1]))
i2c.write(bytes(values))
time.sleep(.05)

if self._debug:
print("\t$%02X <= %s" % (values[0], [hex(i) for i in values[1:]]))
Expand Down
Loading

0 comments on commit bfc98c5

Please sign in to comment.