From 8ec04f8d3f3d7343aa5dd59ae628eb9a9c9318a1 Mon Sep 17 00:00:00 2001 From: cfif Date: Thu, 19 Dec 2024 11:28:41 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=BE=20=D1=84=D1=83=D0=BD=D0=BA=D1=86=D0=B8=D1=8F=20?= =?UTF-8?q?=D0=B2=D0=BA=D0=BB=D1=8E=D1=87=D0=B5=D0=BD=D0=B8=D1=8F/=D0=BE?= =?UTF-8?q?=D1=82=D0=BA=D0=BB=D1=8E=D1=87=D0=B5=D0=BD=D0=B8=D1=8F=20=D1=82?= =?UTF-8?q?=D0=B5=D0=BB=D0=B5=D0=BC=D0=B0=D1=82=D0=B8=D0=BA=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- MainModesArbiter.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/MainModesArbiter.c b/MainModesArbiter.c index f8aaefd..7a8bce5 100644 --- a/MainModesArbiter.c +++ b/MainModesArbiter.c @@ -19,23 +19,29 @@ #ifdef UVEOS_ADD_TELEMATICA void TELEMATICA_START(tMma *env) { - env->storage.runtime.EGTS_FLEET_ON = true; + + if (env->storage.nvm.deviceTeledataStorageData.telematica.telematicaIsActive) { + env->storage.runtime.EGTS_FLEET_ON = true; + } } void TELEMATICA_STOP(tMma *env) { - if (env->storage.runtime.EGTS_FLEET_ON == true) { + if (env->storage.runtime.EGTS_FLEET_ON) { - env->storage.runtime.EGTS_FLEET_ON = false; + if (env->storage.runtime.EGTS_FLEET_ON == true) { - for (uint8_t i = 0; i < 30; ++i) { - if (env->storage.runtime.telematicaCloseConnect) - break; + env->storage.runtime.EGTS_FLEET_ON = false; - SystemDelayMs(100); + for (uint8_t i = 0; i < 30; ++i) { + if (env->storage.runtime.telematicaCloseConnect) + break; + + SystemDelayMs(100); + } } - } + } } #endif