Fix bug: Invalid calibration loaded if no calibration is present on sd card

This commit is contained in:
Mario Hüttel 2021-01-01 17:31:35 +01:00
parent 44c861a245
commit 75f9c58c54

View File

@ -136,7 +136,9 @@ int sd_card_settings_try_load_calibration(float *sens_deviation, float *offset)
get_controller_settings_path(path, sizeof(path), "calibration");
p = config_parser_open_file(&parser, false, path, workbuff, sizeof(workbuff));
status = 0;
if (!p)
return status;
do {
res = config_parser_get_line(p, &entry, true);
if (res == CONFIG_PARSER_OK) {