summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorScott Shawcroft <scott.shawcroft@gmail.com>2017-11-15 14:44:14 -0800
committerScott Shawcroft <scott.shawcroft@gmail.com>2017-11-16 09:04:17 -0800
commitecc47d5258acfd903d3aba03b336e248e85ff5c2 (patch)
treec481ee18cc7333b3e64fa8c8b66a27418b26a075 /main.c
parent2d34450872d40cf308981ffda6b1736528b1fba7 (diff)
Create supervisor module.
It can control autoreload and the rgb status led.
Diffstat (limited to 'main.c')
-rw-r--r--main.c8
1 files changed, 2 insertions, 6 deletions
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();