Обновление
This commit is contained in:
parent
e70d22180d
commit
6d686cc580
|
|
@ -18,13 +18,8 @@
|
||||||
#define VARIABLE_GROUP_FLASH (1 << 0)
|
#define VARIABLE_GROUP_FLASH (1 << 0)
|
||||||
|
|
||||||
void DeviceStorage_InitVariablesTable(tDeviceStorage *env) {
|
void DeviceStorage_InitVariablesTable(tDeviceStorage *env) {
|
||||||
|
env->trackableVarsTab = 0;
|
||||||
VariablesTableInitStatic(&env->publicVariablesTable, env->mem.vartab);
|
|
||||||
|
|
||||||
DeviceDataRuntime_InitDefaults(&env->runtime);
|
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) {
|
bool DeviceStorage_LoadParam(tDeviceStorage *env) {
|
||||||
|
|
@ -68,7 +63,7 @@ void DeviceStorage_ForceDump(tDeviceStorage *env) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void DeviceStorage_DelayedDump(tDeviceStorage *env) {
|
void DeviceStorage_DelayedDump(tDeviceStorage *env) {
|
||||||
env->publicVariablesTable.changes = 1;
|
env->trackableVarsTab = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DeviceStorage_InitCommon(tDeviceStorage *env, tStorageInterface *storageCalibInterface, size_t sizeCalib,
|
void DeviceStorage_InitCommon(tDeviceStorage *env, tStorageInterface *storageCalibInterface, size_t sizeCalib,
|
||||||
|
|
@ -82,7 +77,7 @@ void DeviceStorage_InitCommon(tDeviceStorage *env, tStorageInterface *storageCal
|
||||||
env->dataParam,
|
env->dataParam,
|
||||||
sizeCalib,
|
sizeCalib,
|
||||||
sizeParam,
|
sizeParam,
|
||||||
&env->publicVariablesTable,
|
&env->trackableVarsTab,
|
||||||
VARIABLE_GROUP_FLASH,
|
VARIABLE_GROUP_FLASH,
|
||||||
env->logger
|
env->logger
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -19,16 +19,8 @@ typedef struct {
|
||||||
tDeviceDataRuntime runtime;
|
tDeviceDataRuntime runtime;
|
||||||
tDeviceDataNonVolatile *dataParam;
|
tDeviceDataNonVolatile *dataParam;
|
||||||
void *dataCalib;
|
void *dataCalib;
|
||||||
tVariablesTable publicVariablesTable;
|
|
||||||
tVarsTabDumpObserver dumpObserver;
|
tVarsTabDumpObserver dumpObserver;
|
||||||
|
uint8_t trackableVarsTab;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
struct {
|
|
||||||
tVariableDescriptor vartab[50];
|
|
||||||
} mem;
|
|
||||||
|
|
||||||
} tDeviceStorage;
|
} tDeviceStorage;
|
||||||
|
|
||||||
bool DeviceStorage_Init(tDeviceStorage *env, tStorageInterface *storageCalibInterface,
|
bool DeviceStorage_Init(tDeviceStorage *env, tStorageInterface *storageCalibInterface,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue