Обновление
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];
|
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,
|
tStorageInterface *storageParamInterface,
|
||||||
tLoggerInterface *logger) {
|
tLoggerInterface *logger) {
|
||||||
|
|
||||||
|
|
@ -115,11 +115,19 @@ bool DeviceStorage_Init(tDeviceStorage *env, tStorageInterface *storageCalibInte
|
||||||
DeviceStorage_InitCommon(env, storageCalibInterface, nf_storage_calib_size,
|
DeviceStorage_InitCommon(env, storageCalibInterface, nf_storage_calib_size,
|
||||||
storageParamInterface, nf_storage_param_size);
|
storageParamInterface, nf_storage_param_size);
|
||||||
|
|
||||||
bool resultParam = DeviceStorage_LoadParam(env);
|
if (loadParamOnly) {
|
||||||
bool resultCalib = DeviceStorage_LoadCalib(env);
|
bool resultParam = DeviceStorage_LoadParam(env);
|
||||||
|
|
||||||
if ((resultParam) && (resultCalib)) {
|
if (resultParam) {
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
bool resultParam = DeviceStorage_LoadParam(env);
|
||||||
|
bool resultCalib = DeviceStorage_LoadCalib(env);
|
||||||
|
|
||||||
|
if ((resultParam) && (resultCalib)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ typedef struct {
|
||||||
uint8_t trackableVarsTab;
|
uint8_t trackableVarsTab;
|
||||||
} tDeviceStorage;
|
} tDeviceStorage;
|
||||||
|
|
||||||
bool DeviceStorage_Init(tDeviceStorage *env, tStorageInterface *storageCalibInterface,
|
bool DeviceStorage_Init(tDeviceStorage *env, bool loadParamOnly, tStorageInterface *storageCalibInterface,
|
||||||
tStorageInterface *storageParamInterface,
|
tStorageInterface *storageParamInterface,
|
||||||
tLoggerInterface *logger);
|
tLoggerInterface *logger);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue