mirror of
https://github.com/OneOfEleven/uv-k5-firmware-custom.git
synced 2025-06-20 06:58:39 +03:00
FM radio tidy up
This commit is contained in:
8
app/fm.c
8
app/fm.c
@ -192,8 +192,6 @@ int FM_CheckFrequencyLock(uint16_t Frequency, uint16_t LowerLimit)
|
||||
//if (Deviation > -281 && Deviation < 280)
|
||||
if (Deviation < 280 || Deviation > 3815)
|
||||
{
|
||||
// not BLE(less than or equal)
|
||||
|
||||
if (Frequency > LowerLimit && (Frequency - BK1080_BaseFrequency) == 1)
|
||||
{
|
||||
if (BK1080_FrequencyDeviation & 0x800)
|
||||
@ -203,8 +201,6 @@ int FM_CheckFrequencyLock(uint16_t Frequency, uint16_t LowerLimit)
|
||||
goto Bail;
|
||||
}
|
||||
|
||||
// not BLT(less than)
|
||||
|
||||
if (Frequency >= LowerLimit && (BK1080_BaseFrequency - Frequency) == 1)
|
||||
{
|
||||
if ((BK1080_FrequencyDeviation & 0x800) == 0)
|
||||
@ -285,9 +281,11 @@ static void FM_Key_DIGITS(key_code_t Key, bool key_pressed, bool key_held)
|
||||
uint32_t Frequency;
|
||||
|
||||
g_input_box_index = 0;
|
||||
|
||||
NUMBER_Get(g_input_box, &Frequency);
|
||||
|
||||
Frequency /= 10000;
|
||||
|
||||
|
||||
if (Frequency < g_eeprom.fm_lower_limit || g_eeprom.fm_upper_limit < Frequency)
|
||||
{
|
||||
g_request_display_screen = DISPLAY_FM;
|
||||
|
Reference in New Issue
Block a user