diff options
| author | Scott Shawcroft <scott.shawcroft@gmail.com> | 2017-11-15 14:44:14 -0800 |
|---|---|---|
| committer | Scott Shawcroft <scott.shawcroft@gmail.com> | 2017-11-16 09:04:17 -0800 |
| commit | ecc47d5258acfd903d3aba03b336e248e85ff5c2 (patch) | |
| tree | c481ee18cc7333b3e64fa8c8b66a27418b26a075 /main.c | |
| parent | 2d34450872d40cf308981ffda6b1736528b1fba7 (diff) | |
Create supervisor module.
It can control autoreload and the rgb status led.
Diffstat (limited to 'main.c')
| -rw-r--r-- | main.c | 8 |
1 files changed, 2 insertions, 6 deletions
@@ -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(); |
