diff --git a/libraries/AP_HAL_PX4/Storage.cpp b/libraries/AP_HAL_PX4/Storage.cpp index 4d7b10716c..62301266c3 100644 --- a/libraries/AP_HAL_PX4/Storage.cpp +++ b/libraries/AP_HAL_PX4/Storage.cpp @@ -154,8 +154,14 @@ void PX4Storage::_storage_open(void) if (fd == -1) { hal.scheduler->panic("Failed to open " MTD_PARAMS_FILE); } - if (read(fd, _buffer, sizeof(_buffer)) != sizeof(_buffer)) { - hal.scheduler->panic("Failed to read " MTD_PARAMS_FILE); + const uint16_t chunk_size = 128; + for (uint16_t ofs=0; ofspanic("Failed to read " MTD_PARAMS_FILE); + } } close(fd); _initialised = true;