0
mirror of https://github.com/OneOfEleven/uv-k5-firmware-custom.git synced 2025-06-19 22:58:04 +03:00

removed a 1000 pragmas

This commit is contained in:
OneOfEleven
2023-10-28 23:11:57 +01:00
parent 37b766c2fc
commit 02ecffd210
13 changed files with 50 additions and 98 deletions

View File

@ -458,11 +458,11 @@ void MENU_AcceptSetting(void)
g_request_save_channel = 1;
return;
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wimplicit-fallthrough="
case MENU_TX_CTCSS:
pConfig = &g_tx_vfo->freq_config_tx;
// Fallthrough
case MENU_RX_CTCSS:
if (g_sub_menu_selection == 0)
{
@ -489,8 +489,6 @@ void MENU_AcceptSetting(void)
g_request_save_channel = 1;
return;
#pragma GCC diagnostic pop
case MENU_SHIFT_DIR:
g_tx_vfo->tx_offset_freq_dir = g_sub_menu_selection;
g_request_save_channel = 1;
@ -1369,7 +1367,7 @@ static void MENU_Key_0_to_9(key_code_t Key, bool key_pressed, bool key_held)
{
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wtype-limits"
if (Key >= KEY_0 && Key <= KEY_9)
{
g_edit[g_edit_index] = '0' + Key - KEY_0;
@ -1395,9 +1393,6 @@ static void MENU_Key_0_to_9(key_code_t Key, bool key_pressed, bool key_held)
if (!g_in_sub_menu)
{
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wimplicit-fallthrough="
switch (g_input_box_index)
{
case 2:
@ -1418,6 +1413,8 @@ static void MENU_Key_0_to_9(key_code_t Key, bool key_pressed, bool key_held)
g_input_box[0] = g_input_box[1];
g_input_box_index = 1;
// Fallthrough
case 1:
value = g_input_box[0];
if (value > 0 && value <= g_menu_list_count)
@ -1429,8 +1426,6 @@ static void MENU_Key_0_to_9(key_code_t Key, bool key_pressed, bool key_held)
break;
}
#pragma GCC diagnostic pop
g_input_box_index = 0;
g_beep_to_play = BEEP_500HZ_60MS_DOUBLE_BEEP_OPTIONAL;
@ -1891,9 +1886,6 @@ static void MENU_Key_UP_DOWN(bool key_pressed, bool key_held, int8_t Direction)
VFO = 0;
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wimplicit-fallthrough="
switch (g_menu_cursor)
{
case MENU_OFFSET:
@ -1932,6 +1924,9 @@ static void MENU_Key_UP_DOWN(bool key_pressed, bool key_held, int8_t Direction)
case MENU_SLIST2:
VFO = 1;
// Fallthrough
case MENU_SLIST1:
bCheckScanList = true;
break;
@ -1942,8 +1937,6 @@ static void MENU_Key_UP_DOWN(bool key_pressed, bool key_held, int8_t Direction)
return;
}
#pragma GCC diagnostic pop
Channel = RADIO_FindNextChannel(g_sub_menu_selection + Direction, Direction, bCheckScanList, VFO);
if (Channel != 0xFF)
g_sub_menu_selection = Channel;