0
mirror of https://github.com/OneOfEleven/uv-k5-firmware-custom.git synced 2025-06-20 06:58:39 +03:00

Fix big freq digits moving 1 pixel to the right + added chan name edit menu

This commit is contained in:
OneOfEleven
2023-09-20 08:29:11 +01:00
parent 0b676d29e3
commit af9b0d6cb7
23 changed files with 619 additions and 399 deletions

View File

@ -59,7 +59,11 @@ uint8_t FM_FindNextChannel(uint8_t Channel, uint8_t Direction)
for (i = 0; i < ARRAY_SIZE(gFM_Channels); i++)
{
Channel %= ARRAY_SIZE(gFM_Channels);
if (Channel == 0xFF)
Channel = ARRAY_SIZE(gFM_Channels) - 1;
else
if (Channel >= ARRAY_SIZE(gFM_Channels))
Channel = 0;
if (FM_CheckValidChannel(Channel))
return Channel;
Channel += Direction;
@ -182,7 +186,7 @@ int FM_CheckFrequencyLock(uint16_t Frequency, uint16_t LowerLimit)
const uint16_t Status = BK1080_ReadRegister(BK1080_REG_10);
if ((Status & BK1080_REG_10_MASK_AFCRL) == BK1080_REG_10_AFCRL_NOT_RAILED && BK1080_REG_10_GET_RSSI(Status) >= 10)
{
// if (Deviation > -281 && Deviation < 280)
//if (Deviation > -281 && Deviation < 280)
if (Deviation < 280 || Deviation > 3815)
{
// not BLE(less than or equal)