From 6d686cc580f764755ce1bc48868b48a0894e2e51 Mon Sep 17 00:00:00 2001 From: cfif Date: Fri, 5 Dec 2025 13:47:22 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DeviceStorage.c | 11 +++-------- DeviceStorage.h | 10 +--------- 2 files changed, 4 insertions(+), 17 deletions(-) diff --git a/DeviceStorage.c b/DeviceStorage.c index 29a2b24..ac4c4a6 100644 --- a/DeviceStorage.c +++ b/DeviceStorage.c @@ -18,13 +18,8 @@ #define VARIABLE_GROUP_FLASH (1 << 0) void DeviceStorage_InitVariablesTable(tDeviceStorage *env) { - - VariablesTableInitStatic(&env->publicVariablesTable, env->mem.vartab); - + env->trackableVarsTab = 0; DeviceDataRuntime_InitDefaults(&env->runtime); - - DeviceDataNonVolatile_AddToVarTab(env->dataParam, &env->publicVariablesTable, VARIABLE_GROUP_FLASH); - DeviceDataRuntime_AddToVarTab(&env->runtime, &env->publicVariablesTable, VARIABLE_GROUP_UNTRACKED); } bool DeviceStorage_LoadParam(tDeviceStorage *env) { @@ -68,7 +63,7 @@ void DeviceStorage_ForceDump(tDeviceStorage *env) { } void DeviceStorage_DelayedDump(tDeviceStorage *env) { - env->publicVariablesTable.changes = 1; + env->trackableVarsTab = 1; } void DeviceStorage_InitCommon(tDeviceStorage *env, tStorageInterface *storageCalibInterface, size_t sizeCalib, @@ -82,7 +77,7 @@ void DeviceStorage_InitCommon(tDeviceStorage *env, tStorageInterface *storageCal env->dataParam, sizeCalib, sizeParam, - &env->publicVariablesTable, + &env->trackableVarsTab, VARIABLE_GROUP_FLASH, env->logger ); diff --git a/DeviceStorage.h b/DeviceStorage.h index 05be16d..800956a 100644 --- a/DeviceStorage.h +++ b/DeviceStorage.h @@ -19,16 +19,8 @@ typedef struct { tDeviceDataRuntime runtime; tDeviceDataNonVolatile *dataParam; void *dataCalib; - tVariablesTable publicVariablesTable; tVarsTabDumpObserver dumpObserver; - - - - - struct { - tVariableDescriptor vartab[50]; - } mem; - + uint8_t trackableVarsTab; } tDeviceStorage; bool DeviceStorage_Init(tDeviceStorage *env, tStorageInterface *storageCalibInterface,