8000 ESP32: Ctrl-F special key breaks existing code · Issue #137 · pycom/pycom-micropython-sigfox · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Sep 16, 2024. It is now read-only.

ESP32: Ctrl-F special key breaks existing code #137

Closed
robert-hh opened this issue Feb 14, 2018 · 2 comments
Closed

ESP32: Ctrl-F special key breaks existing code #137

robert-hh opened this issue Feb 14, 2018 · 2 comments

Comments

@robert-hh
Copy link
Contributor
robert-hh commented Feb 14, 2018

It's a breaking change and interferes with code, that expects a transparent interface from USB. That code would typically use micropython.kbd_intr(-1) to set the UART/Telnet to a transparent mode, as documented. Maybe we could agree in that key_intr(-1) disables both special interrupt characters. That would however require to change pyexec.c in addtion to machuart.c and telnet.c, because in pyexec the interrupt_char is already set to -1. But since the value of -1 in pyexec is an arbitrary internal one, and kbd_intr(-1) was already given as example in the documentation, it's better to change pyexec.c

Edit: Alternatively, kbd_intr() could get a second optional parameter to set the hard reset key, which is now Ctrl-F:
kbd_intr(-1) sets both interrupt_char and reset_char to -1
kbd_intr(interrupt_char) would just set interrupt_char to the given value
kbd_intr(interrupt_char, reset_char) sets both values.

Edit 2: For trial, I implemented both versions. The second alternative changes 6 files, but in a rather trivial way.

@robert-hh
Copy link
Contributor Author

I added a PR for the second option: #139

@robert-hh
Copy link
Contributor Author

Implemented meanwhile (at least: almost). Thanks a lot

peter-pycom pushed a commit that referenced this issue Jul 9, 2020
Fix for speedy Bluetooth NOTIFY events
X-Ryl669 pushed a commit to X-Ryl669/pycom-micropython-sigfox that referenced this issue May 12, 2023
Fix for speedy Bluetooth NOTIFY events
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant
0