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