This commit is contained in:
cfif 2024-12-12 17:25:48 +03:00
parent 26a67a3d32
commit 343a3e1ea9
4 changed files with 22 additions and 3 deletions

View File

@ -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

View File

@ -2,6 +2,8 @@
// Created by cfif on 21.05.23.
//
#ifdef UVEOS_ADD_TELEMATICA
#include <egts.h>
#include <SystemDelayInterface.h>
#include <Nmea0183Parser.h>
@ -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

View File

@ -400,6 +400,7 @@ typedef struct {
uint32_t firmwareOffset;
*/
tDeviceTeledataStorageData *deviceTeledataStorageData;
tDeviceStorage *store;
bool rebootFirmware;

View File

@ -1,6 +1,8 @@
//
// Created by cfif on 12.06.2024.
//
#ifdef UVEOS_ADD_TELEMATICA
#include <stdlib.h>
#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)) {
/*
@ -824,3 +825,5 @@ _Noreturn void EgtsProcessing_EventTaskTeledata(tEgtsProcessing *env) {
}
}
#endif