Skip to content
Snippets Groups Projects
Commit eb7637ba authored by Robert HH's avatar Robert HH Committed by Damien George
Browse files

esp8266/main.c: Clear the command line history when (re)booting.

Not clearing the command line history sometimes results in strange output
when going back after a reset.
parent 047ac204
No related branches found
No related tags found
No related merge requests found
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
#include "py/stackctrl.h" #include "py/stackctrl.h"
#include "py/mphal.h" #include "py/mphal.h"
#include "py/gc.h" #include "py/gc.h"
#include "lib/mp-readline/readline.h"
#include "lib/utils/pyexec.h" #include "lib/utils/pyexec.h"
#include "gccollect.h" #include "gccollect.h"
#include "user_interface.h" #include "user_interface.h"
...@@ -57,6 +58,7 @@ STATIC void mp_reset(void) { ...@@ -57,6 +58,7 @@ STATIC void mp_reset(void) {
MP_STATE_PORT(mp_kbd_exception) = mp_obj_new_exception(&mp_type_KeyboardInterrupt); MP_STATE_PORT(mp_kbd_exception) = mp_obj_new_exception(&mp_type_KeyboardInterrupt);
MP_STATE_PORT(term_obj) = MP_OBJ_NULL; MP_STATE_PORT(term_obj) = MP_OBJ_NULL;
pin_init0(); pin_init0();
readline_init0();
#if MICROPY_MODULE_FROZEN #if MICROPY_MODULE_FROZEN
pyexec_frozen_module("_boot.py"); pyexec_frozen_module("_boot.py");
pyexec_file("boot.py"); pyexec_file("boot.py");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment