0
mirror of https://github.com/OneOfEleven/uv-k5-firmware-custom.git synced 2025-06-18 22:29:50 +03:00

Lots n lots

This commit is contained in:
OneOfEleven
2023-10-29 22:33:38 +00:00
parent 230fdccf10
commit f3e347bc5a
39 changed files with 951 additions and 770 deletions

View File

@ -121,11 +121,11 @@ void UI_DisplayFM(void)
{ // frequency mode
const uint32_t freq = g_eeprom.fm_frequency_playing;
NUMBER_ToDigits(freq * 10000, str);
#ifdef ENABLE_TRIM_TRAILING_ZEROS
UI_DisplayFrequency(str, 30, 4, false, true);
#else
UI_DisplayFrequency(str, 23, 4, false, true);
#endif
#ifdef ENABLE_TRIM_TRAILING_ZEROS
UI_DisplayFrequency(str, 30, 4, false, true);
#else
UI_DisplayFrequency(str, 23, 4, false, true);
#endif
}
else
{ // user is entering a frequency
@ -143,6 +143,8 @@ void UI_DisplayFM(void)
// *************************************
// can't do this during FM radio - audio clicks else
if (g_fm_scan_state != FM_SCAN_OFF)
{
const uint16_t val_07 = BK1080_ReadRegister(0x07);
const uint16_t val_0A = BK1080_ReadRegister(0x0A);
@ -153,7 +155,7 @@ void UI_DisplayFM(void)
(val_07 >> 0) & 0x000f);
UI_PrintStringSmall(str, 0, LCD_WIDTH, 6);
}
// *************************************
ST7565_BlitFullScreen();

View File

@ -136,12 +136,8 @@ void UI_PrintStringSmall(const char *str, const unsigned int start, const unsign
UI_print_string(str, start, end, line, (const uint8_t *)g_font_small_bold, ARRAY_SIZE(g_font_small_bold), ARRAY_SIZE(g_font_small_bold[0]));
}
#endif
/*
void UI_PrintStringSmall4x5(const char *str, const unsigned int start, const unsigned int end, const unsigned int line)
{
UI_print_string(str, start, end, line, (const uint8_t *)g_font_small_4x5, ARRAY_SIZE(g_font_small_4x5), ARRAY_SIZE(g_font_small_4x5[0]));
}
*/
#ifdef ENABLE_SMALLEST_FONT
void PutPixel(const unsigned int x, const unsigned int y, const bool fill)
{
@ -193,6 +189,8 @@ void UI_PrintStringSmallest(const void *pString, unsigned int x, const unsigned
}
}
#endif
void UI_PrintStringSmallBuffer(const char *pString, uint8_t *buffer)
{
const unsigned int char_width = ARRAY_SIZE(g_font_small[0]);

View File

@ -27,8 +27,9 @@ void UI_PrintStringSmall(const char *str, const unsigned int start, const unsign
#ifdef ENABLE_SMALL_BOLD
void UI_PrintStringSmallBold(const char *str, const unsigned int start, const unsigned int end, const unsigned int line);
#endif
//void UI_PrintStringSmall4x5(const char *str, const unsigned int start, const unsigned int end, const unsigned int line);
void UI_PrintStringSmallest(const void *pString, unsigned int x, const unsigned int y, const bool statusbar, const bool fill);
#ifdef ENABLE_SMALLEST_FONT
void UI_PrintStringSmallest(const void *pString, unsigned int x, const unsigned int y, const bool statusbar, const bool fill);
#endif
void UI_PrintStringSmallBuffer(const char *pString, uint8_t *buffer);
void UI_DisplayFrequency(const char *pDigits, uint8_t X, uint8_t Y, bool bDisplayLeadingZero, bool flag);
void UI_DisplayFrequencySmall(const char *pDigits, uint8_t X, uint8_t Y, bool bDisplayLeadingZero);

View File

@ -302,7 +302,7 @@ void UI_update_rssi(const int16_t rssi, const int vfo)
#ifdef ENABLE_RX_SIGNAL_BAR
if (g_center_line == CENTER_LINE_RSSI)
{ // optional larger RSSI dBm, S-point and bar level
if (g_current_function == FUNCTION_RECEIVE || g_current_function == FUNCTION_MONITOR)
if (g_current_function == FUNCTION_RECEIVE)
{
UI_DisplayRSSIBar(rssi, true);
}
@ -355,9 +355,7 @@ void UI_update_rssi(const int16_t rssi, const int vfo)
if (rssi >= level01)
rssi_level = 2;
else
if (rssi >= level0 ||
g_current_function == FUNCTION_MONITOR ||
g_current_function == FUNCTION_NEW_RECEIVE)
if (rssi >= level0 || g_current_function == FUNCTION_NEW_RECEIVE)
{
rssi_level = 1;
}
@ -422,7 +420,7 @@ void big_freq(const uint32_t frequency, const unsigned int x, const unsigned int
void UI_DisplayMain(void)
{
#ifndef ENABLE_BIG_FREQ
#if !defined(ENABLE_BIG_FREQ) && defined(ENABLE_SMALLEST_FONT)
const unsigned int smallest_char_spacing = ARRAY_SIZE(g_font3x5[0]) + 1;
#endif
const unsigned int line0 = 0; // text screen line
@ -589,9 +587,7 @@ void UI_DisplayMain(void)
else
{ // receiving .. show the RX symbol
mode = 2;
if ((g_current_function == FUNCTION_RECEIVE ||
g_current_function == FUNCTION_MONITOR ||
g_current_function == FUNCTION_NEW_RECEIVE) &&
if ((g_current_function == FUNCTION_RECEIVE || g_current_function == FUNCTION_NEW_RECEIVE) &&
g_eeprom.rx_vfo == vfo_num)
{
#ifdef ENABLE_SMALL_BOLD
@ -776,7 +772,7 @@ void UI_DisplayMain(void)
// no room for these symbols
#else
#elif defined(ENABLE_SMALLEST_FONT)
{
unsigned int x = LCD_WIDTH + LCD_WIDTH - 1 - (smallest_char_spacing * 1) - (smallest_char_spacing * 4);
@ -795,6 +791,24 @@ void UI_DisplayMain(void)
UI_PrintStringSmallest("C", x, (line + 0) * 8, false, true);
//x += smallest_char_spacing * 1;
}
#else
{
strcpy(str, " ");
if (IS_FREQ_CHANNEL(g_eeprom.screen_channel[vfo_num]))
{
//g_eeprom.vfo_info[vfo_num].freq_in_channel = BOARD_find_channel(frequency);
if (g_eeprom.vfo_info[vfo_num].freq_in_channel <= USER_CHANNEL_LAST)
{ // the channel number that contains this VFO frequency
str[0] = 'F';
}
}
if (g_eeprom.vfo_info[vfo_num].compand)
str[1] = 'C';
UI_PrintStringSmall(str, LCD_WIDTH - 1 - (6 * 2), 0, line + 1);
}
#endif
}
@ -903,9 +917,7 @@ void UI_DisplayMain(void)
g_dtmf_call_state == DTMF_CALL_STATE_NONE)
{ // we're free to use the middle line
const bool rx = (g_current_function == FUNCTION_RECEIVE ||
g_current_function == FUNCTION_MONITOR ||
g_current_function == FUNCTION_NEW_RECEIVE);
const bool rx = (g_current_function == FUNCTION_RECEIVE);
#ifdef ENABLE_TX_TIMEOUT_BAR
// show the TX timeout count down

View File

@ -54,8 +54,8 @@ void UI_DisplayStatus(const bool test_display)
}
else
if (g_current_function == FUNCTION_RECEIVE ||
g_current_function == FUNCTION_MONITOR ||
g_current_function == FUNCTION_NEW_RECEIVE)
g_current_function == FUNCTION_NEW_RECEIVE ||
g_monitor_enabled)
{
memcpy(line + x, BITMAP_RX, sizeof(BITMAP_RX));
x1 = x + sizeof(BITMAP_RX);
@ -140,7 +140,7 @@ void UI_DisplayStatus(const bool test_display)
// DUAL-WATCH indicator
if (g_eeprom.dual_watch != DUAL_WATCH_OFF || test_display)
{
if (g_dual_watch_delay_10ms > dual_watch_delay_toggle_10ms ||
if (g_dual_watch_tick_10ms > dual_watch_delay_toggle_10ms ||
g_dtmf_call_state != DTMF_CALL_STATE_NONE ||
g_scan_state_dir != SCAN_STATE_DIR_OFF ||
g_css_scan_mode != CSS_SCAN_MODE_OFF ||
@ -157,7 +157,8 @@ void UI_DisplayStatus(const bool test_display)
}
x += sizeof(BITMAP_TDR_RUNNING);
if (g_current_function == FUNCTION_MONITOR)
// monitor
if (g_monitor_enabled)
{
memcpy(line + x, BITMAP_MONITOR, sizeof(BITMAP_MONITOR));
x1 = x + sizeof(BITMAP_MONITOR);

View File

@ -91,6 +91,7 @@ void GUI_SelectNextDisplay(gui_display_type_t Display)
g_scan_state_dir = SCAN_STATE_DIR_OFF;
#ifdef ENABLE_FMRADIO
g_fm_scan_state = FM_SCAN_OFF;
g_update_display = true;
#endif
g_ask_for_confirmation = 0;
g_ask_to_save = false;