diff --git a/DeviceStorage.c b/DeviceStorage.c index be9fa2b..bc2d6a5 100644 --- a/DeviceStorage.c +++ b/DeviceStorage.c @@ -32,6 +32,7 @@ bool DeviceStorage_LoadParam(tDeviceStorage *env) { if (isLoad) { if (env->dataParam->version == DEVICE_DATA_NO_VOLATILE_VERSION) { + LoggerInfoStatic(LOGGER, LOG_SIGN, "Параметры. Загружены успешно"); return true; } } @@ -49,9 +50,8 @@ bool DeviceStorage_LoadCalib(tDeviceStorage *env) { bool isLoad = VarsTabDumpObserverCalib_Load(&env->dumpObserver); if (isLoad) { - if (env->dataParam->version == DEVICE_DATA_NO_VOLATILE_VERSION) { - return true; - } + LoggerInfoStatic(LOGGER, LOG_SIGN, "Калибровки. Загружены успешно"); + return true; } LoggerInfoStatic(LOGGER, LOG_SIGN, "Калибровки. Сброс настроек"); @@ -71,7 +71,7 @@ void DeviceStorage_DelayedDump(tDeviceStorage *env) { } void DeviceStorage_InitCommon(tDeviceStorage *env, tStorageInterface *storageCalibInterface, size_t sizeCalib, - tStorageInterface *storageParamInterface, size_t sizeParam ) { + tStorageInterface *storageParamInterface, size_t sizeParam) { VarsTabDumpObserver_Init( &env->dumpObserver, storageCalibInterface, @@ -79,8 +79,8 @@ void DeviceStorage_InitCommon(tDeviceStorage *env, tStorageInterface *storageCal 5000, env->dataCalib, env->dataParam, - sizeCalib, - sizeParam, + sizeCalib, + sizeParam, &env->publicVariablesTable, VARIABLE_GROUP_FLASH ); @@ -93,9 +93,10 @@ void DeviceStorage_InitCommon(tDeviceStorage *env, tStorageInterface *storageCal SECT_SRAM_NVM uint8_t dataReservedParamStore[2 * FLASH_PAGE_SIZE]; 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->dataCalib = (void *)__caldata_start; + env->dataCalib = (void *) __caldata_start; DeviceStorage_InitCommon(env, storageParamInterface, sizeof(dataReservedParamStore), storageCalibInterface, 7 * FLASH_PAGE_SIZE);