From eb7637ba2e1c174e18cb691a9ef9308e24dff3bb Mon Sep 17 00:00:00 2001 From: Robert HH Date: Sun, 26 Jun 2016 09:01:18 +0200 Subject: 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. --- esp8266/main.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'esp8266/main.c') diff --git a/esp8266/main.c b/esp8266/main.c index 9cc955e44c..0224bed488 100644 --- a/esp8266/main.c +++ b/esp8266/main.c @@ -34,6 +34,7 @@ #include "py/stackctrl.h" #include "py/mphal.h" #include "py/gc.h" +#include "lib/mp-readline/readline.h" #include "lib/utils/pyexec.h" #include "gccollect.h" #include "user_interface.h" @@ -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(term_obj) = MP_OBJ_NULL; pin_init0(); + readline_init0(); #if MICROPY_MODULE_FROZEN pyexec_frozen_module("_boot.py"); pyexec_file("boot.py"); -- cgit v1.2.3 From e07ef8f1a2564b75dc1e1147f00d966f25dcc367 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Mon, 4 Jul 2016 17:40:26 +0300 Subject: esp8266/main: Init recently added dupterm_arr_obj port state var. --- esp8266/main.c | 1 + 1 file changed, 1 insertion(+) (limited to 'esp8266/main.c') diff --git a/esp8266/main.c b/esp8266/main.c index 0224bed488..21bb6e0e0f 100644 --- a/esp8266/main.c +++ b/esp8266/main.c @@ -57,6 +57,7 @@ STATIC void mp_reset(void) { #endif MP_STATE_PORT(mp_kbd_exception) = mp_obj_new_exception(&mp_type_KeyboardInterrupt); MP_STATE_PORT(term_obj) = MP_OBJ_NULL; + MP_STATE_PORT(dupterm_arr_obj) = MP_OBJ_NULL; pin_init0(); readline_init0(); #if MICROPY_MODULE_FROZEN -- cgit v1.2.3