mirror of
https://github.com/OneOfEleven/uv-k5-firmware-custom.git
synced 2025-04-28 06:11:24 +03:00
.
This commit is contained in:
parent
010721deac
commit
59a9db1c4f
@ -99,7 +99,7 @@ ENABLE_SIDE_BUTT_MENU := 1 enable menu option for configuring t
|
||||
ENABLE_KEYLOCK := 1 enable keylock menu option + keylock code
|
||||
ENABLE_PANADAPTER := 1 centered on the selected VFO RX frequency, only shows if dual-watch is disabled
|
||||
ENABLE_PANADAPTER_PEAK_FREQ := 0 show the peak panadapter frequency
|
||||
#ENABLE_SINGLE_VFO_CHAN := 0 not yet implemented - single VFO on display when possible
|
||||
#ENABLE_SINGLE_VFO_CHAN := 0 not yet implemented
|
||||
```
|
||||
|
||||
# New/modified function keys
|
||||
@ -228,6 +228,8 @@ You may obtain a copy of the License at
|
||||
<img src="/images/image4.png" width=300 />
|
||||
</p>
|
||||
|
||||
<img src="/images/UV_K5_8_antenna.png" />
|
||||
|
||||
<video src="https://github.com/OneOfEleven/uv-k5-firmware-custom/assets/51590168/921162a7-e9f2-4023-b4d5-526567f8b989"></video>
|
||||
|
||||
# WARNING if trying to use K5/K6 to TX out of band ..
|
||||
|
BIN
firmware.bin
BIN
firmware.bin
Binary file not shown.
Binary file not shown.
BIN
images/UV_K5_8_antenna.png
Normal file
BIN
images/UV_K5_8_antenna.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.9 MiB |
58
ui/main.c
58
ui/main.c
@ -497,6 +497,23 @@ void big_freq(const uint32_t frequency, const unsigned int x, const unsigned int
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_SINGLE_VFO_CHAN
|
||||
void UI_DisplayMainSingle(void)
|
||||
{
|
||||
int vfo_num = g_eeprom.config.setting.tx_vfo_num;
|
||||
const unsigned int scrn_chan = g_eeprom.config.setting.indices.vfo[vfo_num].screen;
|
||||
uint8_t *p_line = g_frame_buffer[0];
|
||||
unsigned int mode = 0;
|
||||
unsigned int state;
|
||||
char str[22];
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
void UI_DisplayMain(void)
|
||||
{
|
||||
#if !defined(ENABLE_BIG_FREQ) && defined(ENABLE_SMALLEST_FONT)
|
||||
@ -506,6 +523,9 @@ void UI_DisplayMain(void)
|
||||
const unsigned int line1 = 4;
|
||||
int main_vfo_num = g_eeprom.config.setting.tx_vfo_num;
|
||||
int current_vfo_num = g_eeprom.config.setting.tx_vfo_num;
|
||||
#ifdef ENABLE_SINGLE_VFO_CHAN
|
||||
bool single_vfo_chan = false;
|
||||
#endif
|
||||
char str[22];
|
||||
int vfo_num;
|
||||
|
||||
@ -554,9 +574,18 @@ void UI_DisplayMain(void)
|
||||
#ifdef ENABLE_PANADAPTER
|
||||
if (g_eeprom.config.setting.panadapter && g_panadapter_enabled && single_vfo >= 0)
|
||||
pan_enabled = true;
|
||||
#ifndef ENABLE_SINGLE_VFO_CHAN
|
||||
else
|
||||
single_vfo = -1;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_SINGLE_VFO_CHAN
|
||||
single_vfo_chan = (single_vfo >= 0 && pan_enabled) ? true : false;
|
||||
|
||||
if (single_vfo_chan)
|
||||
UI_DisplayMainSingle();
|
||||
#endif
|
||||
|
||||
for (vfo_num = 0; vfo_num < 2; vfo_num++)
|
||||
{
|
||||
@ -658,7 +687,6 @@ void UI_DisplayMain(void)
|
||||
|
||||
if (g_current_function == FUNCTION_TRANSMIT)
|
||||
{ // transmitting
|
||||
|
||||
#ifdef ENABLE_ALARM
|
||||
if (g_alarm_state == ALARM_STATE_ALARM)
|
||||
mode = 1;
|
||||
@ -669,10 +697,11 @@ void UI_DisplayMain(void)
|
||||
if (current_vfo_num == vfo_num)
|
||||
{ // show the TX symbol
|
||||
mode = 1;
|
||||
const int x = 14;
|
||||
#ifdef ENABLE_SMALL_BOLD
|
||||
UI_PrintStringSmallBold("TX", 14, 0, line);
|
||||
UI_PrintStringSmallBold("TX", x, 0, line);
|
||||
#else
|
||||
UI_PrintStringSmall("TX", 14, 0, line);
|
||||
UI_PrintStringSmall("TX", x, 0, line);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@ -682,10 +711,11 @@ void UI_DisplayMain(void)
|
||||
mode = 2;
|
||||
if ((g_current_function == FUNCTION_RECEIVE && g_squelch_open) && g_rx_vfo_num == vfo_num)
|
||||
{
|
||||
const int x = 14;
|
||||
#ifdef ENABLE_SMALL_BOLD
|
||||
UI_PrintStringSmallBold("RX", 14, 0, line);
|
||||
UI_PrintStringSmallBold("RX", x, 0, line);
|
||||
#else
|
||||
UI_PrintStringSmall("RX", 14, 0, line);
|
||||
UI_PrintStringSmall("RX", x, 0, line);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@ -712,6 +742,7 @@ void UI_DisplayMain(void)
|
||||
#ifdef ENABLE_NOAA
|
||||
else
|
||||
{
|
||||
const int x = 7;
|
||||
if (g_input_box_index == 0 || g_eeprom.config.setting.tx_vfo_num != vfo_num)
|
||||
{ // channel number
|
||||
sprintf(str, "N%u", 1 + scrn_chan - NOAA_CHANNEL_FIRST);
|
||||
@ -720,7 +751,7 @@ void UI_DisplayMain(void)
|
||||
{ // user entering channel number
|
||||
sprintf(str, "N%u%u", '0' + g_input_box[0], '0' + g_input_box[1]);
|
||||
}
|
||||
UI_PrintStringSmall(str, 7, 0, line + 1);
|
||||
UI_PrintStringSmall(str, x, 0, line + 1);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -737,24 +768,25 @@ void UI_DisplayMain(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
{
|
||||
const unsigned int x = 32;
|
||||
|
||||
if (state != VFO_STATE_NORMAL)
|
||||
{
|
||||
const char *state_list[] = {"", "BUSY", "BAT LOW", "TX DISABLE", "TIMEOUT", "ALARM", "VOLT HIGH"};
|
||||
if (state < ARRAY_SIZE(state_list))
|
||||
UI_PrintString(state_list[state], 31, 0, line, 8);
|
||||
UI_PrintString(state_list[state], x - 1, 0, line, 8);
|
||||
}
|
||||
else
|
||||
if (g_input_box_index > 0 && IS_FREQ_CHANNEL(scrn_chan) && g_eeprom.config.setting.tx_vfo_num == vfo_num)
|
||||
{ // user is entering a frequency
|
||||
// UI_DisplayFrequencyBig(g_input_box, 32, line, true, false, 6);
|
||||
// UI_DisplayFrequencyBig(g_input_box, 32, line, true, false, 7);
|
||||
UI_DisplayFrequency(g_input_box, 32, line, true, 8);
|
||||
// UI_DisplayFrequencyBig(g_input_box, x, line, true, false, 6);
|
||||
// UI_DisplayFrequencyBig(g_input_box, x, line, true, false, 7);
|
||||
UI_DisplayFrequency(g_input_box, x, line, true, 8);
|
||||
// g_center_line = CENTER_LINE_IN_USE;
|
||||
}
|
||||
else
|
||||
{
|
||||
const unsigned int x = 32;
|
||||
|
||||
uint32_t frequency = g_vfo_info[vfo_num].p_rx->frequency;
|
||||
|
||||
if (g_current_function == FUNCTION_TRANSMIT)
|
||||
@ -797,7 +829,6 @@ void UI_DisplayMain(void)
|
||||
SETTINGS_fetch_channel_name(str, scrn_chan);
|
||||
if (str[0] == 0)
|
||||
{ // no channel name, use channel number
|
||||
// sprintf(str, "CH-%03u", 1 + scrn_chan);
|
||||
sprintf(str, "CH-%u", 1 + scrn_chan);
|
||||
}
|
||||
|
||||
@ -949,6 +980,7 @@ void UI_DisplayMain(void)
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
// ************
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user