From ecc47d5258acfd903d3aba03b336e248e85ff5c2 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Wed, 15 Nov 2017 14:44:14 -0800 Subject: Create supervisor module. It can control autoreload and the rgb status led. --- main.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'main.c') diff --git a/main.c b/main.c index 5f73713cb..7ed93ddf5 100644 --- a/main.c +++ b/main.c @@ -290,18 +290,14 @@ int __attribute__((used)) main(void) { bool first_run = true; for (;;) { if (!skip_repl) { - // The REPL mode can change, or it can request a reload. - bool autoreload_on = autoreload_is_enabled(); - autoreload_disable(); + autoreload_suspend(); new_status_color(REPL_RUNNING); if (pyexec_mode_kind == PYEXEC_MODE_RAW_REPL) { exit_code = pyexec_raw_repl(); } else { exit_code = pyexec_friendly_repl(); } - if (autoreload_on) { - autoreload_enable(); - } + autoreload_resume(); reset_port(); reset_board(); reset_mp(); -- cgit v1.2.3