From 343a3e1ea90a93eb41797a54879a1c32c49a7976 Mon Sep 17 00:00:00 2001 From: cfif Date: Thu, 12 Dec 2024 17:25:48 +0300 Subject: [PATCH] Fix --- EgtsInputCommands.c | 3 +++ EgtsProcessing.c | 12 ++++++++++++ EgtsProcessing.h | 1 + EgtsTeledataPoint.c | 9 ++++++--- 4 files changed, 22 insertions(+), 3 deletions(-) diff --git a/EgtsInputCommands.c b/EgtsInputCommands.c index cae2455..82fb3c8 100644 --- a/EgtsInputCommands.c +++ b/EgtsInputCommands.c @@ -1,6 +1,8 @@ // // Created by cfif on 11.04.2024. // +#ifdef UVEOS_ADD_TELEMATICA + #include "EgtsInputCommands.h" #include "EgtsOutputCommands.h" #include "Rtc.h" @@ -192,4 +194,5 @@ _Noreturn void EgtsProcessing_TransmitterTaskInputCommand(tEgtsProcessing *env) } } +#endif diff --git a/EgtsProcessing.c b/EgtsProcessing.c index 4c76000..ed29b98 100644 --- a/EgtsProcessing.c +++ b/EgtsProcessing.c @@ -2,6 +2,8 @@ // Created by cfif on 21.05.23. // +#ifdef UVEOS_ADD_TELEMATICA + #include #include #include @@ -53,6 +55,7 @@ bool onOffTelematica(tEgtsProcessing *env, bool *oneOn, bool *oneOff, char *task } return false; + } void EgtsProcessing_TransmitterTaskMain(tEgtsProcessing *env); @@ -145,7 +148,10 @@ void EgtsProcessing_Init( env->fl_firstStartTimeUpdateEBU = false; +#ifdef UVEOS_ADD_TELEMATICA env->deviceTeledataStorageData = &deviceStorage->nvm.deviceTeledataStorageData; +#endif + env->store = deviceStorage; env->isOneEBU = false; @@ -446,8 +452,10 @@ bool Gsm_SetProfileERA(tEgtsProcessing *env) { AtCommandResult res = AT_ERROR; if (osMutexAcquire(env->gsm->gsmAt.access, 5000) == osOK) { +#ifdef UVEOS_ADD_TELEMATICA AtGsmTelitLe910_SimProfileSelect(&env->gsm->gsmAt, &env->store->nvm.deviceTeledataStorageData.telematica.EGTS_PROFILE_SIM_ERA); +#endif AtGsmTelitLe910_SIMCardNoDetect(&env->gsm->gsmAt); AtGsmTelitLe910_SIMCardDetect(&env->gsm->gsmAt); @@ -465,8 +473,10 @@ bool Gsm_SetProfileINTERNET(tEgtsProcessing *env) { AtCommandResult res = AT_ERROR; if (osMutexAcquire(env->gsm->gsmAt.access, 5000) == osOK) { +#ifdef UVEOS_ADD_TELEMATICA AtGsmTelitLe910_SimProfileSelect(&env->gsm->gsmAt, &env->store->nvm.deviceTeledataStorageData.telematica.EGTS_PROFILE_SIM_INTERNET); +#endif AtGsmTelitLe910_SIMCardNoDetect(&env->gsm->gsmAt); AtGsmTelitLe910_SIMCardDetect(&env->gsm->gsmAt); @@ -1156,3 +1166,5 @@ _Noreturn void EgtsProcessing_ListenerTask(tEgtsProcessing *env) { EgtsProcessing_Worker(env); } } + +#endif \ No newline at end of file diff --git a/EgtsProcessing.h b/EgtsProcessing.h index 9b09c3f..0c83dc3 100644 --- a/EgtsProcessing.h +++ b/EgtsProcessing.h @@ -400,6 +400,7 @@ typedef struct { uint32_t firmwareOffset; */ tDeviceTeledataStorageData *deviceTeledataStorageData; + tDeviceStorage *store; bool rebootFirmware; diff --git a/EgtsTeledataPoint.c b/EgtsTeledataPoint.c index 00cde2f..18088f3 100644 --- a/EgtsTeledataPoint.c +++ b/EgtsTeledataPoint.c @@ -1,6 +1,8 @@ // // Created by cfif on 12.06.2024. // +#ifdef UVEOS_ADD_TELEMATICA + #include #include "EgtsTeledataPoint.h" #include "string.h" @@ -11,7 +13,6 @@ #include "Rtc.h" #include "SystemDelayInterface.h" - #define LOG_SIGN "EGTS TELE" #define LOGGER &env->slog->logger @@ -336,11 +337,11 @@ _Noreturn void EgtsProcessing_TransmitterTaskTeledata(tEgtsProcessing *env) { } */ + if (!isAuth(env) || (env->store->runtime.EGTS_FLEET_ON == false)) { continue; } - if (extractTeledataQueue(env, &env->egtsTeledataSent, 1)) { /* @@ -823,4 +824,6 @@ _Noreturn void EgtsProcessing_EventTaskTeledata(tEgtsProcessing *env) { } } -} \ No newline at end of file +} + +#endif \ No newline at end of file