Обновление
This commit is contained in:
parent
12283d586a
commit
b27a572361
|
|
@ -32,6 +32,7 @@ bool DeviceStorage_LoadParam(tDeviceStorage *env) {
|
||||||
|
|
||||||
if (isLoad) {
|
if (isLoad) {
|
||||||
if (env->dataParam->version == DEVICE_DATA_NO_VOLATILE_VERSION) {
|
if (env->dataParam->version == DEVICE_DATA_NO_VOLATILE_VERSION) {
|
||||||
|
LoggerInfoStatic(LOGGER, LOG_SIGN, "Параметры. Загружены успешно");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -49,9 +50,8 @@ bool DeviceStorage_LoadCalib(tDeviceStorage *env) {
|
||||||
bool isLoad = VarsTabDumpObserverCalib_Load(&env->dumpObserver);
|
bool isLoad = VarsTabDumpObserverCalib_Load(&env->dumpObserver);
|
||||||
|
|
||||||
if (isLoad) {
|
if (isLoad) {
|
||||||
if (env->dataParam->version == DEVICE_DATA_NO_VOLATILE_VERSION) {
|
LoggerInfoStatic(LOGGER, LOG_SIGN, "Калибровки. Загружены успешно");
|
||||||
return true;
|
return true;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
LoggerInfoStatic(LOGGER, LOG_SIGN, "Калибровки. Сброс настроек");
|
LoggerInfoStatic(LOGGER, LOG_SIGN, "Калибровки. Сброс настроек");
|
||||||
|
|
@ -71,7 +71,7 @@ void DeviceStorage_DelayedDump(tDeviceStorage *env) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void DeviceStorage_InitCommon(tDeviceStorage *env, tStorageInterface *storageCalibInterface, size_t sizeCalib,
|
void DeviceStorage_InitCommon(tDeviceStorage *env, tStorageInterface *storageCalibInterface, size_t sizeCalib,
|
||||||
tStorageInterface *storageParamInterface, size_t sizeParam ) {
|
tStorageInterface *storageParamInterface, size_t sizeParam) {
|
||||||
VarsTabDumpObserver_Init(
|
VarsTabDumpObserver_Init(
|
||||||
&env->dumpObserver,
|
&env->dumpObserver,
|
||||||
storageCalibInterface,
|
storageCalibInterface,
|
||||||
|
|
@ -79,8 +79,8 @@ void DeviceStorage_InitCommon(tDeviceStorage *env, tStorageInterface *storageCal
|
||||||
5000,
|
5000,
|
||||||
env->dataCalib,
|
env->dataCalib,
|
||||||
env->dataParam,
|
env->dataParam,
|
||||||
sizeCalib,
|
sizeCalib,
|
||||||
sizeParam,
|
sizeParam,
|
||||||
&env->publicVariablesTable,
|
&env->publicVariablesTable,
|
||||||
VARIABLE_GROUP_FLASH
|
VARIABLE_GROUP_FLASH
|
||||||
);
|
);
|
||||||
|
|
@ -93,9 +93,10 @@ void DeviceStorage_InitCommon(tDeviceStorage *env, tStorageInterface *storageCal
|
||||||
SECT_SRAM_NVM uint8_t dataReservedParamStore[2 * FLASH_PAGE_SIZE];
|
SECT_SRAM_NVM uint8_t dataReservedParamStore[2 * FLASH_PAGE_SIZE];
|
||||||
extern uint32_t __caldata_start[];
|
extern uint32_t __caldata_start[];
|
||||||
|
|
||||||
bool DeviceStorage_Init(tDeviceStorage *env, tStorageInterface *storageCalibInterface, tStorageInterface *storageParamInterface) {
|
bool DeviceStorage_Init(tDeviceStorage *env, tStorageInterface *storageCalibInterface,
|
||||||
|
tStorageInterface *storageParamInterface) {
|
||||||
env->dataParam = (tDeviceDataNonVolatile *) dataReservedParamStore;
|
env->dataParam = (tDeviceDataNonVolatile *) dataReservedParamStore;
|
||||||
env->dataCalib = (void *)__caldata_start;
|
env->dataCalib = (void *) __caldata_start;
|
||||||
|
|
||||||
DeviceStorage_InitCommon(env, storageParamInterface, sizeof(dataReservedParamStore),
|
DeviceStorage_InitCommon(env, storageParamInterface, sizeof(dataReservedParamStore),
|
||||||
storageCalibInterface, 7 * FLASH_PAGE_SIZE);
|
storageCalibInterface, 7 * FLASH_PAGE_SIZE);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue