mirror of
https://github.com/OneOfEleven/uv-k5-firmware-custom.git
synced 2025-04-28 06:11:24 +03:00
frequency scan ignore list update
This commit is contained in:
parent
13dfd039bd
commit
c502345b33
@ -251,7 +251,7 @@ void ACTION_Scan(bool bRestart)
|
||||
// start scanning
|
||||
|
||||
#ifdef ENABLE_SCAN_IGNORE_LIST
|
||||
FI_clear_freq_ignored();
|
||||
// FI_clear_freq_ignored();
|
||||
#endif
|
||||
|
||||
g_monitor_enabled = false;
|
||||
|
@ -24,17 +24,17 @@ uint16_t g_backlight_tick_500ms = 0;
|
||||
|
||||
uint16_t backlight_ticks(void)
|
||||
{
|
||||
uint16_t ticks = 0;
|
||||
switch (g_eeprom.config.setting.backlight_time)
|
||||
{
|
||||
case 1: return 2 * 5; // 5 sec
|
||||
case 2: return 2 * 10; // 10 sec
|
||||
case 3: return 2 * 20; // 20 sec
|
||||
case 4: return 2 * 60; // 1 min
|
||||
case 5: return 2 * 60 * 2; // 2 min
|
||||
case 6: return 2 * 60 * 4; // 4 min
|
||||
default:
|
||||
case 7: return 0; // always on
|
||||
case 1: ticks = 5; break; // 5 sec
|
||||
case 2: ticks = 10; break; // 10 sec
|
||||
case 3: ticks = 20; break; // 20 sec
|
||||
case 4: ticks = 60; break; // 1 min
|
||||
case 5: ticks = 60 * 2; break; // 2 min
|
||||
case 6: ticks = 60 * 4; break; // 4 min
|
||||
}
|
||||
return ticks * 2;
|
||||
}
|
||||
|
||||
void backlight_turn_on(const uint16_t min_ticks)
|
||||
|
BIN
firmware.bin
Normal file
BIN
firmware.bin
Normal file
Binary file not shown.
BIN
firmware.packed.bin
Normal file
BIN
firmware.packed.bin
Normal file
Binary file not shown.
10
main.c
10
main.c
@ -83,6 +83,10 @@ void MAIN_DisplayPowerOn(void)
|
||||
memset(str1, 0, sizeof(str1));
|
||||
memset(str2, 0, sizeof(str2));
|
||||
|
||||
// fetch backlight time
|
||||
EEPROM_ReadBuffer(0x0E78, ((uint8_t *)&g_eeprom) + 0x0E78, 16);
|
||||
|
||||
// fetch power-on mode
|
||||
EEPROM_ReadBuffer(0x0E90, ((uint8_t *)&g_eeprom) + 0x0E90, 16);
|
||||
|
||||
switch (g_eeprom.config.setting.power_on_display_mode)
|
||||
@ -142,7 +146,7 @@ void MAIN_DisplayPowerOn(void)
|
||||
}
|
||||
|
||||
if (g_eeprom.config.setting.power_on_display_mode != PWR_ON_DISPLAY_MODE_NONE)
|
||||
GPIO_SetBit(&GPIOB->DATA, GPIOB_PIN_BACKLIGHT); // backlight on
|
||||
backlight_turn_on(0); // turn the back light on
|
||||
}
|
||||
|
||||
void Main(void)
|
||||
@ -267,9 +271,9 @@ void Main(void)
|
||||
FUNCTION_Select(FUNCTION_POWER_SAVE);
|
||||
|
||||
if (g_eeprom.config.setting.backlight_time < (ARRAY_SIZE(g_sub_menu_backlight) - 1))
|
||||
GPIO_ClearBit(&GPIOB->DATA, GPIOB_PIN_BACKLIGHT); // turn the backlight OFF
|
||||
GPIO_ClearBit(&GPIOB->DATA, GPIOB_PIN_BACKLIGHT); // turn the backlight OFF
|
||||
else
|
||||
GPIO_SetBit(&GPIOB->DATA, GPIOB_PIN_BACKLIGHT); // turn the backlight ON
|
||||
backlight_turn_on(0); // turn the backlight ON
|
||||
|
||||
g_reduced_service = true;
|
||||
}
|
||||
|
@ -286,6 +286,8 @@ typedef struct {
|
||||
uint8_t vox_enabled; //
|
||||
uint8_t vox_level; //
|
||||
uint8_t mic_sensitivity; //
|
||||
|
||||
// 0x0E78
|
||||
#ifdef ENABLE_CONTRAST
|
||||
uint8_t lcd_contrast; // 1of11
|
||||
#else
|
||||
|
34
ui/main.c
34
ui/main.c
@ -26,6 +26,9 @@
|
||||
#include "external/printf/printf.h"
|
||||
#include "font.h"
|
||||
#include "functions.h"
|
||||
#ifdef ENABLE_SCAN_IGNORE_LIST
|
||||
#include "freq_ignore.h"
|
||||
#endif
|
||||
#include "helper/battery.h"
|
||||
#ifdef ENABLE_MDC1200
|
||||
#include "mdc1200.h"
|
||||
@ -765,26 +768,31 @@ void UI_DisplayMain(void)
|
||||
const uint8_t freq_in_channel = g_vfo_info[vfo_num].freq_in_channel;
|
||||
// const uint8_t freq_in_channel = SETTINGS_find_channel(frequency); // currently way to slow
|
||||
|
||||
if (g_vfo_info[vfo_num].channel.compand)
|
||||
// if (g_vfo_info[vfo_num].channel.compand)
|
||||
{
|
||||
strcpy(str, " ");
|
||||
strcpy(str, " ");
|
||||
|
||||
#ifdef ENABLE_SCAN_IGNORE_LIST
|
||||
if (FI_freq_ignored(frequency) >= 0)
|
||||
str[0] = 'I'; // frequency is in the ignore list
|
||||
#endif
|
||||
|
||||
if (is_freq_chan && freq_in_channel <= USER_CHANNEL_LAST)
|
||||
str[0] = 'F'; // channel number that contains this VFO frequency
|
||||
str[1] = 'F'; // channel number that contains this VFO frequency
|
||||
|
||||
if (g_vfo_info[vfo_num].channel.compand)
|
||||
str[1] = 'C'; // compander is enabled
|
||||
str[2] = 'C'; // compander is enabled
|
||||
|
||||
UI_PrintStringSmall(str, LCD_WIDTH - (7 * 2), 0, line + 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (is_freq_chan && freq_in_channel <= USER_CHANNEL_LAST)
|
||||
{ // channel number that contains this VFO frequency
|
||||
sprintf(str, "%03u", freq_in_channel);
|
||||
UI_PrintStringSmall(str, LCD_WIDTH - (7 * 3), 0, line + 1);
|
||||
}
|
||||
UI_PrintStringSmall(str, LCD_WIDTH - (7 * 3), 0, line + 1);
|
||||
}
|
||||
// else
|
||||
// {
|
||||
// if (is_freq_chan && freq_in_channel <= USER_CHANNEL_LAST)
|
||||
// { // channel number that contains this VFO frequency
|
||||
// sprintf(str, "%03u", freq_in_channel);
|
||||
// UI_PrintStringSmall(str, LCD_WIDTH - (7 * 3), 0, line + 1);
|
||||
// }
|
||||
// }
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user