mirror of
https://github.com/OneOfEleven/uv-k5-firmware-custom.git
synced 2025-06-19 06:39:49 +03:00
removed a 1000 pragmas
This commit is contained in:
@ -39,9 +39,6 @@
|
||||
#include "ui/inputbox.h"
|
||||
#include "ui/ui.h"
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wimplicit-fallthrough="
|
||||
|
||||
static void ACTION_FlashLight(void)
|
||||
{
|
||||
switch (g_flash_light_state)
|
||||
@ -63,6 +60,8 @@ static void ACTION_FlashLight(void)
|
||||
|
||||
case FLASHLIGHT_SOS:
|
||||
|
||||
// Fallthrough
|
||||
|
||||
default:
|
||||
g_flash_light_state = FLASHLIGHT_OFF;
|
||||
GPIO_ClearBit(&GPIOC->DATA, GPIOC_PIN_FLASHLIGHT);
|
||||
@ -428,5 +427,3 @@ void ACTION_process(const key_code_t Key, const bool key_pressed, const bool key
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#pragma GCC diagnostic pop
|
||||
|
18
app/app.c
18
app/app.c
@ -78,9 +78,6 @@ const uint8_t orig_lna = 5; // -4dB
|
||||
const uint8_t orig_mixer = 3; // 0dB
|
||||
const uint8_t orig_pga = 6; // -3dB
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wimplicit-fallthrough="
|
||||
|
||||
static void APP_process_key(const key_code_t Key, const bool key_pressed, const bool key_held);
|
||||
|
||||
static void APP_update_rssi(const int vfo)
|
||||
@ -742,6 +739,8 @@ static void APP_next_channel(void)
|
||||
}
|
||||
}
|
||||
|
||||
// Fallthrough
|
||||
|
||||
case SCAN_NEXT_CHAN_SCANLIST2:
|
||||
if (chan2 >= 0)
|
||||
{
|
||||
@ -753,6 +752,8 @@ static void APP_next_channel(void)
|
||||
}
|
||||
}
|
||||
|
||||
// Fallthrough
|
||||
|
||||
// this bit doesn't yet work if the other VFO is a frequency
|
||||
case SCAN_NEXT_CHAN_DUAL_WATCH:
|
||||
// dual watch is enabled - include the other VFO in the scan
|
||||
@ -768,6 +769,8 @@ static void APP_next_channel(void)
|
||||
// }
|
||||
// }
|
||||
|
||||
// Fallthrough
|
||||
|
||||
default:
|
||||
case SCAN_NEXT_CHAN_USER:
|
||||
g_scan_current_scan_list = SCAN_NEXT_CHAN_USER;
|
||||
@ -1433,11 +1436,11 @@ void APP_process_flash_light_10ms(void)
|
||||
|
||||
case FLASHLIGHT_SOS:
|
||||
{ // 150ms tick
|
||||
// '15' sets the morse speed, lower value = faster speed
|
||||
// '16' sets the morse speed, lower value = faster speed
|
||||
// '+ 6' lengthens the loop time
|
||||
const unsigned int num_bits = sizeof(sos) * 8;
|
||||
const unsigned int bit = (g_flash_light_blink_tick_10ms / 15) % (num_bits + 6);
|
||||
if (bit < num_bits && (sos & (1u << ((num_bits - 1) - bit))))
|
||||
const unsigned int bit = (g_flash_light_blink_tick_10ms / 16) % (num_bits + 6);
|
||||
if (bit < num_bits && (sos & (1u << (num_bits - 1 - bit))))
|
||||
GPIO_SetBit(&GPIOC->DATA, GPIOC_PIN_FLASHLIGHT); // ON
|
||||
else
|
||||
GPIO_ClearBit(&GPIOC->DATA, GPIOC_PIN_FLASHLIGHT); // OFF
|
||||
@ -3018,6 +3021,3 @@ Skip:
|
||||
g_request_display_screen = DISPLAY_INVALID;
|
||||
g_update_display = true;
|
||||
}
|
||||
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
|
@ -361,13 +361,13 @@ void DTMF_HandleRequest(void)
|
||||
|
||||
g_update_display = true;
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wimplicit-fallthrough="
|
||||
|
||||
switch (g_eeprom.dtmf_decode_response)
|
||||
{
|
||||
case DTMF_DEC_RESPONSE_BOTH:
|
||||
g_dtmf_decode_ring_tick_500ms = dtmf_decode_ring_500ms;
|
||||
|
||||
// Fallthrough
|
||||
|
||||
case DTMF_DEC_RESPONSE_REPLY:
|
||||
g_dtmf_reply_state = DTMF_REPLY_AAAAA;
|
||||
break;
|
||||
@ -381,8 +381,6 @@ void DTMF_HandleRequest(void)
|
||||
break;
|
||||
}
|
||||
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
if (g_dtmf_IsGroupCall)
|
||||
g_dtmf_reply_state = DTMF_REPLY_NONE;
|
||||
}
|
||||
|
25
app/menu.c
25
app/menu.c
@ -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;
|
||||
|
17
app/search.c
17
app/search.c
@ -98,9 +98,6 @@ static void SEARCH_Key_EXIT(bool key_pressed, bool key_held)
|
||||
|
||||
g_beep_to_play = BEEP_1KHZ_60MS_OPTIONAL;
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wimplicit-fallthrough="
|
||||
|
||||
switch (g_search_edit_state)
|
||||
{
|
||||
case SEARCH_EDIT_STATE_NONE:
|
||||
@ -128,6 +125,8 @@ static void SEARCH_Key_EXIT(bool key_pressed, bool key_held)
|
||||
break;
|
||||
}
|
||||
|
||||
// Fallthrough
|
||||
|
||||
case SEARCH_EDIT_STATE_SAVE_CONFIRM:
|
||||
g_search_edit_state = SEARCH_EDIT_STATE_NONE;
|
||||
|
||||
@ -139,8 +138,6 @@ static void SEARCH_Key_EXIT(bool key_pressed, bool key_held)
|
||||
g_update_display = true;
|
||||
break;
|
||||
}
|
||||
|
||||
#pragma GCC diagnostic pop
|
||||
}
|
||||
|
||||
static void SEARCH_Key_MENU(bool key_pressed, bool key_held)
|
||||
@ -173,9 +170,6 @@ static void SEARCH_Key_MENU(bool key_pressed, bool key_held)
|
||||
|
||||
g_beep_to_play = BEEP_1KHZ_60MS_OPTIONAL;
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wimplicit-fallthrough="
|
||||
|
||||
switch (g_search_edit_state)
|
||||
{
|
||||
case SEARCH_EDIT_STATE_NONE:
|
||||
@ -227,12 +221,13 @@ static void SEARCH_Key_MENU(bool key_pressed, bool key_held)
|
||||
|
||||
if (g_input_box_index == 0)
|
||||
{
|
||||
g_search_edit_state = SEARCH_EDIT_STATE_SAVE_CONFIRM;
|
||||
|
||||
g_search_edit_state = SEARCH_EDIT_STATE_SAVE_CONFIRM;
|
||||
g_beep_to_play = BEEP_1KHZ_60MS_OPTIONAL;
|
||||
g_request_display_screen = DISPLAY_SEARCH;
|
||||
}
|
||||
|
||||
// Fallthrough
|
||||
|
||||
// break;
|
||||
|
||||
case SEARCH_EDIT_STATE_SAVE_CONFIRM:
|
||||
@ -305,8 +300,6 @@ static void SEARCH_Key_MENU(bool key_pressed, bool key_held)
|
||||
g_beep_to_play = BEEP_1KHZ_60MS_OPTIONAL;
|
||||
break;
|
||||
}
|
||||
|
||||
#pragma GCC diagnostic pop
|
||||
}
|
||||
|
||||
static void SEARCH_Key_STAR(bool key_pressed, bool key_held)
|
||||
|
Reference in New Issue
Block a user