switch autoreload to reloadexception

This commit is contained in:
Roy Hooper 2018-05-14 17:44:50 -04:00
parent 92b1cb5743
commit 06b6a10a5e

View File

@ -26,8 +26,8 @@
#include "autoreload.h" #include "autoreload.h"
#include "lib/utils/interrupt_char.h"
#include "py/mphal.h" #include "py/mphal.h"
#include "py/reload.h"
volatile uint32_t autoreload_delay_ms = 0; volatile uint32_t autoreload_delay_ms = 0;
bool autoreload_enabled = false; bool autoreload_enabled = false;
@ -40,7 +40,7 @@ inline void autoreload_tick() {
} }
if (autoreload_delay_ms == 1 && autoreload_enabled && if (autoreload_delay_ms == 1 && autoreload_enabled &&
!autoreload_suspended && !reload_requested) { !autoreload_suspended && !reload_requested) {
mp_keyboard_interrupt(); mp_raise_reload_exception();
reload_requested = true; reload_requested = true;
} }
autoreload_delay_ms--; autoreload_delay_ms--;