Fix pyexec_file calls.
This commit is contained in:
parent
b6f1eebab3
commit
cd09726904
@ -175,7 +175,7 @@ soft_reset:
|
||||
|
||||
if (!safeboot) {
|
||||
// run boot.py
|
||||
int ret = pyexec_file("boot.py");
|
||||
int ret = pyexec_file("boot.py", NULL);
|
||||
if (ret & PYEXEC_FORCED_EXIT) {
|
||||
goto soft_reset_exit;
|
||||
}
|
||||
@ -200,7 +200,7 @@ soft_reset:
|
||||
} else {
|
||||
main_py = mp_obj_str_get_str(MP_STATE_PORT(machine_config_main));
|
||||
}
|
||||
int ret = pyexec_file(main_py);
|
||||
int ret = pyexec_file(main_py, NULL);
|
||||
if (ret & PYEXEC_FORCED_EXIT) {
|
||||
goto soft_reset_exit;
|
||||
}
|
||||
@ -374,4 +374,3 @@ STATIC void mptask_create_main_py (void) {
|
||||
f_write(&fp, fresh_main_py, sizeof(fresh_main_py) - 1 /* don't count null terminator */, &n);
|
||||
f_close(&fp);
|
||||
}
|
||||
|
||||
|
@ -539,7 +539,7 @@ soft_reset:
|
||||
const char *boot_py = "boot.py";
|
||||
FRESULT res = f_stat(boot_py, NULL);
|
||||
if (res == FR_OK) {
|
||||
int ret = pyexec_file(boot_py);
|
||||
int ret = pyexec_file(boot_py, NULL);
|
||||
if (ret & PYEXEC_FORCED_EXIT) {
|
||||
goto soft_reset_exit;
|
||||
}
|
||||
@ -602,7 +602,7 @@ soft_reset:
|
||||
}
|
||||
FRESULT res = f_stat(main_py, NULL);
|
||||
if (res == FR_OK) {
|
||||
int ret = pyexec_file(main_py);
|
||||
int ret = pyexec_file(main_py, NULL);
|
||||
if (ret & PYEXEC_FORCED_EXIT) {
|
||||
goto soft_reset_exit;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user