убран алгоритм обработки двойного нажатия для первого прозвона в Казахстане, причина - стал рудиментом, т.к. удалось заставить устройство выходить на ЭВАК в штатном режиме
This commit is contained in:
parent
87c5e6d0e1
commit
29c740d275
|
|
@ -642,70 +642,17 @@ static _Noreturn void Mma_Thread(tMma *env) {
|
|||
LoggerTraceStatic(LOGGER, LOG_SIGN, "Проверяем нажатия кнопок")
|
||||
if (UserButtons_GetNext(&env->userInput.buttonsInterface, &buttonEvent, 10)) {
|
||||
|
||||
if (env->kzModeBloc == false) {
|
||||
if (UserInputButtonEventIsBetween(
|
||||
buttonEvent, UI_BUTTON_EMERGENCY, RAISE, env->storage.nvm.gost.SOS_BUTTON_TIME, 0xFFFF
|
||||
)) {
|
||||
|
||||
#ifdef UVEOS_ADD_TELEMATICA
|
||||
TELEMATICA_STOP(env);
|
||||
#endif
|
||||
|
||||
LoggerInfoStatic(LOGGER, LOG_SIGN, "Нажата кнопка экстренного вызова KZ 1")
|
||||
uint32_t tmt = SystemGetMs() + 10000;
|
||||
UserButtons_Clear(&env->userInput.buttonsInterface);
|
||||
while (tmt > SystemGetMs()) {
|
||||
if (UserButtons_GetNext(&env->userInput.buttonsInterface, &buttonEvent, 10)) {
|
||||
if (UserInputButtonEventIsBetween(
|
||||
buttonEvent, UI_BUTTON_EMERGENCY, RAISE, env->storage.nvm.gost.SOS_BUTTON_TIME,
|
||||
0xFFFF
|
||||
)) {
|
||||
|
||||
#ifdef UVEOS_ADD_TELEMATICA
|
||||
TELEMATICA_STOP(env);
|
||||
#endif
|
||||
LoggerInfoStatic(LOGGER, LOG_SIGN, "Нажата кнопка экстренного вызова KZ 2")
|
||||
EraGlonassUveos_SetTimings(&env->uveos);
|
||||
Mma_SetMode(env, DEVICE_MODE_UVEOS_CALL_INITIATE);
|
||||
Mma_NetworkAndAudioRequireKz(env);
|
||||
GpioPinEnable(&env->power.pins->main.ecall);
|
||||
env->uveos.currentMsd->msd.MSD_Data.msgId = 1;
|
||||
|
||||
DeviceTesting_EcallKZ(&env->testing);
|
||||
// Mma_EcallManualKZ(env);
|
||||
env->kzModeBloc = true;
|
||||
AtGsmTelitLe910_Gnss_ReStartReceiver(&env->gsmWithGnss.gsmAt, 0);
|
||||
SystemDelayMs(500);
|
||||
AtGsmTelitLe910_Gnss_ReStartReceiver(&env->gsmWithGnss.gsmAt, 1);
|
||||
|
||||
Mma_NetworkAndAudioRelease(env);
|
||||
}
|
||||
}
|
||||
SystemDelayMs(10);
|
||||
}
|
||||
if (env->kzModeBloc == false) {
|
||||
|
||||
#ifdef UVEOS_ADD_TELEMATICA
|
||||
TELEMATICA_STOP(env);
|
||||
#endif
|
||||
|
||||
LoggerInfoStatic(LOGGER, LOG_SIGN, "Нажата кнопка экстренного вызова_1")
|
||||
Mma_EcallManualKZ(env);
|
||||
}
|
||||
UserButtons_Clear(&env->userInput.buttonsInterface);
|
||||
}
|
||||
} else if (UserInputButtonEventIsBetween(
|
||||
if (UserInputButtonEventIsBetween(
|
||||
buttonEvent, UI_BUTTON_EMERGENCY, RAISE, env->storage.nvm.gost.SOS_BUTTON_TIME, 0xFFFF
|
||||
)) {
|
||||
|
||||
LoggerTraceStatic(LOGGER, LOG_SIGN, "Нажата кнопка экстренного вызова")
|
||||
#ifdef UVEOS_ADD_TELEMATICA
|
||||
TELEMATICA_STOP(env);
|
||||
#endif
|
||||
|
||||
LoggerInfoStatic(LOGGER, LOG_SIGN, "Нажата кнопка экстренного вызова_2")
|
||||
// Mma_EcallManual(env);
|
||||
Mma_EcallManualKZ(env);
|
||||
} else if (UserInputButtonEventIsBetween(buttonEvent, UI_BUTTON_ADDITIONAL, RAISE, 3000, 10000)) {
|
||||
} else
|
||||
|
||||
if (UserInputButtonEventIsBetween(buttonEvent, UI_BUTTON_ADDITIONAL, RAISE, 3000, 10000)) {
|
||||
|
||||
#ifdef UVEOS_ADD_TELEMATICA
|
||||
TELEMATICA_STOP(env);
|
||||
|
|
|
|||
Loading…
Reference in New Issue