mirror of
https://github.com/OneOfEleven/uv-k5-firmware-custom.git
synced 2025-04-28 22:31:25 +03:00
Made the channel/frequencies/name stand in line
This commit is contained in:
parent
9651e52317
commit
2fe546accd
4
Makefile
4
Makefile
@ -11,7 +11,6 @@ ENABLE_VOICE := 0
|
|||||||
ENABLE_ALARM := 0
|
ENABLE_ALARM := 0
|
||||||
ENABLE_BIG_FREQ := 0
|
ENABLE_BIG_FREQ := 0
|
||||||
ENABLE_KEEP_MEM_NAME := 1
|
ENABLE_KEEP_MEM_NAME := 1
|
||||||
ENABLE_CHAN_NAME_FREQ := 1
|
|
||||||
ENABLE_WIDE_RX := 1
|
ENABLE_WIDE_RX := 1
|
||||||
ENABLE_TX_WHEN_AM := 0
|
ENABLE_TX_WHEN_AM := 0
|
||||||
ENABLE_CTCSS_TAIL_PHASE_SHIFT := 1
|
ENABLE_CTCSS_TAIL_PHASE_SHIFT := 1
|
||||||
@ -171,9 +170,6 @@ endif
|
|||||||
ifeq ($(ENABLE_KEEP_MEM_NAME),1)
|
ifeq ($(ENABLE_KEEP_MEM_NAME),1)
|
||||||
CFLAGS += -DKEEP_MEM_NAME
|
CFLAGS += -DKEEP_MEM_NAME
|
||||||
endif
|
endif
|
||||||
ifeq ($(ENABLE_CHAN_NAME_FREQ),1)
|
|
||||||
CFLAGS += -DENABLE_CHAN_NAME_FREQ
|
|
||||||
endif
|
|
||||||
ifeq ($(ENABLE_WIDE_RX),1)
|
ifeq ($(ENABLE_WIDE_RX),1)
|
||||||
CFLAGS += -DENABLE_WIDE_RX
|
CFLAGS += -DENABLE_WIDE_RX
|
||||||
endif
|
endif
|
||||||
|
@ -22,7 +22,6 @@ ENABLE_VOICE := 0 want to hear voices ?
|
|||||||
ENABLE_ALARM := 0 TX alarms
|
ENABLE_ALARM := 0 TX alarms
|
||||||
ENABLE_BIG_FREQ := 0 big font frequencies
|
ENABLE_BIG_FREQ := 0 big font frequencies
|
||||||
ENABLE_KEEP_MEM_NAME := 1 maintain channel name when (re)saving memory channel
|
ENABLE_KEEP_MEM_NAME := 1 maintain channel name when (re)saving memory channel
|
||||||
ENABLE_CHAN_NAME_FREQ := 1 show channel frequency below channel name/number
|
|
||||||
ENABLE_WIDE_RX := 1 full 18MHz to 1300MHz RX (though frontend not tuned over full range)
|
ENABLE_WIDE_RX := 1 full 18MHz to 1300MHz RX (though frontend not tuned over full range)
|
||||||
ENABLE_TX_WHEN_AM := 0 allow TX (always FM) when RX is set to AM
|
ENABLE_TX_WHEN_AM := 0 allow TX (always FM) when RX is set to AM
|
||||||
ENABLE_CTCSS_TAIL_PHASE_SHIFT := 1 standard CTCSS tail phase shift rather than QS's own 55Hz tone method
|
ENABLE_CTCSS_TAIL_PHASE_SHIFT := 1 standard CTCSS tail phase shift rather than QS's own 55Hz tone method
|
||||||
|
@ -540,11 +540,11 @@ const uint8_t BITMAP_ScanList[6] =
|
|||||||
*/
|
*/
|
||||||
const uint8_t BITMAP_ScanList1[6] =
|
const uint8_t BITMAP_ScanList1[6] =
|
||||||
{ // 1 symbol
|
{ // 1 symbol
|
||||||
|
0b00000000,
|
||||||
0b00000000,
|
0b00000000,
|
||||||
0b01000010,
|
0b01000010,
|
||||||
0b01111110,
|
0b01111110,
|
||||||
0b01000010,
|
0b01000010,
|
||||||
0b00000000,
|
|
||||||
0b00000000
|
0b00000000
|
||||||
};
|
};
|
||||||
|
|
||||||
|
18
board.c
18
board.c
@ -541,17 +541,13 @@ void BOARD_EEPROM_Init(void)
|
|||||||
|
|
||||||
// 0E78..0E7F
|
// 0E78..0E7F
|
||||||
EEPROM_ReadBuffer(0x0E78, Data, 8);
|
EEPROM_ReadBuffer(0x0E78, Data, 8);
|
||||||
#ifndef ENABLE_CHAN_NAME_FREQ
|
gEeprom.CHANNEL_DISPLAY_MODE = (Data[1] < 4) ? Data[1] : MDF_FREQUENCY; // 4 instead of 3 - extra display mode
|
||||||
gEeprom.CHANNEL_DISPLAY_MODE = (Data[1] < 3) ? Data[1] : MDF_FREQUENCY;
|
gEeprom.CROSS_BAND_RX_TX = (Data[2] < 3) ? Data[2] : CROSS_BAND_OFF;
|
||||||
#else
|
gEeprom.BATTERY_SAVE = (Data[3] < 5) ? Data[3] : 4;
|
||||||
gEeprom.CHANNEL_DISPLAY_MODE = (Data[1] < 4) ? Data[1] : MDF_FREQUENCY;
|
gEeprom.DUAL_WATCH = (Data[4] < 3) ? Data[4] : DUAL_WATCH_CHAN_A;
|
||||||
#endif
|
gEeprom.BACKLIGHT = (Data[5] < 6) ? Data[5] : 4;
|
||||||
gEeprom.CROSS_BAND_RX_TX = (Data[2] < 3) ? Data[2] : CROSS_BAND_OFF;
|
gEeprom.TAIL_NOTE_ELIMINATION = (Data[6] < 2) ? Data[6] : false;
|
||||||
gEeprom.BATTERY_SAVE = (Data[3] < 5) ? Data[3] : 4;
|
gEeprom.VFO_OPEN = (Data[7] < 2) ? Data[7] : true;
|
||||||
gEeprom.DUAL_WATCH = (Data[4] < 3) ? Data[4] : DUAL_WATCH_CHAN_A;
|
|
||||||
gEeprom.BACKLIGHT = (Data[5] < 6) ? Data[5] : 4;
|
|
||||||
gEeprom.TAIL_NOTE_ELIMINATION = (Data[6] < 2) ? Data[6] : false;
|
|
||||||
gEeprom.VFO_OPEN = (Data[7] < 2) ? Data[7] : true;
|
|
||||||
|
|
||||||
// 0E80..0E87
|
// 0E80..0E87
|
||||||
EEPROM_ReadBuffer(0x0E80, Data, 8);
|
EEPROM_ReadBuffer(0x0E80, Data, 8);
|
||||||
|
BIN
firmware.bin
BIN
firmware.bin
Binary file not shown.
Binary file not shown.
2
radio.c
2
radio.c
@ -383,7 +383,7 @@ void RADIO_ConfigureChannel(uint8_t VFO, uint32_t Arg)
|
|||||||
|
|
||||||
memset(gEeprom.VfoInfo[VFO].Name, 0, sizeof(gEeprom.VfoInfo[VFO].Name));
|
memset(gEeprom.VfoInfo[VFO].Name, 0, sizeof(gEeprom.VfoInfo[VFO].Name));
|
||||||
if (IS_MR_CHANNEL(Channel))
|
if (IS_MR_CHANNEL(Channel))
|
||||||
{ // 16 bytes allocated to the channel name but only 12 used
|
{ // 16 bytes allocated to the channel name but only 10 used
|
||||||
EEPROM_ReadBuffer(0x0F50 + (Channel * 16), gEeprom.VfoInfo[VFO].Name + 0, 8);
|
EEPROM_ReadBuffer(0x0F50 + (Channel * 16), gEeprom.VfoInfo[VFO].Name + 0, 8);
|
||||||
EEPROM_ReadBuffer(0x0F58 + (Channel * 16), gEeprom.VfoInfo[VFO].Name + 8, 2);
|
EEPROM_ReadBuffer(0x0F58 + (Channel * 16), gEeprom.VfoInfo[VFO].Name + 8, 2);
|
||||||
}
|
}
|
||||||
|
2
radio.h
2
radio.h
@ -127,7 +127,7 @@ typedef struct VFO_Info_t
|
|||||||
#ifdef ENABLE_COMPANDER
|
#ifdef ENABLE_COMPANDER
|
||||||
uint8_t Compander;
|
uint8_t Compander;
|
||||||
#endif
|
#endif
|
||||||
char Name[16];
|
char Name[10 + 1];
|
||||||
} VFO_Info_t;
|
} VFO_Info_t;
|
||||||
|
|
||||||
extern VFO_Info_t *gTxVfo;
|
extern VFO_Info_t *gTxVfo;
|
||||||
|
66
ui/main.c
66
ui/main.c
@ -42,8 +42,8 @@ void UI_DisplayMain(void)
|
|||||||
|
|
||||||
if (gEeprom.KEY_LOCK && gKeypadLocked > 0)
|
if (gEeprom.KEY_LOCK && gKeypadLocked > 0)
|
||||||
{ // tell user how to unlock the keyboard
|
{ // tell user how to unlock the keyboard
|
||||||
UI_PrintString("Long press #", 0, LCD_WIDTH - 1, 1, 8);
|
UI_PrintString("Long press #", 0, LCD_WIDTH, 1, 8);
|
||||||
UI_PrintString("to unlock", 0, LCD_WIDTH - 1, 3, 8);
|
UI_PrintString("to unlock", 0, LCD_WIDTH, 3, 8);
|
||||||
ST7565_BlitFullScreen();
|
ST7565_BlitFullScreen();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -244,13 +244,21 @@ void UI_DisplayMain(void)
|
|||||||
if (IS_MR_CHANNEL(gEeprom.ScreenChannel[vfo_num]))
|
if (IS_MR_CHANNEL(gEeprom.ScreenChannel[vfo_num]))
|
||||||
{ // channel mode
|
{ // channel mode
|
||||||
|
|
||||||
{ // show the scanlist symbols
|
// show the scanlist symbols
|
||||||
const uint8_t Attributes = gMR_ChannelAttributes[gEeprom.ScreenChannel[vfo_num]];
|
const uint8_t Attributes = gMR_ChannelAttributes[gEeprom.ScreenChannel[vfo_num]];
|
||||||
|
// #ifdef ENABLE_BIG_FREQ
|
||||||
|
// side-by-side
|
||||||
if (Attributes & MR_CH_SCANLIST1)
|
if (Attributes & MR_CH_SCANLIST1)
|
||||||
memmove(pLine0 + 113, BITMAP_ScanList1, sizeof(BITMAP_ScanList1));
|
memmove(pLine0 + 113, BITMAP_ScanList1, sizeof(BITMAP_ScanList1));
|
||||||
if (Attributes & MR_CH_SCANLIST2)
|
if (Attributes & MR_CH_SCANLIST2)
|
||||||
memmove(pLine0 + 120, BITMAP_ScanList2, sizeof(BITMAP_ScanList2));
|
memmove(pLine0 + 120, BITMAP_ScanList2, sizeof(BITMAP_ScanList2));
|
||||||
}
|
// #else
|
||||||
|
// // top-bottom .. makes room for full 10 characters of channel name
|
||||||
|
// if (Attributes & MR_CH_SCANLIST1)
|
||||||
|
// memmove(pLine0 + 120, BITMAP_ScanList1, sizeof(BITMAP_ScanList1));
|
||||||
|
// if (Attributes & MR_CH_SCANLIST2)
|
||||||
|
// memmove(pLine0 + 120 + LCD_WIDTH, BITMAP_ScanList2, sizeof(BITMAP_ScanList2));
|
||||||
|
// #endif
|
||||||
|
|
||||||
switch (gEeprom.CHANNEL_DISPLAY_MODE)
|
switch (gEeprom.CHANNEL_DISPLAY_MODE)
|
||||||
{
|
{
|
||||||
@ -260,17 +268,17 @@ void UI_DisplayMain(void)
|
|||||||
// show the main large frequency digits
|
// show the main large frequency digits
|
||||||
UI_DisplayFrequency(String, 31, Line, false, false);
|
UI_DisplayFrequency(String, 31, Line, false, false);
|
||||||
// show the remaining 2 small frequency digits
|
// show the remaining 2 small frequency digits
|
||||||
UI_DisplaySmallDigits(2, String + 6, 112, Line + 1, true);
|
UI_DisplaySmallDigits(2, String + 7, 112, Line + 1, true);
|
||||||
#else
|
#else
|
||||||
// show the frequency in the main font
|
// show the frequency in the main font
|
||||||
sprintf(String, "%03u.%05u", frequency / 100000, frequency % 100000);
|
sprintf(String, "%03u.%05u", frequency / 100000, frequency % 100000);
|
||||||
UI_PrintString(String, 31, 112, Line, 8);
|
UI_PrintString(String, 32, 0, Line, 8);
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MDF_CHANNEL: // show the channel number
|
case MDF_CHANNEL: // show the channel number
|
||||||
sprintf(String, "CH-%03u", gEeprom.ScreenChannel[vfo_num] + 1);
|
sprintf(String, "CH-%03u", gEeprom.ScreenChannel[vfo_num] + 1);
|
||||||
UI_PrintString(String, 31, 112, Line, 8);
|
UI_PrintString(String, 32, 0, Line, 8);
|
||||||
frequency = 0;
|
frequency = 0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -284,28 +292,26 @@ void UI_DisplayMain(void)
|
|||||||
memset(String, 0, sizeof(String));
|
memset(String, 0, sizeof(String));
|
||||||
memmove(String, gEeprom.VfoInfo[vfo_num].Name, 10);
|
memmove(String, gEeprom.VfoInfo[vfo_num].Name, 10);
|
||||||
}
|
}
|
||||||
UI_PrintString(String, 31, 112, Line, 8);
|
// UI_PrintString(String, 32, 112, Line, 8);
|
||||||
|
UI_PrintString(String, 32, 0, Line, 8);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#ifdef ENABLE_CHAN_NAME_FREQ
|
case MDF_NAME_FREQ: // show the channel name and frequency
|
||||||
case MDF_NAME_FREQ: // show the channel name and frequency
|
if (gEeprom.VfoInfo[vfo_num].Name[0] <= 32 || gEeprom.VfoInfo[vfo_num].Name[0] >= 127)
|
||||||
if (gEeprom.VfoInfo[vfo_num].Name[0] <= 32 || gEeprom.VfoInfo[vfo_num].Name[0] >= 127)
|
{ // no channel name, show channel number instead
|
||||||
{ // no channel name, show channel number instead
|
sprintf(String, "CH-%03u", gEeprom.ScreenChannel[vfo_num] + 1);
|
||||||
sprintf(String, "CH-%03u", gEeprom.ScreenChannel[vfo_num] + 1);
|
}
|
||||||
}
|
else
|
||||||
else
|
{ // channel name
|
||||||
{ // channel name
|
memset(String, 0, sizeof(String));
|
||||||
memset(String, 0, sizeof(String));
|
memmove(String, gEeprom.VfoInfo[vfo_num].Name, 10);
|
||||||
memmove(String, gEeprom.VfoInfo[vfo_num].Name, 10);
|
}
|
||||||
}
|
UI_PrintStringSmall(String, 32, 0, Line);
|
||||||
UI_PrintStringSmall(String, 31 + 8, 0, Line);
|
|
||||||
|
|
||||||
// show the channel frequency below the channel number/name
|
// show the channel frequency below the channel number/name
|
||||||
sprintf(String, "%03u.%05u", frequency / 100000, frequency % 100000);
|
sprintf(String, "%03u.%05u", frequency / 100000, frequency % 100000);
|
||||||
UI_PrintStringSmall(String, 31 + 8, 0, Line + 1);
|
UI_PrintStringSmall(String, 32, 0, Line + 1);
|
||||||
|
break;
|
||||||
break;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -313,13 +319,13 @@ void UI_DisplayMain(void)
|
|||||||
#ifdef ENABLE_BIG_FREQ
|
#ifdef ENABLE_BIG_FREQ
|
||||||
NUMBER_ToDigits(frequency, String); // 8 digits
|
NUMBER_ToDigits(frequency, String); // 8 digits
|
||||||
// show the main large frequency digits
|
// show the main large frequency digits
|
||||||
UI_DisplayFrequency(String, 31, Line, false, false);
|
UI_DisplayFrequency(String, 32, Line, false, false);
|
||||||
// show the remaining 2 small frequency digits
|
// show the remaining 2 small frequency digits
|
||||||
UI_DisplaySmallDigits(2, String + 6, 112, Line + 1, true);
|
UI_DisplaySmallDigits(2, String + 7, 112, Line + 1, true);
|
||||||
#else
|
#else
|
||||||
// show the frequency in the main font
|
// show the frequency in the main font
|
||||||
sprintf(String, "%03u.%05u", frequency / 100000, frequency % 100000);
|
sprintf(String, "%03u.%05u", frequency / 100000, frequency % 100000);
|
||||||
UI_PrintString(String, 31, 112, Line, 8);
|
UI_PrintString(String, 32, 0, Line, 8);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
23
ui/menu.c
23
ui/menu.c
@ -175,22 +175,13 @@ const char gSubMenu_SC_REV[3][3] =
|
|||||||
"SE"
|
"SE"
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifndef ENABLE_CHAN_NAME_FREQ
|
const char gSubMenu_MDF[4][8] =
|
||||||
const char gSubMenu_MDF[3][5] =
|
{
|
||||||
{
|
"FREQ",
|
||||||
"FREQ",
|
"CHAN",
|
||||||
"CHAN",
|
"NAME",
|
||||||
"NAME"
|
"NAM+FRE"
|
||||||
};
|
};
|
||||||
#else
|
|
||||||
const char gSubMenu_MDF[4][8] =
|
|
||||||
{
|
|
||||||
"FREQ",
|
|
||||||
"CHAN",
|
|
||||||
"NAME",
|
|
||||||
"NAM+FRE"
|
|
||||||
};
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef ENABLE_ALARM
|
#ifdef ENABLE_ALARM
|
||||||
const char gSubMenu_AL_MOD[2][5] =
|
const char gSubMenu_AL_MOD[2][5] =
|
||||||
|
@ -109,11 +109,7 @@ extern const char gSubMenu_CHAN[3][7];
|
|||||||
extern const char gSubMenu_VOICE[3][4];
|
extern const char gSubMenu_VOICE[3][4];
|
||||||
#endif
|
#endif
|
||||||
extern const char gSubMenu_SC_REV[3][3];
|
extern const char gSubMenu_SC_REV[3][3];
|
||||||
#ifndef ENABLE_CHAN_NAME_FREQ
|
extern const char gSubMenu_MDF[4][8];
|
||||||
extern const char gSubMenu_MDF[3][5];
|
|
||||||
#else
|
|
||||||
extern const char gSubMenu_MDF[4][8];
|
|
||||||
#endif
|
|
||||||
#ifdef ENABLE_ALARM
|
#ifdef ENABLE_ALARM
|
||||||
extern const char gSubMenu_AL_MOD[2][5];
|
extern const char gSubMenu_AL_MOD[2][5];
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user