Обновление
This commit is contained in:
parent
682a18d223
commit
db579beb51
|
|
@ -6,6 +6,7 @@
|
|||
#include "VarsTabDumpObserver.h"
|
||||
#include "SystemDelayInterface.h"
|
||||
#include "string.h"
|
||||
#include "StorageOnFlashFlagchip.h"
|
||||
|
||||
|
||||
#define LOGGER env->logger
|
||||
|
|
@ -101,16 +102,18 @@ bool VarsTabDumpObserverParam_Load(tVarsTabDumpObserver *env) {
|
|||
bool VarsTabDumpObserverCalib_Dump(tVarsTabDumpObserver *env) {
|
||||
LoggerInfoStatic(LOGGER, LOG_SIGN, "Calibrations: Attempting to write to ROM")
|
||||
|
||||
tStorageOnFlashFlagchip *storageOnFlashChipsCheckClear = env->interfaceCalib->env;
|
||||
|
||||
// if (env->logger) {
|
||||
// env->logger->logging(
|
||||
// env->logger->env, "Калибровки. Хран.Наб.",
|
||||
// sizeof("Калибровки. Хран.Наб.") - 1,
|
||||
// LOGLEVEL_INFO,
|
||||
// "Калибровки. Запись в ПЗУ...",
|
||||
// sizeof("Калибровки. Запись в ПЗУ...") - 1, true
|
||||
// );
|
||||
// }
|
||||
int isMainFlashPageAddressCheckClear = memcmp((uint8_t *) storageOnFlashChipsCheckClear->mainFlashPageAddress,
|
||||
env->dataCalib, env->sizeCalib - 8);
|
||||
|
||||
int isRecoveryFlashPageAddressCheckClear = memcmp(
|
||||
(uint8_t *) storageOnFlashChipsCheckClear->recoveryFlashPageAddress, env->dataCalib, env->sizeCalib -8);
|
||||
|
||||
if ((isMainFlashPageAddressCheckClear == 0) && (isRecoveryFlashPageAddressCheckClear == 0)) {
|
||||
LoggerInfoStatic(LOGGER, LOG_SIGN, "Calibrations: No need to write to ROM")
|
||||
return true;
|
||||
}
|
||||
|
||||
if (osMutexAcquire(env->accessDumper, 1000) == osOK) {
|
||||
|
||||
|
|
@ -144,16 +147,18 @@ bool VarsTabDumpObserverCalib_Dump(tVarsTabDumpObserver *env) {
|
|||
bool VarsTabDumpObserverParam_Dump(tVarsTabDumpObserver *env) {
|
||||
LoggerInfoStatic(LOGGER, LOG_SIGN, "Parameters: Attempting to write to ROM")
|
||||
|
||||
tStorageOnFlashFlagchip *storageOnFlashChipsCheckClear = env->interfaceParam->env;
|
||||
|
||||
// if (env->logger) {
|
||||
// env->logger->logging(
|
||||
// env->logger->env, "Парамеры. Хран.Наб.",
|
||||
// sizeof("Парамеры. Хран.Наб.") - 1,
|
||||
// LOGLEVEL_INFO,
|
||||
// "Парамеры. Запись в ПЗУ...",
|
||||
// sizeof("Парамеры. Запись в ПЗУ...") - 1, true
|
||||
// );
|
||||
// }
|
||||
int isMainFlashPageAddressCheckClear = memcmp((uint8_t *) storageOnFlashChipsCheckClear->mainFlashPageAddress,
|
||||
env->dataParam, env->sizeParam - 8);
|
||||
|
||||
int isRecoveryFlashPageAddressCheckClear = memcmp(
|
||||
(uint8_t *) storageOnFlashChipsCheckClear->recoveryFlashPageAddress, env->dataParam, env->sizeParam - 8);
|
||||
|
||||
if ((isMainFlashPageAddressCheckClear == 0) && (isRecoveryFlashPageAddressCheckClear == 0)) {
|
||||
LoggerInfoStatic(LOGGER, LOG_SIGN, "Parameters: No need to write to ROM")
|
||||
return true;
|
||||
}
|
||||
|
||||
if (osMutexAcquire(env->accessDumper, 1000) == osOK) {
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue