Перенос на новую организацию GONEC

This commit is contained in:
cfif 2025-01-24 13:22:32 +03:00
commit d9a377ad8e
5 changed files with 141 additions and 0 deletions

30
DeviceDataNonVolatile.c Normal file
View File

@ -0,0 +1,30 @@
//
// Created by xemon on 19.12.22.
//
#include "DeviceDataNonVolatilePrivate.h"
void DeviceDataNonVolatile_InitDefaults(tDeviceDataNonVolatile *env) {
DeviceStorageInitDeviceSettings(&env->device);
// vUveosGostSettingsInitDefaults(&env->gost);
// DeviceStorageInitCodec(&env->audioCodec);
// CarFlipDetection_InitSettings(&env->flip);
// EraGlonassMsdTable_Init(&env->msdTable);
vSettings_Basic_AccessInitDefaults(&env->Settings_Basic_Access);
vSettings_Settings_Date_TimeInitDefaults(&env->Settings_Date_Time);
vSettings_Frequency_SpeedInitDefaults(&env->Settings_Frequency_Speed);
vSettings_GeneralInitDefaults(&env->Settings_General);
vSettings_NetworkInitDefaults(&env->Settings_Network);
vSettings_RS485_BluetoothInitDefaults(&env->Settings_RS485_Bluetooth);
vSettings_TracertInitDefaults(&env->Settings_Tracert);
vSettings_TransceiverInitDefaults(&env->Settings_Transceiver);
vSettings_GSMInitDefaults(&env->Settings_GSM);
// InitKeys(env->Keys);
//проверка соответствия версии хранилища
//позволяет принудительно сбросить хранилище
//к значениям по умолчанию вслучае установки
//значения большее чем в придыдущих прошивках
env->version = DEVICE_DATA_NO_VOLATILE_VERSION;
}

75
DeviceDataNonVolatile.h Normal file
View File

@ -0,0 +1,75 @@
//
// Created by xemon on 19.10.22.
//
#ifndef UVEOS_ON_NATION_DEVICEDATANONVOLATILE_H
#define UVEOS_ON_NATION_DEVICEDATANONVOLATILE_H
//#include <max9860.h>
//#include <CarFlipDetection.h>
//#include <UveosGostSettings.h>
//#include <EraGlonassMsdTable.h>
//#include <VariablesTable.h>
#include <stdbool.h>
#include "Settings_General.h"
#include "Settings_Basic_Access.h"
#include "Settings_Frequency_Speed.h"
#include "Settings_Tracert.h"
#include "Settings_Network.h"
#include "Settings_Transceiver.h"
#include "Settings_RS485_Bluetooth.h"
#include "Settings_Date_Time.h"
#include "Settings_GSM.h"
#include "Settings_Transmitter.h"
#include "Settings_Msd.h"
#include "Settings_Ams_Radar.h"
#include "Settings_LoRaWan.h"
#define DEVICE_DATA_NO_VOLATILE_VERSION 0x10
typedef struct {
bool useInternalAnt;
struct {
tString16 value;
uint16_t writeAccess;
} serialNumber;
tString16 smsServiceCenter;
} tDeviceSettings;
typedef struct {
uint32_t version;
// tUveosGostSettings gost;
// MAX9860_ComplexAudioConfig audioCodec;
// tCarFlipDetectionSettings flip;
tDeviceSettings device;
// tEraGlonassMsdTable msdTable;
tSettings_General Settings_General;
tSettings_Basic_Access Settings_Basic_Access;
tSettings_Frequency_Speed Settings_Frequency_Speed;
tSettings_Tracert Settings_Tracert;
tSettings_Network Settings_Network;
tSettings_Transceiver Settings_Transceiver;
tSettings_Date_Time Settings_Date_Time;
tSettings_GSM Settings_GSM;
tSettings_RS485_Bluetooth Settings_RS485_Bluetooth;
tSettings_Transmitter Settings_Transmitter;
tSettings_Msd Settings_Msd;
tSettings_AmsRadar Settings_AmsRadar;
tSettings_LoRaWan Settings_LoRaWan;
uint32_t maxId_OutBox;
uint32_t maxId_InBox;
uint32_t routing;
uint32_t dist;
uint32_t timeZoneInSat;
uint32_t flagSos;
} tDeviceDataNonVolatile;
void DeviceDataNonVolatile_InitDefaults(tDeviceDataNonVolatile *env);
#endif //UVEOS_ON_NATION_DEVICEDATANONVOLATILE_H

View File

@ -0,0 +1,14 @@
//
// Created by xemon on 19.12.22.
//
#ifndef UVEOS_ON_NATION_DEVICEDATANONVOLATILEPRIVATE_H
#define UVEOS_ON_NATION_DEVICEDATANONVOLATILEPRIVATE_H
#include "DeviceDataNonVolatile.h"
//void DeviceStorageInitCodec(MAX9860_ComplexAudioConfig *audioConfig);
void DeviceStorageInitDeviceSettings(tDeviceSettings *env);
#endif //UVEOS_ON_NATION_DEVICEDATANONVOLATILEPRIVATE_H

View File

@ -0,0 +1,10 @@
//
// Created by xemon on 19.10.22.
//
#include "DeviceDataNonVolatilePrivate.h"
void DeviceStorageInitDeviceSettings(tDeviceSettings *env) {
String16CopyStatic(&env->serialNumber.value, "Нет ID!");
String16CopyStatic(&env->smsServiceCenter, "+79418100013");
env->serialNumber.writeAccess = 1;
}

12
modular.json Normal file
View File

@ -0,0 +1,12 @@
{
"dep": [
],
"cmake": {
"inc_dirs": [
"./"
],
"srcs": [
"./**.c"
]
}
}