mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
Re-exec REPL if there's no script to execute.
This commit is contained in:
parent
fe506fa0fb
commit
2ab317063d
@ -415,19 +415,22 @@ soft_reset:
|
||||
}
|
||||
}
|
||||
|
||||
// Enter REPL
|
||||
nlr_buf_t nlr;
|
||||
if (nlr_push(&nlr) == 0) {
|
||||
// enable IDE interrupt
|
||||
usbdbg_set_irq_enabled(true);
|
||||
// If there's no script ready, just re-exec REPL
|
||||
while (!usbdbg_script_ready()) {
|
||||
nlr_buf_t nlr;
|
||||
if (nlr_push(&nlr) == 0) {
|
||||
// enable IDE interrupt
|
||||
usbdbg_set_irq_enabled(true);
|
||||
|
||||
// run REPL
|
||||
pyexec_friendly_repl();
|
||||
// run REPL
|
||||
pyexec_friendly_repl();
|
||||
|
||||
nlr_pop();
|
||||
nlr_pop();
|
||||
}
|
||||
}
|
||||
|
||||
if (usbdbg_script_ready()) {
|
||||
nlr_buf_t nlr;
|
||||
// execute the script
|
||||
if (nlr_push(&nlr) == 0) {
|
||||
// parse, compile and execute script
|
||||
@ -438,6 +441,7 @@ soft_reset:
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// soft reset
|
||||
storage_flush();
|
||||
timer_deinit();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user