Добавлено функция включения/отключения телематики

This commit is contained in:
cfif 2024-12-19 11:28:41 +03:00
parent 5fa0a934cc
commit 8ec04f8d3f
1 changed files with 14 additions and 8 deletions

View File

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