Обновление
This commit is contained in:
parent
206ef909e5
commit
e7cca765e9
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue