Parse config on soft resets.

* Otherwise config is read once and then reset.
This commit is contained in:
iabdalkader 2018-11-01 01:47:40 +02:00
parent 33fb1c9e6f
commit 001a41e6da

View File

@ -541,7 +541,6 @@ soft_reset:
// Parse OpenMV configuration file. // Parse OpenMV configuration file.
openmv_config_t openmv_config; openmv_config_t openmv_config;
if (first_soft_reset) {
memset(&openmv_config, 0, sizeof(openmv_config)); memset(&openmv_config, 0, sizeof(openmv_config));
// Parse config, and init wifi if enabled. // Parse config, and init wifi if enabled.
ini_parse(&vfs_fat->fatfs, "/openmv.config", ini_handler_callback, &openmv_config); ini_parse(&vfs_fat->fatfs, "/openmv.config", ini_handler_callback, &openmv_config);
@ -549,7 +548,6 @@ soft_reset:
wifidbg_init(&openmv_config.wifidbg_config) != 0) { wifidbg_init(&openmv_config.wifidbg_config) != 0) {
openmv_config.wifidbg = false; openmv_config.wifidbg = false;
} }
}
// Run boot script(s) // Run boot script(s)
if (first_soft_reset) { if (first_soft_reset) {