Add SetEot (End Of Transmission)
This commit is contained in:
39
ui/main.c
39
ui/main.c
@@ -36,6 +36,7 @@
|
||||
#include "ui/inputbox.h"
|
||||
#include "ui/main.h"
|
||||
#include "ui/ui.h"
|
||||
#include "audio.h"
|
||||
|
||||
#ifdef ENABLE_FEAT_F4HWN
|
||||
#include "driver/system.h"
|
||||
@@ -445,8 +446,8 @@ void UI_MAIN_TimeSlice500ms(void)
|
||||
if(FUNCTION_IsRx()) {
|
||||
DisplayRSSIBar(true);
|
||||
}
|
||||
#ifdef ENABLE_FEAT_F4HWN
|
||||
else
|
||||
#ifdef ENABLE_FEAT_F4HWN // Blink Green Led for white...
|
||||
else if(gSetting_set_eot > 0)
|
||||
{
|
||||
if(RXBlinkLed == 2)
|
||||
{
|
||||
@@ -454,13 +455,39 @@ void UI_MAIN_TimeSlice500ms(void)
|
||||
{
|
||||
if(RXBlinkLedCounter % 2 == 0)
|
||||
{
|
||||
BK4819_ToggleGpioOut(BK4819_GPIO6_PIN2_GREEN, false);
|
||||
if(gSetting_set_eot > 1 )
|
||||
{
|
||||
BK4819_ToggleGpioOut(BK4819_GPIO6_PIN2_GREEN, false);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
BK4819_ToggleGpioOut(BK4819_GPIO6_PIN2_GREEN, true);
|
||||
if(RXBlinkLedCounter > 6)
|
||||
SYSTEM_DelayMs(350);
|
||||
if(gSetting_set_eot > 1 )
|
||||
{
|
||||
BK4819_ToggleGpioOut(BK4819_GPIO6_PIN2_GREEN, true);
|
||||
}
|
||||
|
||||
if(RXBlinkLedCounter <= 6)
|
||||
{
|
||||
if(gSetting_set_eot == 1 || gSetting_set_eot == 3)
|
||||
{
|
||||
AUDIO_PlayBeep(BEEP_800HZ_30MS);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(gSetting_set_eot == 1 || gSetting_set_eot == 3)
|
||||
{
|
||||
AUDIO_PlayBeep(BEEP_800HZ_30MS);
|
||||
SYSTEM_DelayMs(100);
|
||||
AUDIO_PlayBeep(BEEP_1000HZ_30MS);
|
||||
SYSTEM_DelayMs(100);
|
||||
}
|
||||
else if(gSetting_set_eot == 2)
|
||||
{
|
||||
SYSTEM_DelayMs(350);
|
||||
}
|
||||
}
|
||||
}
|
||||
RXBlinkLedCounter += 1;
|
||||
}
|
||||
|
@@ -129,6 +129,7 @@ const t_menu_item MenuList[] =
|
||||
{"SetLow", VOICE_ID_INVALID, MENU_SET_LOW },
|
||||
{"SetPtt", VOICE_ID_INVALID, MENU_SET_PTT },
|
||||
{"SetTot", VOICE_ID_INVALID, MENU_SET_TOT },
|
||||
{"SetEot", VOICE_ID_INVALID, MENU_SET_EOT },
|
||||
{"SetCtr", VOICE_ID_INVALID, MENU_SET_CTR },
|
||||
{"SetInv", VOICE_ID_INVALID, MENU_SET_INV },
|
||||
#endif
|
||||
@@ -362,7 +363,7 @@ const char gSubMenu_SCRAMBLER[][7] =
|
||||
"ONEPUSH"
|
||||
};
|
||||
|
||||
const char gSubMenu_SET_TOT[][7] =
|
||||
const char gSubMenu_SET_TOT[][7] = // Use by SET_EOT too
|
||||
{
|
||||
"OFF",
|
||||
"SOUND",
|
||||
@@ -907,6 +908,10 @@ void UI_DisplayMenu(void)
|
||||
strcpy(String, gSubMenu_SET_TOT[gSubMenuSelection]);
|
||||
break;
|
||||
|
||||
case MENU_SET_EOT:
|
||||
strcpy(String, gSubMenu_SET_TOT[gSubMenuSelection]); // Same as SET_TOT
|
||||
break;
|
||||
|
||||
case MENU_SET_CTR:
|
||||
sprintf(String, "%d", gSubMenuSelection);
|
||||
gSetting_set_ctr = gSubMenuSelection;
|
||||
|
Reference in New Issue
Block a user