mirror of
https://github.com/OneOfEleven/uv-k5-firmware-custom.git
synced 2025-04-28 14:21:25 +03:00
deleted the TX timeout bar
This commit is contained in:
parent
5055586035
commit
88f0ee2500
10
Makefile
10
Makefile
@ -74,8 +74,6 @@ ENABLE_FASTER_CHANNEL_SCAN := 1
|
||||
ENABLE_COPY_CHAN_TO_VFO_TO_CHAN := 1
|
||||
# Rx Signal Bar 400 B
|
||||
ENABLE_RX_SIGNAL_BAR := 1
|
||||
# Tx Timeout Bar 200 B
|
||||
ENABLE_TX_TIMEOUT_BAR := 0
|
||||
# Tx Audio Bar 300 B
|
||||
ENABLE_TX_AUDIO_BAR := 0
|
||||
# Side Button Menu 300 B
|
||||
@ -118,11 +116,6 @@ else
|
||||
ENABLE_FMRADIO := 0
|
||||
endif
|
||||
|
||||
ifeq ($(ENABLE_TX_TIMEOUT_BAR),1)
|
||||
# can't have ENABLE_TX_TIMEOUT_BAR and ENABLE_TX_AUDIO_BAR enabled at same time
|
||||
ENABLE_TX_AUDIO_BAR := 0
|
||||
endif
|
||||
|
||||
ifeq ($(ENABLE_VOICE),1)
|
||||
# no need for beeps
|
||||
ENABLE_BOOT_BEEPS := 0
|
||||
@ -445,9 +438,6 @@ endif
|
||||
ifeq ($(ENABLE_TX_AUDIO_BAR),1)
|
||||
CFLAGS += -DENABLE_TX_AUDIO_BAR
|
||||
endif
|
||||
ifeq ($(ENABLE_TX_TIMEOUT_BAR),1)
|
||||
CFLAGS += -DENABLE_TX_TIMEOUT_BAR
|
||||
endif
|
||||
ifeq ($(ENABLE_COPY_CHAN_TO_VFO_TO_CHAN),1)
|
||||
CFLAGS += -DENABLE_COPY_CHAN_TO_VFO_TO_CHAN
|
||||
endif
|
||||
|
@ -87,7 +87,6 @@ ENABLE_SQ_OPEN_WITH_UP_DN_BUTTS := 1 open the squelch when holding down U
|
||||
ENABLE_FASTER_CHANNEL_SCAN := 1 increase the channel scan speed, but also make the squelch more twitchy
|
||||
ENABLE_COPY_CHAN_TO_VFO_TO_CHAN := 1 long press M, copy channel to VFO, or VFO to channel
|
||||
ENABLE_RX_SIGNAL_BAR := 1 enable a menu option for showing an RSSI bar graph
|
||||
ENABLE_TX_TIMEOUT_BAR := 0 show the remainng TX time
|
||||
ENABLE_TX_AUDIO_BAR := 1 enable a menu option for showing a TX audio level bar
|
||||
ENABLE_SIDE_BUTT_MENU := 1 enable menu option for configuring the programmable side buttons
|
||||
ENABLE_KEYLOCK := 1 enable keylock menu option + keylock code
|
||||
|
22
app/app.c
22
app/app.c
@ -1142,20 +1142,15 @@ void APP_end_tx(void)
|
||||
if (g_scan_state_dir != SCAN_STATE_DIR_OFF || g_css_scan_mode != CSS_SCAN_MODE_OFF)
|
||||
return;
|
||||
|
||||
if (g_vox_noise_detected)
|
||||
if (g_vox_audio_detected)
|
||||
{
|
||||
if (g_vox_lost)
|
||||
{
|
||||
g_vox_stop_tick_10ms = vox_stop_10ms; // 1 second
|
||||
}
|
||||
else
|
||||
if (g_vox_stop_tick_10ms == 0)
|
||||
{
|
||||
g_vox_noise_detected = false;
|
||||
g_update_status = true;
|
||||
}
|
||||
g_vox_audio_detected = false;
|
||||
|
||||
if (g_current_function == FUNCTION_TRANSMIT && !g_ptt_is_pressed && !g_vox_noise_detected)
|
||||
if (g_current_function == FUNCTION_TRANSMIT && !g_ptt_is_pressed && !g_vox_audio_detected)
|
||||
{
|
||||
if (g_flag_end_tx)
|
||||
{ // back to RX mode
|
||||
@ -1171,19 +1166,19 @@ void APP_end_tx(void)
|
||||
g_rtte_count_down = g_eeprom.config.setting.repeater_tail_tone_elimination * 10;
|
||||
}
|
||||
|
||||
g_update_status = true;
|
||||
g_update_display = true;
|
||||
|
||||
g_flag_end_tx = false;
|
||||
}
|
||||
|
||||
g_update_status = true;
|
||||
return;
|
||||
}
|
||||
|
||||
if (!g_vox_lost)
|
||||
return;
|
||||
|
||||
g_vox_noise_detected = true;
|
||||
g_vox_audio_detected = true;
|
||||
|
||||
g_update_status = true;
|
||||
|
||||
@ -1197,7 +1192,7 @@ void APP_end_tx(void)
|
||||
|
||||
#ifdef ENABLE_FMRADIO
|
||||
if (g_fm_radio_mode)
|
||||
return;
|
||||
return; // can't do VOX while the speaker is emitting noise
|
||||
#endif
|
||||
|
||||
if (g_current_display_screen == DISPLAY_MENU)
|
||||
@ -1976,11 +1971,8 @@ void APP_time_slice_500ms(void)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef ENABLE_TX_TIMEOUT_BAR
|
||||
if (g_current_function == FUNCTION_TRANSMIT && g_tx_timer_tick_500ms & 1u))
|
||||
if (g_current_function == FUNCTION_TRANSMIT && (g_tx_timer_tick_500ms & 1u))
|
||||
g_update_display = true;
|
||||
// UI_DisplayTXCountdown(true);
|
||||
#endif
|
||||
|
||||
if (g_menu_tick_10ms > 0)
|
||||
if (--g_menu_tick_10ms == 0)
|
||||
|
@ -122,7 +122,7 @@ void GENERIC_Key_PTT(bool key_pressed)
|
||||
g_flag_end_tx = false;
|
||||
|
||||
#ifdef ENABLE_VOX
|
||||
g_vox_noise_detected = false;
|
||||
g_vox_audio_detected = false;
|
||||
#endif
|
||||
|
||||
RADIO_set_vfo_state(VFO_STATE_NORMAL);
|
||||
|
BIN
firmware.bin
BIN
firmware.bin
Binary file not shown.
Binary file not shown.
2
misc.c
2
misc.c
@ -176,7 +176,7 @@ uint8_t g_ctcss_tail_phase_shift_rx;
|
||||
|
||||
#ifdef ENABLE_VOX
|
||||
bool g_vox_lost;
|
||||
bool g_vox_noise_detected;
|
||||
bool g_vox_audio_detected;
|
||||
uint16_t g_vox_resume_tick_10ms;
|
||||
uint16_t g_vox_pause_tick_10ms;
|
||||
#endif
|
||||
|
2
misc.h
2
misc.h
@ -271,7 +271,7 @@ extern uint8_t g_ctcss_tail_phase_shift_rx;
|
||||
|
||||
#ifdef ENABLE_VOX
|
||||
extern bool g_vox_lost;
|
||||
extern bool g_vox_noise_detected;
|
||||
extern bool g_vox_audio_detected;
|
||||
extern uint16_t g_vox_resume_tick_10ms;
|
||||
extern uint16_t g_vox_pause_tick_10ms;
|
||||
#endif
|
||||
|
63
ui/main.c
63
ui/main.c
@ -74,60 +74,6 @@ void draw_bar(uint8_t *line, const int len, const int max_width)
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef ENABLE_TX_TIMEOUT_BAR
|
||||
bool UI_DisplayTXCountdown(const bool now)
|
||||
{
|
||||
unsigned int timeout_secs = 0;
|
||||
|
||||
if (g_current_function != FUNCTION_TRANSMIT || g_current_display_screen != DISPLAY_MAIN)
|
||||
return false;
|
||||
|
||||
if (g_center_line != CENTER_LINE_NONE && g_center_line != CENTER_LINE_TX_TIMEOUT)
|
||||
return false;
|
||||
|
||||
if (g_eeprom.config.setting.tx_timeout == 0)
|
||||
timeout_secs = 30; // 30 sec
|
||||
else
|
||||
if (g_eeprom.config.setting.tx_timeout < (ARRAY_SIZE(g_sub_menu_tx_timeout) - 1))
|
||||
timeout_secs = 60 * g_eeprom.config.setting.tx_timeout; // minutes
|
||||
else
|
||||
timeout_secs = 60 * 15; // 15 minutes
|
||||
|
||||
if (timeout_secs == 0 || g_tx_timer_tick_500ms == 0)
|
||||
return false;
|
||||
|
||||
{
|
||||
const unsigned int line = 3;
|
||||
const unsigned int txt_width = 7 * 6; // 6 text chars
|
||||
const unsigned int bar_x = 2 + txt_width + 4; // X coord of bar graph
|
||||
const unsigned int bar_width = LCD_WIDTH - 1 - bar_x;
|
||||
const unsigned int secs = g_tx_timer_tick_500ms / 2;
|
||||
const unsigned int level = ((secs * bar_width) + (timeout_secs / 2)) / timeout_secs; // with rounding
|
||||
// const unsigned int level = (((timeout_secs - secs) * bar_width) + (timeout_secs / 2)) / timeout_secs; // with rounding
|
||||
const unsigned int len = (level <= bar_width) ? level : bar_width;
|
||||
uint8_t *p_line = g_frame_buffer[line];
|
||||
char s[17];
|
||||
|
||||
if (now)
|
||||
memset(p_line, 0, LCD_WIDTH);
|
||||
|
||||
sprintf(s, "TX %u", secs);
|
||||
#ifdef ENABLE_SMALL_BOLD
|
||||
UI_PrintStringSmallBold(s, 2, 0, line);
|
||||
#else
|
||||
UI_PrintStringSmall(s, 2, 0, line);
|
||||
#endif
|
||||
|
||||
draw_bar(p_line + bar_x, len, bar_width);
|
||||
|
||||
if (now)
|
||||
ST7565_BlitFullScreen();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
void UI_drawBars(uint8_t *p, const unsigned int level)
|
||||
{
|
||||
#pragma GCC diagnostic push
|
||||
@ -929,15 +875,6 @@ void UI_DisplayMain(void)
|
||||
|
||||
const bool rx = (g_current_function == FUNCTION_RECEIVE && g_squelch_open) ? true : false;
|
||||
|
||||
#ifdef ENABLE_TX_TIMEOUT_BAR
|
||||
// show the TX timeout count down
|
||||
if (UI_DisplayTXCountdown(false))
|
||||
{
|
||||
g_center_line = CENTER_LINE_TX_TIMEOUT;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_TX_AUDIO_BAR
|
||||
// show the TX audio level
|
||||
if (UI_DisplayAudioBar(false))
|
||||
|
@ -20,7 +20,6 @@
|
||||
enum center_line_e {
|
||||
CENTER_LINE_NONE = 0,
|
||||
CENTER_LINE_IN_USE,
|
||||
CENTER_LINE_TX_TIMEOUT,
|
||||
CENTER_LINE_AUDIO_BAR,
|
||||
CENTER_LINE_RSSI,
|
||||
CENTER_LINE_AM_FIX_DATA,
|
||||
@ -32,9 +31,6 @@ typedef enum center_line_e center_line_t;
|
||||
|
||||
extern center_line_t g_center_line;
|
||||
|
||||
#ifdef ENABLE_TX_TIMEOUT_BAR
|
||||
bool UI_DisplayTXCountdown(const bool now);
|
||||
#endif
|
||||
#ifdef ENABLE_TX_AUDIO_BAR
|
||||
bool UI_DisplayAudioBar(const bool now);
|
||||
#endif
|
||||
|
@ -159,7 +159,7 @@ void UI_DisplayStatus(const bool test_display)
|
||||
// VOX indicator
|
||||
if (g_eeprom.config.setting.vox_enabled || test_display)
|
||||
{
|
||||
memcpy(line + x, g_vox_noise_detected ? BITMAP_VOX : BITMAP_VOX_SMALL, sizeof(BITMAP_VOX));
|
||||
memcpy(line + x, g_vox_audio_detected ? BITMAP_VOX : BITMAP_VOX_SMALL, sizeof(BITMAP_VOX));
|
||||
x += sizeof(BITMAP_VOX) + 1;
|
||||
}
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user