diff --git a/host/core/pipeline/host_pipeline_config.cpp b/host/core/pipeline/host_pipeline_config.cpp index 19674347a..13f9a0509 100644 --- a/host/core/pipeline/host_pipeline_config.cpp +++ b/host/core/pipeline/host_pipeline_config.cpp @@ -117,6 +117,21 @@ bool HostPipelineConfig::initWithJSON(const json &json_obj) { auto& board_conf_obj = json_obj.at("board_config"); + if (board_conf_obj.contains("store_to_eeprom")) + { + board_config.store_to_eeprom = board_conf_obj.at("store_to_eeprom").get(); + } + + if (board_conf_obj.contains("clear_eeprom")) + { + board_config.clear_eeprom = board_conf_obj.at("clear_eeprom").get(); + } + + if (board_conf_obj.contains("override_eeprom_calib")) + { + board_config.override_eeprom_calib = board_conf_obj.at("override_eeprom_calib").get(); + } + // "blob_file_config" if (board_conf_obj.contains("swap_left_and_right_cameras")) { diff --git a/host/core/pipeline/host_pipeline_config.hpp b/host/core/pipeline/host_pipeline_config.hpp index 5466fd0a3..9a8a8b8fb 100644 --- a/host/core/pipeline/host_pipeline_config.hpp +++ b/host/core/pipeline/host_pipeline_config.hpp @@ -34,6 +34,9 @@ struct HostPipelineConfig struct BoardConfig { + bool clear_eeprom = false; + bool store_to_eeprom = false; + bool override_eeprom_calib = false; bool swap_left_and_right_cameras = false; float left_fov_deg = 69.f; float left_to_right_distance_m = 0.035f; // meters, not centimeters diff --git a/host/py_module/py_bindings.cpp b/host/py_module/py_bindings.cpp index 7c6b28da5..857c6fbd8 100644 --- a/host/py_module/py_bindings.cpp +++ b/host/py_module/py_bindings.cpp @@ -342,6 +342,9 @@ std::shared_ptr create_pipeline( } json json_config_obj; + json_config_obj["board"]["clear-eeprom"] = config.board_config.clear_eeprom; + json_config_obj["board"]["store-to-eeprom"] = config.board_config.store_to_eeprom; + json_config_obj["board"]["override-eeprom"] = config.board_config.override_eeprom_calib; json_config_obj["board"]["swap-left-and-right-cameras"] = config.board_config.swap_left_and_right_cameras; json_config_obj["board"]["left_fov_deg"] = config.board_config.left_fov_deg; json_config_obj["board"]["left_to_right_distance_m"] = config.board_config.left_to_right_distance_m;