Обновление

This commit is contained in:
cfif 2026-01-19 13:55:03 +03:00
parent 206ef909e5
commit e7cca765e9
2 changed files with 14 additions and 6 deletions

View File

@ -101,7 +101,7 @@ void DeviceStorage_InitCommon(tDeviceStorage *env, tStorageInterface *storageCal
SECT_SRAM_NVM uint8_t dataReservedParamStore[nf_storage_param_size];
bool DeviceStorage_Init(tDeviceStorage *env, tStorageInterface *storageCalibInterface,
bool DeviceStorage_Init(tDeviceStorage *env, bool loadParamOnly, tStorageInterface *storageCalibInterface,
tStorageInterface *storageParamInterface,
tLoggerInterface *logger) {
@ -115,12 +115,20 @@ bool DeviceStorage_Init(tDeviceStorage *env, tStorageInterface *storageCalibInte
DeviceStorage_InitCommon(env, storageCalibInterface, nf_storage_calib_size,
storageParamInterface, nf_storage_param_size);
if (loadParamOnly) {
bool resultParam = DeviceStorage_LoadParam(env);
if (resultParam) {
return true;
}
} else {
bool resultParam = DeviceStorage_LoadParam(env);
bool resultCalib = DeviceStorage_LoadCalib(env);
if ((resultParam) && (resultCalib)) {
return true;
}
}
return false;
}

View File

@ -23,7 +23,7 @@ typedef struct {
uint8_t trackableVarsTab;
} tDeviceStorage;
bool DeviceStorage_Init(tDeviceStorage *env, tStorageInterface *storageCalibInterface,
bool DeviceStorage_Init(tDeviceStorage *env, bool loadParamOnly, tStorageInterface *storageCalibInterface,
tStorageInterface *storageParamInterface,
tLoggerInterface *logger);