mirror of
https://github.com/OneOfEleven/uv-k5-firmware-custom.git
synced 2025-05-19 00:11:18 +03:00
some F+4 F+* fixes, more to come
This commit is contained in:
parent
55ceb92a61
commit
75d4f13d7b
2
Makefile
2
Makefile
@ -8,7 +8,7 @@ ENABLE_SWD := 0
|
||||
ENABLE_OVERLAY := 0
|
||||
ENABLE_LTO := 1
|
||||
ENABLE_UART := 1
|
||||
ENABLE_UART_DEBUG := 0
|
||||
ENABLE_UART_DEBUG := 1
|
||||
ENABLE_AIRCOPY := 1
|
||||
ENABLE_AIRCOPY_FREQ := 1
|
||||
ENABLE_FMRADIO := 1
|
||||
|
@ -455,7 +455,7 @@ static void AIRCOPY_Key_MENU(bool key_pressed, bool key_held)
|
||||
}
|
||||
}
|
||||
|
||||
void AIRCOPY_ProcessKeys(key_code_t Key, bool key_pressed, bool key_held)
|
||||
void AIRCOPY_ProcessKey(key_code_t Key, bool key_pressed, bool key_held)
|
||||
{
|
||||
switch (Key)
|
||||
{
|
||||
|
@ -40,6 +40,6 @@ extern uint16_t g_fsk_tx_timeout_10ms;
|
||||
void AIRCOPY_process_FSK_tx_10ms(void);
|
||||
void AIRCOPY_process_FSK_rx_10ms(const uint16_t interrupt_status_bits);
|
||||
void AIRCOPY_stop_FSK_tx(void);
|
||||
void AIRCOPY_ProcessKeys(key_code_t key, bool key_pressed, bool key_held);
|
||||
void AIRCOPY_ProcessKey(key_code_t key, bool key_pressed, bool key_held);
|
||||
|
||||
#endif
|
||||
|
22
app/app.c
22
app/app.c
@ -1324,14 +1324,6 @@ void APP_CheckKeys(void)
|
||||
if (g_setting_killed)
|
||||
return;
|
||||
|
||||
#ifdef ENABLE_AIRCOPY
|
||||
if (g_screen_to_display == DISPLAY_AIRCOPY &&
|
||||
(g_aircopy_state == AIRCOPY_RX || g_aircopy_state == AIRCOPY_TX))
|
||||
{ // AIRCOPY is busy RX/TX or we've been killed
|
||||
// return;
|
||||
}
|
||||
#endif
|
||||
|
||||
// *****************
|
||||
// PTT is treated completely separately from all the other buttons
|
||||
|
||||
@ -1418,7 +1410,7 @@ void APP_CheckKeys(void)
|
||||
if (g_screen_to_display != DISPLAY_AIRCOPY)
|
||||
APP_ProcessKey(g_key_prev, false, g_key_held);
|
||||
else
|
||||
AIRCOPY_ProcessKeys(g_key_prev, false, g_key_held);
|
||||
AIRCOPY_ProcessKey(g_key_prev, false, g_key_held);
|
||||
#else
|
||||
APP_ProcessKey(g_key_prev, false, g_key_held);
|
||||
#endif
|
||||
@ -1458,7 +1450,7 @@ void APP_CheckKeys(void)
|
||||
if (g_screen_to_display != DISPLAY_AIRCOPY)
|
||||
APP_ProcessKey(g_key_prev, true, g_key_held);
|
||||
else
|
||||
AIRCOPY_ProcessKeys(g_key_prev, true, g_key_held);
|
||||
AIRCOPY_ProcessKey(g_key_prev, true, g_key_held);
|
||||
#else
|
||||
APP_ProcessKey(g_key_prev, true, g_key_held);
|
||||
#endif
|
||||
@ -1483,7 +1475,7 @@ void APP_CheckKeys(void)
|
||||
if (g_screen_to_display != DISPLAY_AIRCOPY)
|
||||
APP_ProcessKey(g_key_prev, true, g_key_held);
|
||||
else
|
||||
AIRCOPY_ProcessKeys(g_key_prev, true, g_key_held);
|
||||
AIRCOPY_ProcessKey(g_key_prev, true, g_key_held);
|
||||
#else
|
||||
APP_ProcessKey(g_key_prev, true, g_key_held);
|
||||
#endif
|
||||
@ -1507,7 +1499,7 @@ void APP_CheckKeys(void)
|
||||
if (g_screen_to_display != DISPLAY_AIRCOPY)
|
||||
APP_ProcessKey(g_key_prev, true, g_key_held);
|
||||
else
|
||||
AIRCOPY_ProcessKeys(g_key_prev, true, g_key_held);
|
||||
AIRCOPY_ProcessKey(g_key_prev, true, g_key_held);
|
||||
#else
|
||||
APP_ProcessKey(g_key_prev, true, g_key_held);
|
||||
#endif
|
||||
@ -2401,8 +2393,8 @@ static void APP_ProcessKey(const key_code_t Key, const bool key_pressed, const b
|
||||
}
|
||||
|
||||
// key beep
|
||||
if (Key != KEY_PTT && !key_held && key_pressed)
|
||||
g_beep_to_play = BEEP_1KHZ_60MS_OPTIONAL;
|
||||
// if (Key != KEY_PTT && !key_held && key_pressed)
|
||||
// g_beep_to_play = BEEP_1KHZ_60MS_OPTIONAL;
|
||||
|
||||
// ********************
|
||||
|
||||
@ -2585,7 +2577,7 @@ static void APP_ProcessKey(const key_code_t Key, const bool key_pressed, const b
|
||||
|
||||
#ifdef ENABLE_AIRCOPY
|
||||
case DISPLAY_AIRCOPY:
|
||||
AIRCOPY_ProcessKeys(Key, key_pressed, key_held);
|
||||
AIRCOPY_ProcessKey(Key, key_pressed, key_held);
|
||||
break;
|
||||
#endif
|
||||
|
||||
|
@ -111,7 +111,7 @@ static void SCANNER_Key_EXIT(bool key_pressed, bool key_held)
|
||||
if (g_input_box_index > 0)
|
||||
{
|
||||
g_input_box[--g_input_box_index] = 10;
|
||||
g_request_display_screen = DISPLAY_SCANNER;
|
||||
g_request_display_screen = DISPLAY_SCANNER;
|
||||
break;
|
||||
}
|
||||
|
||||
@ -122,7 +122,8 @@ static void SCANNER_Key_EXIT(bool key_pressed, bool key_held)
|
||||
#ifdef ENABLE_VOICE
|
||||
g_another_voice_id = VOICE_ID_CANCEL;
|
||||
#endif
|
||||
g_request_display_screen = DISPLAY_SCANNER;
|
||||
// g_request_display_screen = DISPLAY_SCANNER;
|
||||
g_request_display_screen = DISPLAY_MAIN;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -149,7 +150,7 @@ static void SCANNER_Key_MENU(bool key_pressed, bool key_held)
|
||||
}
|
||||
}
|
||||
|
||||
if (g_scan_css_state == SCAN_CSS_STATE_FAILED)
|
||||
if (g_scan_css_state == SCAN_CSS_STATE_FAILED && g_scan_single_frequency)
|
||||
{
|
||||
g_beep_to_play = BEEP_500HZ_60MS_DOUBLE_BEEP_OPTIONAL;
|
||||
return;
|
||||
@ -160,7 +161,7 @@ static void SCANNER_Key_MENU(bool key_pressed, bool key_held)
|
||||
switch (g_scanner_edit_state)
|
||||
{
|
||||
case SCAN_EDIT_STATE_NONE:
|
||||
if (!g_scan_single_frequency)
|
||||
/* if (!g_scan_single_frequency)
|
||||
{
|
||||
#if 0
|
||||
uint32_t Freq250 = FREQUENCY_FloorToStep(g_scan_frequency, 250, 0);
|
||||
@ -249,24 +250,26 @@ static void SCANNER_Key_MENU(bool key_pressed, bool key_held)
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
*/
|
||||
if (g_tx_vfo->channel_save <= USER_CHANNEL_LAST)
|
||||
{
|
||||
{ // save to channel
|
||||
if (!g_scan_single_frequency)
|
||||
{ // round to the nearest step size
|
||||
const uint32_t step = g_tx_vfo->step_freq;
|
||||
g_scan_frequency = ((g_scan_frequency + (step / 2)) / step) * step;
|
||||
}
|
||||
g_scan_channel = g_tx_vfo->channel_save;
|
||||
g_show_chan_prefix = RADIO_CheckValidChannel(g_tx_vfo->channel_save, false, 0);
|
||||
g_scanner_edit_state = SCAN_EDIT_STATE_SAVE;
|
||||
}
|
||||
else
|
||||
{
|
||||
#if 1
|
||||
// save the VFO
|
||||
g_scanner_edit_state = SCAN_EDIT_STATE_DONE;
|
||||
#else
|
||||
// save to a desired channel
|
||||
g_scan_channel = RADIO_FindNextChannel(0, SCAN_FWD, false, g_eeprom.tx_vfo);
|
||||
g_show_chan_prefix = RADIO_CheckValidChannel(g_scan_channel, false, 0);
|
||||
g_scanner_edit_state = SCAN_EDIT_STATE_SAVE;
|
||||
#endif
|
||||
{ // save the VFO
|
||||
if (!g_scan_single_frequency)
|
||||
{ // round to the nearest step size
|
||||
const uint32_t step = g_tx_vfo->step_freq;
|
||||
g_scan_frequency = ((g_scan_frequency + (step / 2)) / step) * step;
|
||||
}
|
||||
g_scanner_edit_state = SCAN_EDIT_STATE_DONE;
|
||||
}
|
||||
|
||||
g_scan_css_state = SCAN_CSS_STATE_FOUND;
|
||||
|
BIN
firmware.bin
BIN
firmware.bin
Binary file not shown.
Binary file not shown.
@ -97,7 +97,7 @@ void UI_DisplayScanner(void)
|
||||
{
|
||||
default:
|
||||
case CODE_TYPE_OFF:
|
||||
strcpy(String, "CODE ???");
|
||||
strcpy(String, "CODE none");
|
||||
break;
|
||||
case CODE_TYPE_CONTINUOUS_TONE:
|
||||
sprintf(String, "CTCSS %u.%uHz", CTCSS_OPTIONS[g_scan_css_result_code] / 10, CTCSS_OPTIONS[g_scan_css_result_code] % 10);
|
||||
@ -110,7 +110,7 @@ void UI_DisplayScanner(void)
|
||||
break;
|
||||
|
||||
case SCAN_CSS_STATE_FAILED:
|
||||
strcpy(String, "CODE not found");
|
||||
strcpy(String, "CODE none");
|
||||
break;
|
||||
}
|
||||
|
||||
@ -145,7 +145,7 @@ void UI_DisplayScanner(void)
|
||||
break;
|
||||
|
||||
case SCAN_CSS_STATE_FAILED:
|
||||
if (g_scan_single_frequency)
|
||||
if (!g_scan_single_frequency)
|
||||
{
|
||||
strcpy(String, "* repeat M save");
|
||||
text_centered = true;
|
||||
@ -174,7 +174,8 @@ void UI_DisplayScanner(void)
|
||||
break;
|
||||
|
||||
case SCAN_EDIT_STATE_DONE:
|
||||
strcpy(String, "* repeat M save");
|
||||
// strcpy(String, "* repeat M save");
|
||||
strcpy(String, "* repeat");
|
||||
text_centered = true;
|
||||
break;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user