mirror of
https://github.com/OneOfEleven/uv-k5-firmware-custom.git
synced 2025-04-28 06:11:24 +03:00
Added brickies editings, fixed a couple of warnings.
This commit is contained in:
parent
c76891be6d
commit
44f90a20b4
7
Makefile
7
Makefile
@ -200,6 +200,7 @@ ifeq ($(ENABLE_OVERLAY),1)
|
||||
endif
|
||||
|
||||
CFLAGS =
|
||||
|
||||
ifeq ($(ENABLE_CLANG),0)
|
||||
CFLAGS += -Os -Wall -Werror -mcpu=cortex-m0 -fno-builtin -fshort-enums -fno-delete-null-pointer-checks -std=c11 -MMD
|
||||
#CFLAGS += -Os -Wall -Werror -mcpu=cortex-m0 -fno-builtin -fshort-enums -fno-delete-null-pointer-checks -std=c99 -MMD
|
||||
@ -207,7 +208,8 @@ ifeq ($(ENABLE_CLANG),0)
|
||||
#CFLAGS += -Os -Wall -Werror -mcpu=cortex-m0 -fno-builtin -fshort-enums -fno-delete-null-pointer-checks -std=gnu11 -MMD
|
||||
else
|
||||
# Oz needed to make it fit on flash
|
||||
CFLAGS += -Oz -Wall -Werror -mcpu=cortex-m0 -fno-builtin -fshort-enums -fno-delete-null-pointer-checks -std=c11 -MMD
|
||||
#CFLAGS += -Oz -Wall -Werror -mcpu=cortex-m0 -fno-builtin -fshort-enums -fno-delete-null-pointer-checks -std=c11 -MMD
|
||||
CFLAGS += -Os -Wall -Werror -mcpu=cortex-m0 -std=c11 -MMD
|
||||
endif
|
||||
|
||||
ifeq ($(ENABLE_LTO),1)
|
||||
@ -221,7 +223,8 @@ endif
|
||||
#CFLAGS += -Wpadded
|
||||
|
||||
# catch any and all warnings
|
||||
#CFLAGS += -Wextra
|
||||
# better to bust than add new bugs
|
||||
CFLAGS += -Wextra
|
||||
|
||||
CFLAGS += -DPRINTF_INCLUDE_CONFIG_H
|
||||
CFLAGS += -DGIT_HASH=\"$(GIT_HASH)\"
|
||||
|
@ -747,7 +747,7 @@ static void USER_NextChannel(void)
|
||||
#ifdef ENABLE_NOAA
|
||||
static void NOAA_IncreaseChannel(void)
|
||||
{
|
||||
if (++g_noaa_channel > 9)
|
||||
if (++g_noaa_channel >= ARRAY_SIZE(NoaaFrequencyTable))
|
||||
g_noaa_channel = 0;
|
||||
}
|
||||
#endif
|
||||
|
BIN
firmware.bin
BIN
firmware.bin
Binary file not shown.
Binary file not shown.
@ -21,7 +21,7 @@
|
||||
|
||||
enum function_type_e
|
||||
{
|
||||
FUNCTION_FOREGROUND = 0, // ???
|
||||
FUNCTION_FOREGROUND = 0, // idle (not in power save)
|
||||
FUNCTION_TRANSMIT, // transmitting
|
||||
FUNCTION_MONITOR, // receiving with squelch forced open
|
||||
FUNCTION_INCOMING, // receiving a signal (squelch is open)
|
||||
@ -31,7 +31,7 @@ enum function_type_e
|
||||
};
|
||||
typedef enum function_type_e function_type_t;
|
||||
|
||||
extern function_type_t g_current_function;
|
||||
extern function_type_t g_current_function;
|
||||
|
||||
void FUNCTION_Init(void);
|
||||
void FUNCTION_Select(function_type_t Function);
|
||||
|
6
misc.h
6
misc.h
@ -32,12 +32,14 @@
|
||||
#define MIN(a, b) ({ __typeof__ (a) _a = (a); __typeof__ (b) _b = (b); _a < _b ? _a : _b; })
|
||||
#endif
|
||||
|
||||
#define IS_USER_CHANNEL(x) ((x) >= USER_CHANNEL_FIRST && (x) <= USER_CHANNEL_LAST)
|
||||
//#define IS_USER_CHANNEL(x) ((x) >= USER_CHANNEL_FIRST && (x) <= USER_CHANNEL_LAST)
|
||||
#define IS_USER_CHANNEL(x) ((x) <= USER_CHANNEL_LAST)
|
||||
#define IS_FREQ_CHANNEL(x) ((x) >= FREQ_CHANNEL_FIRST && (x) <= FREQ_CHANNEL_LAST)
|
||||
#define IS_VALID_CHANNEL(x) ((x) < LAST_CHANNEL)
|
||||
|
||||
#define IS_NOAA_CHANNEL(x) ((x) >= NOAA_CHANNEL_FIRST && (x) <= NOAA_CHANNEL_LAST)
|
||||
#define IS_NOT_NOAA_CHANNEL(x) ((x) >= USER_CHANNEL_FIRST && (x) <= FREQ_CHANNEL_LAST)
|
||||
//#define IS_NOT_NOAA_CHANNEL(x) ((x) >= USER_CHANNEL_FIRST && (x) <= FREQ_CHANNEL_LAST)
|
||||
#define IS_NOT_NOAA_CHANNEL(x) ((x) <= FREQ_CHANNEL_LAST)
|
||||
|
||||
// PTT key-up/key-down audio tone freq's used in NASA's apollo rides to the moon
|
||||
#define APOLLO_TONE_MS 200 // slightly shorter tone length
|
||||
|
2
radio.c
2
radio.c
@ -178,7 +178,7 @@ void RADIO_ConfigureChannel(const unsigned int VFO, const unsigned int configure
|
||||
|
||||
if (Channel <= USER_CHANNEL_LAST)
|
||||
{
|
||||
Channel = RADIO_FindNextChannel(Channel, RADIO_CHANNEL_UP, false, VFO);
|
||||
Channel = RADIO_FindNextChannel(Channel, SCAN_FWD, false, VFO);
|
||||
if (Channel == 0xFF)
|
||||
{
|
||||
Channel = g_eeprom.freq_channel[VFO];
|
||||
|
4
radio.h
4
radio.h
@ -30,12 +30,12 @@ enum {
|
||||
USER_CH_SCANLIST2 = 1u << 6,
|
||||
USER_CH_SCANLIST1 = 1u << 7
|
||||
};
|
||||
|
||||
/*
|
||||
enum {
|
||||
RADIO_CHANNEL_UP = 0x01u,
|
||||
RADIO_CHANNEL_DOWN = 0xFFu,
|
||||
};
|
||||
|
||||
*/
|
||||
enum {
|
||||
BANDWIDTH_WIDE = 0,
|
||||
BANDWIDTH_NARROW
|
||||
|
13
ui/scanner.c
13
ui/scanner.c
@ -30,7 +30,7 @@
|
||||
|
||||
void UI_DisplayScanner(void)
|
||||
{
|
||||
char String[16];
|
||||
char String[17];
|
||||
bool text_centered = false;
|
||||
|
||||
if (g_screen_to_display != DISPLAY_SCANNER)
|
||||
@ -42,6 +42,9 @@ void UI_DisplayScanner(void)
|
||||
// ***********************************
|
||||
// frequency text line
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wimplicit-fallthrough="
|
||||
|
||||
switch (g_scan_css_state)
|
||||
{
|
||||
default:
|
||||
@ -66,6 +69,8 @@ void UI_DisplayScanner(void)
|
||||
break;
|
||||
}
|
||||
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
UI_PrintString(String, 2, 0, 1, 8);
|
||||
|
||||
// ***********************************
|
||||
@ -120,6 +125,9 @@ void UI_DisplayScanner(void)
|
||||
default:
|
||||
case SCAN_EDIT_STATE_NONE:
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wimplicit-fallthrough="
|
||||
|
||||
switch (g_scan_css_state)
|
||||
{
|
||||
default:
|
||||
@ -148,6 +156,9 @@ void UI_DisplayScanner(void)
|
||||
text_centered = true;
|
||||
break;
|
||||
}
|
||||
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
break;
|
||||
|
||||
case SCAN_EDIT_STATE_BUSY:
|
||||
|
Loading…
x
Reference in New Issue
Block a user