scientifichackers / ampy

MicroPython Tool - Utility to interact with a MicroPython board over a serial connection.
MIT License
723 stars 157 forks source link

enter repl: Add small delay after interruption of running program #87

Closed mbuesch closed 4 years ago

mbuesch commented 4 years ago

This adds a small delay after the intitial CTRL-C to let the program terminate gracefully. This avoids timeouts in enter-repl.

devxpy commented 4 years ago

Looks good, thank you for your contribution. Sorry for the delay.

mbuesch commented 4 years ago

Thanks for merging.

For completeness I want to add this information: https://github.com/micropython/micropython/pull/5469

In that thread there is a more detailed analysis of why this happens. It turns out that this behaviour is probably caused by a bug in the ESP32 Micropython. However I think it's still fine to keep this as a workaround. It doesn't really hurt non-buggy versions and it definitely helps to connect to the buggy version.

devxpy commented 4 years ago

Thanks for the follow-up. We've been working on a rewrite of ampy that forgoes a whole class of issues related to raw reply communication, by using a purely WiFi based approach. Available on the ampy2 branch.