mirror of
https://github.com/OneOfEleven/uv-k5-firmware-custom.git
synced 2025-05-10 04:01:26 +03:00
Rename AF constant
This commit is contained in:
parent
9d990f7e67
commit
5f2e069437
6
Makefile
6
Makefile
@ -12,17 +12,17 @@ ENABLE_FMRADIO := 0
|
|||||||
ENABLE_NOAA := 0
|
ENABLE_NOAA := 0
|
||||||
ENABLE_VOICE := 0
|
ENABLE_VOICE := 0
|
||||||
ENABLE_ALARM := 0
|
ENABLE_ALARM := 0
|
||||||
ENABLE_TX1750 := 1
|
ENABLE_TX1750 := 0
|
||||||
ENABLE_BIG_FREQ := 0
|
ENABLE_BIG_FREQ := 0
|
||||||
ENABLE_SMALL_BOLD := 1
|
ENABLE_SMALL_BOLD := 1
|
||||||
ENABLE_KEEP_MEM_NAME := 1
|
ENABLE_KEEP_MEM_NAME := 1
|
||||||
ENABLE_WIDE_RX := 1
|
ENABLE_WIDE_RX := 1
|
||||||
ENABLE_TX_WHEN_AM := 0
|
ENABLE_TX_WHEN_AM := 0
|
||||||
ENABLE_F_CAL_MENU := 0
|
ENABLE_F_CAL_MENU := 1
|
||||||
ENABLE_CTCSS_TAIL_PHASE_SHIFT := 1
|
ENABLE_CTCSS_TAIL_PHASE_SHIFT := 1
|
||||||
ENABLE_MAIN_KEY_HOLD := 1
|
ENABLE_MAIN_KEY_HOLD := 1
|
||||||
ENABLE_BOOT_BEEPS := 0
|
ENABLE_BOOT_BEEPS := 0
|
||||||
ENABLE_COMPANDER := 0
|
ENABLE_COMPANDER := 1
|
||||||
ENABLE_SHOW_CHARGE_LEVEL := 1
|
ENABLE_SHOW_CHARGE_LEVEL := 1
|
||||||
ENABLE_REVERSE_BAT_SYMBOL := 1
|
ENABLE_REVERSE_BAT_SYMBOL := 1
|
||||||
ENABLE_CODE_SCAN_TIMEOUT := 0
|
ENABLE_CODE_SCAN_TIMEOUT := 0
|
||||||
|
52
app/app.c
52
app/app.c
@ -544,7 +544,7 @@ void APP_StartListening(FUNCTION_Type_t Function, const bool reset_am_fix)
|
|||||||
}
|
}
|
||||||
|
|
||||||
{ // RF RX front end gain
|
{ // RF RX front end gain
|
||||||
|
|
||||||
// original setting
|
// original setting
|
||||||
uint16_t lna_short = orig_lna_short;
|
uint16_t lna_short = orig_lna_short;
|
||||||
uint16_t lna = orig_lna;
|
uint16_t lna = orig_lna;
|
||||||
@ -577,7 +577,7 @@ void APP_StartListening(FUNCTION_Type_t Function, const bool reset_am_fix)
|
|||||||
#ifdef ENABLE_VOICE
|
#ifdef ENABLE_VOICE
|
||||||
if (gVoiceWriteIndex == 0) // AM/FM RX mode will be set when the voice has finished
|
if (gVoiceWriteIndex == 0) // AM/FM RX mode will be set when the voice has finished
|
||||||
#endif
|
#endif
|
||||||
BK4819_SetAF(gRxVfo->AM_mode ? BK4819_AF_AM : BK4819_AF_OPEN); // no need, set it now
|
BK4819_SetAF(gRxVfo->AM_mode ? BK4819_AF_AM : BK4819_AF_FM); // no need, set it now
|
||||||
|
|
||||||
FUNCTION_Select(Function);
|
FUNCTION_Select(Function);
|
||||||
|
|
||||||
@ -2057,17 +2057,6 @@ static void APP_ProcessKey(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
|||||||
if (gEeprom.AUTO_KEYPAD_LOCK)
|
if (gEeprom.AUTO_KEYPAD_LOCK)
|
||||||
gKeyLockCountdown = 30; // 15 seconds
|
gKeyLockCountdown = 30; // 15 seconds
|
||||||
|
|
||||||
if (Key == KEY_EXIT && bKeyPressed && bKeyHeld && gDTMF_RX_live[0] != 0)
|
|
||||||
{ // clear the live DTMF decoder if the EXIT key is held
|
|
||||||
if (gDTMF_RX_live[0] != 0)
|
|
||||||
{
|
|
||||||
gDTMF_RX_live_timeout = 0;
|
|
||||||
memset(gDTMF_RX_live, 0, sizeof(gDTMF_RX_live));
|
|
||||||
|
|
||||||
gUpdateDisplay = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!bKeyPressed)
|
if (!bKeyPressed)
|
||||||
{
|
{
|
||||||
if (gFlagSaveVfo)
|
if (gFlagSaveVfo)
|
||||||
@ -2103,11 +2092,23 @@ static void APP_ProcessKey(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
BACKLIGHT_TurnOn();
|
||||||
|
|
||||||
|
if (Key == KEY_EXIT && bKeyHeld)
|
||||||
|
{ // exit key held pressed
|
||||||
|
|
||||||
|
// clear the live DTMF decoder
|
||||||
|
if (gDTMF_RX_live[0] != 0)
|
||||||
|
{
|
||||||
|
memset(gDTMF_RX_live, 0, sizeof(gDTMF_RX_live));
|
||||||
|
gDTMF_RX_live_timeout = 0;
|
||||||
|
gUpdateDisplay = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (gScreenToDisplay == DISPLAY_MENU) // 1of11
|
if (gScreenToDisplay == DISPLAY_MENU) // 1of11
|
||||||
gMenuCountdown = menu_timeout_500ms;
|
gMenuCountdown = menu_timeout_500ms;
|
||||||
|
|
||||||
BACKLIGHT_TurnOn();
|
|
||||||
|
|
||||||
if (gDTMF_DecodeRingCountdown_500ms > 0)
|
if (gDTMF_DecodeRingCountdown_500ms > 0)
|
||||||
{ // cancel the ringing
|
{ // cancel the ringing
|
||||||
gDTMF_DecodeRingCountdown_500ms = 0;
|
gDTMF_DecodeRingCountdown_500ms = 0;
|
||||||
@ -2164,24 +2165,27 @@ static void APP_ProcessKey(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
|||||||
Key != KEY_MENU)
|
Key != KEY_MENU)
|
||||||
{
|
{
|
||||||
if (gScanState != SCAN_OFF || gCssScanMode != CSS_SCAN_MODE_OFF)
|
if (gScanState != SCAN_OFF || gCssScanMode != CSS_SCAN_MODE_OFF)
|
||||||
{ // frequency or CTCSS/DCS scanning
|
{ // FREQ/CTCSS/DCS scanning
|
||||||
if (bKeyPressed && !bKeyHeld)
|
if (bKeyPressed && !bKeyHeld)
|
||||||
AUDIO_PlayBeep(BEEP_500HZ_60MS_DOUBLE_BEEP_OPTIONAL);
|
AUDIO_PlayBeep(BEEP_500HZ_60MS_DOUBLE_BEEP_OPTIONAL);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gPttWasPressed && Key == KEY_PTT)
|
if (Key == KEY_PTT)
|
||||||
{
|
{
|
||||||
bFlag = bKeyHeld;
|
if (gPttWasPressed)
|
||||||
if (!bKeyPressed)
|
|
||||||
{
|
{
|
||||||
bFlag = true;
|
bFlag = bKeyHeld;
|
||||||
gPttWasPressed = false;
|
if (!bKeyPressed)
|
||||||
|
{
|
||||||
|
bFlag = true;
|
||||||
|
gPttWasPressed = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
if (gPttWasReleased && Key != KEY_PTT)
|
if (gPttWasReleased)
|
||||||
{
|
{
|
||||||
if (bKeyHeld)
|
if (bKeyHeld)
|
||||||
bFlag = true;
|
bFlag = true;
|
||||||
@ -2268,7 +2272,7 @@ static void APP_ProcessKey(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
|||||||
ALARM_Off();
|
ALARM_Off();
|
||||||
|
|
||||||
// TODO: fix side key 1750, you have to press it twice to restart the tone :(
|
// TODO: fix side key 1750, you have to press it twice to restart the tone :(
|
||||||
|
|
||||||
if (gEeprom.REPEATER_TAIL_TONE_ELIMINATION == 0)
|
if (gEeprom.REPEATER_TAIL_TONE_ELIMINATION == 0)
|
||||||
{
|
{
|
||||||
//if (gCurrentFunction != FUNCTION_FOREGROUND)
|
//if (gCurrentFunction != FUNCTION_FOREGROUND)
|
||||||
|
47
app/menu.c
47
app/menu.c
@ -47,26 +47,33 @@
|
|||||||
#define ARRAY_SIZE(x) (sizeof(x) / sizeof(x[0]))
|
#define ARRAY_SIZE(x) (sizeof(x) / sizeof(x[0]))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void writeXtalFreqCal(const int32_t value)
|
#ifdef ENABLE_F_CAL_MENU
|
||||||
{
|
void writeXtalFreqCal(const int32_t value, const bool update_eeprom)
|
||||||
struct
|
|
||||||
{
|
{
|
||||||
int16_t BK4819_XtalFreqLow;
|
BK4819_WriteRegister(BK4819_REG_3B, 22656 + value);
|
||||||
uint16_t EEPROM_1F8A;
|
|
||||||
uint16_t EEPROM_1F8C;
|
if (update_eeprom)
|
||||||
uint8_t VOLUME_GAIN;
|
{
|
||||||
uint8_t DAC_GAIN;
|
struct
|
||||||
} __attribute__((packed)) Misc;
|
{
|
||||||
|
int16_t BK4819_XtalFreqLow;
|
||||||
gEeprom.BK4819_XTAL_FREQ_LOW = value;
|
uint16_t EEPROM_1F8A;
|
||||||
BK4819_WriteRegister(BK4819_REG_3B, 22656 + gEeprom.BK4819_XTAL_FREQ_LOW);
|
uint16_t EEPROM_1F8C;
|
||||||
|
uint8_t VOLUME_GAIN;
|
||||||
// radio 1 .. 04 00 46 00 50 00 2C 0E
|
uint8_t DAC_GAIN;
|
||||||
// radio 2 .. 05 00 46 00 50 00 2C 0E
|
} __attribute__((packed)) misc;
|
||||||
EEPROM_ReadBuffer(0x1F88, &Misc, 8);
|
|
||||||
Misc.BK4819_XtalFreqLow = gEeprom.BK4819_XTAL_FREQ_LOW;
|
gEeprom.BK4819_XTAL_FREQ_LOW = value;
|
||||||
EEPROM_WriteBuffer(0x1F88, &Misc);
|
|
||||||
}
|
// radio 1 .. 04 00 46 00 50 00 2C 0E
|
||||||
|
// radio 2 .. 05 00 46 00 50 00 2C 0E
|
||||||
|
//
|
||||||
|
EEPROM_ReadBuffer(0x1F88, &misc, 8);
|
||||||
|
misc.BK4819_XtalFreqLow = value;
|
||||||
|
EEPROM_WriteBuffer(0x1F88, &misc);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void MENU_StartCssScan(int8_t Direction)
|
void MENU_StartCssScan(int8_t Direction)
|
||||||
{
|
{
|
||||||
@ -746,7 +753,7 @@ void MENU_AcceptSetting(void)
|
|||||||
|
|
||||||
#ifdef ENABLE_F_CAL_MENU
|
#ifdef ENABLE_F_CAL_MENU
|
||||||
case MENU_F_CALI:
|
case MENU_F_CALI:
|
||||||
writeXtalFreqCal(gSubMenuSelection);
|
writeXtalFreqCal(gSubMenuSelection, true);
|
||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -19,6 +19,10 @@
|
|||||||
|
|
||||||
#include "driver/keyboard.h"
|
#include "driver/keyboard.h"
|
||||||
|
|
||||||
|
#ifdef ENABLE_F_CAL_MENU
|
||||||
|
void writeXtalFreqCal(const int32_t value, const bool update_eeprom);
|
||||||
|
#endif
|
||||||
|
|
||||||
int MENU_GetLimits(uint8_t Cursor, int32_t *pMin, int32_t *pMax);
|
int MENU_GetLimits(uint8_t Cursor, int32_t *pMin, int32_t *pMax);
|
||||||
void MENU_AcceptSetting(void);
|
void MENU_AcceptSetting(void);
|
||||||
void MENU_SelectNextCode(void);
|
void MENU_SelectNextCode(void);
|
||||||
|
4
audio.c
4
audio.c
@ -283,7 +283,7 @@ void AUDIO_PlayBeep(BEEP_Type_t Beep)
|
|||||||
if (gCurrentFunction == FUNCTION_RECEIVE ||
|
if (gCurrentFunction == FUNCTION_RECEIVE ||
|
||||||
gCurrentFunction == FUNCTION_MONITOR ||
|
gCurrentFunction == FUNCTION_MONITOR ||
|
||||||
gCurrentFunction == FUNCTION_INCOMING) // 1of11
|
gCurrentFunction == FUNCTION_INCOMING) // 1of11
|
||||||
BK4819_SetAF(gRxVfo->AM_mode ? BK4819_AF_AM : BK4819_AF_OPEN);
|
BK4819_SetAF(gRxVfo->AM_mode ? BK4819_AF_AM : BK4819_AF_FM);
|
||||||
|
|
||||||
#ifdef ENABLE_FMRADIO
|
#ifdef ENABLE_FMRADIO
|
||||||
if (gFmRadioMode)
|
if (gFmRadioMode)
|
||||||
@ -417,7 +417,7 @@ void AUDIO_PlayBeep(BEEP_Type_t Beep)
|
|||||||
if (gCurrentFunction == FUNCTION_RECEIVE ||
|
if (gCurrentFunction == FUNCTION_RECEIVE ||
|
||||||
gCurrentFunction == FUNCTION_MONITOR ||
|
gCurrentFunction == FUNCTION_MONITOR ||
|
||||||
gCurrentFunction == FUNCTION_INCOMING) // 1of11
|
gCurrentFunction == FUNCTION_INCOMING) // 1of11
|
||||||
BK4819_SetAF(gRxVfo->AM_mode ? BK4819_AF_AM : BK4819_AF_OPEN);
|
BK4819_SetAF(gRxVfo->AM_mode ? BK4819_AF_AM : BK4819_AF_FM);
|
||||||
|
|
||||||
#ifdef ENABLE_FMRADIO
|
#ifdef ENABLE_FMRADIO
|
||||||
if (gFmRadioMode)
|
if (gFmRadioMode)
|
||||||
|
@ -839,9 +839,6 @@ void BK4819_SetCompander(const unsigned int mode)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// enable
|
|
||||||
BK4819_WriteRegister(BK4819_REG_31, r31 | (1u < 3));
|
|
||||||
|
|
||||||
// set the compressor ratio
|
// set the compressor ratio
|
||||||
//
|
//
|
||||||
// REG_29 <15:14> 10 Compress (AF Tx) Ratio
|
// REG_29 <15:14> 10 Compress (AF Tx) Ratio
|
||||||
@ -883,6 +880,9 @@ void BK4819_SetCompander(const unsigned int mode)
|
|||||||
(expand_ratio < 14)
|
(expand_ratio < 14)
|
||||||
| (expand_0dB < 7)
|
| (expand_0dB < 7)
|
||||||
| (expand_noise_dB < 0));
|
| (expand_noise_dB < 0));
|
||||||
|
|
||||||
|
// enable
|
||||||
|
BK4819_WriteRegister(BK4819_REG_31, r31 | (1u < 3));
|
||||||
}
|
}
|
||||||
|
|
||||||
void BK4819_DisableVox(void)
|
void BK4819_DisableVox(void)
|
||||||
|
@ -24,22 +24,22 @@
|
|||||||
|
|
||||||
enum BK4819_AF_Type_t
|
enum BK4819_AF_Type_t
|
||||||
{
|
{
|
||||||
BK4819_AF_MUTE = 0u,
|
BK4819_AF_MUTE = 0u, //
|
||||||
BK4819_AF_OPEN = 1u,
|
BK4819_AF_FM = 1u, // FM
|
||||||
BK4819_AF_ALAM = 2u,
|
BK4819_AF_ALAM = 2u, //
|
||||||
BK4819_AF_BEEP = 3u,
|
BK4819_AF_BEEP = 3u, //
|
||||||
BK4819_AF_UNKNOWN1 = 4u,
|
BK4819_AF_UNKNOWN1 = 4u, // SSB I think
|
||||||
BK4819_AF_UNKNOWN2 = 5u,
|
BK4819_AF_UNKNOWN2 = 5u, // SSB again
|
||||||
BK4819_AF_CTCO = 6u,
|
BK4819_AF_CTCO = 6u, // strange LF audio .. maybe the CTCSS LF line ?
|
||||||
BK4819_AF_AM = 7u,
|
BK4819_AF_AM = 7u, // AM
|
||||||
BK4819_AF_FSKO = 8u,
|
BK4819_AF_FSKO = 8u, // nothing
|
||||||
BK4819_AF_UNKNOWN3 = 9u,
|
BK4819_AF_UNKNOWN3 = 9u, // distorted
|
||||||
BK4819_AF_UNKNOWN4 = 10u,
|
BK4819_AF_UNKNOWN4 = 10u, // nothing at all
|
||||||
BK4819_AF_UNKNOWN5 = 11u,
|
BK4819_AF_UNKNOWN5 = 11u, // distorted
|
||||||
BK4819_AF_UNKNOWN6 = 12u,
|
BK4819_AF_UNKNOWN6 = 12u, // distorted
|
||||||
BK4819_AF_UNKNOWN7 = 13u,
|
BK4819_AF_UNKNOWN7 = 13u, // interesting
|
||||||
BK4819_AF_UNKNOWN8 = 14u,
|
BK4819_AF_UNKNOWN8 = 14u, // interesting
|
||||||
BK4819_AF_UNKNOWN9 = 15u
|
BK4819_AF_UNKNOWN9 = 15u // not a lot
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef enum BK4819_AF_Type_t BK4819_AF_Type_t;
|
typedef enum BK4819_AF_Type_t BK4819_AF_Type_t;
|
||||||
|
BIN
firmware.bin
BIN
firmware.bin
Binary file not shown.
Binary file not shown.
61
ui/main.c
61
ui/main.c
@ -51,6 +51,22 @@ center_line_t center_line = CENTER_LINE_NONE;
|
|||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
|
|
||||||
|
void UI_drawBars(uint8_t *p, const unsigned int level)
|
||||||
|
{
|
||||||
|
switch (level)
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
case 7: memmove(p + 20, BITMAP_AntennaLevel6, sizeof(BITMAP_AntennaLevel6));
|
||||||
|
case 6: memmove(p + 17, BITMAP_AntennaLevel5, sizeof(BITMAP_AntennaLevel5));
|
||||||
|
case 5: memmove(p + 14, BITMAP_AntennaLevel4, sizeof(BITMAP_AntennaLevel4));
|
||||||
|
case 4: memmove(p + 11, BITMAP_AntennaLevel3, sizeof(BITMAP_AntennaLevel3));
|
||||||
|
case 3: memmove(p + 8, BITMAP_AntennaLevel2, sizeof(BITMAP_AntennaLevel2));
|
||||||
|
case 2: memmove(p + 5, BITMAP_AntennaLevel1, sizeof(BITMAP_AntennaLevel1));
|
||||||
|
case 1: memmove(p + 0, BITMAP_Antenna, sizeof(BITMAP_Antenna));
|
||||||
|
case 0: break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef ENABLE_AUDIO_BAR
|
#ifdef ENABLE_AUDIO_BAR
|
||||||
|
|
||||||
unsigned int sqrt16(unsigned int value)
|
unsigned int sqrt16(unsigned int value)
|
||||||
@ -82,7 +98,7 @@ center_line_t center_line = CENTER_LINE_NONE;
|
|||||||
|
|
||||||
if (gScreenToDisplay != DISPLAY_MAIN)
|
if (gScreenToDisplay != DISPLAY_MAIN)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
#if 1
|
#if 1
|
||||||
// TX audio level
|
// TX audio level
|
||||||
|
|
||||||
@ -93,7 +109,7 @@ center_line_t center_line = CENTER_LINE_NONE;
|
|||||||
if (gAlarmState != ALARM_STATE_OFF)
|
if (gAlarmState != ALARM_STATE_OFF)
|
||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const unsigned int voice_amp = BK4819_GetVoiceAmplitudeOut(); // 15:0
|
const unsigned int voice_amp = BK4819_GetVoiceAmplitudeOut(); // 15:0
|
||||||
|
|
||||||
// const unsigned int max = 65535;
|
// const unsigned int max = 65535;
|
||||||
@ -280,25 +296,12 @@ void UI_UpdateRSSI(const int16_t rssi, const int vfo)
|
|||||||
|
|
||||||
memset(p_line, 0, 23);
|
memset(p_line, 0, 23);
|
||||||
|
|
||||||
if (rssi_level > 0)
|
// untested !!!
|
||||||
{
|
|
||||||
//if (rssi_level >= 1)
|
if (rssi_level == 0)
|
||||||
memmove(p_line, BITMAP_Antenna, 5);
|
|
||||||
if (rssi_level >= 2)
|
|
||||||
memmove(p_line + 5, BITMAP_AntennaLevel1, sizeof(BITMAP_AntennaLevel1));
|
|
||||||
if (rssi_level >= 3)
|
|
||||||
memmove(p_line + 8, BITMAP_AntennaLevel2, sizeof(BITMAP_AntennaLevel2));
|
|
||||||
if (rssi_level >= 4)
|
|
||||||
memmove(p_line + 11, BITMAP_AntennaLevel3, sizeof(BITMAP_AntennaLevel3));
|
|
||||||
if (rssi_level >= 5)
|
|
||||||
memmove(p_line + 14, BITMAP_AntennaLevel4, sizeof(BITMAP_AntennaLevel4));
|
|
||||||
if (rssi_level >= 6)
|
|
||||||
memmove(p_line + 17, BITMAP_AntennaLevel5, sizeof(BITMAP_AntennaLevel5));
|
|
||||||
if (rssi_level >= 7)
|
|
||||||
memmove(p_line + 20, BITMAP_AntennaLevel6, sizeof(BITMAP_AntennaLevel6));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
p_line = NULL;
|
p_line = NULL;
|
||||||
|
else
|
||||||
|
UI_drawBars(p_line, rssi_level);
|
||||||
|
|
||||||
ST7565_DrawLine(0, Line, 23, p_line);
|
ST7565_DrawLine(0, Line, 23, p_line);
|
||||||
#endif
|
#endif
|
||||||
@ -647,23 +650,7 @@ void UI_DisplayMain(void)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Level >= 1)
|
UI_drawBars(p_line1 + LCD_WIDTH, Level);
|
||||||
{
|
|
||||||
uint8_t *p_line = p_line1 + LCD_WIDTH;
|
|
||||||
memmove(p_line + 0, BITMAP_Antenna, sizeof(BITMAP_Antenna));
|
|
||||||
if (Level >= 2)
|
|
||||||
memmove(p_line + 5, BITMAP_AntennaLevel1, sizeof(BITMAP_AntennaLevel1));
|
|
||||||
if (Level >= 3)
|
|
||||||
memmove(p_line + 8, BITMAP_AntennaLevel2, sizeof(BITMAP_AntennaLevel2));
|
|
||||||
if (Level >= 4)
|
|
||||||
memmove(p_line + 11, BITMAP_AntennaLevel3, sizeof(BITMAP_AntennaLevel3));
|
|
||||||
if (Level >= 5)
|
|
||||||
memmove(p_line + 14, BITMAP_AntennaLevel4, sizeof(BITMAP_AntennaLevel4));
|
|
||||||
if (Level >= 6)
|
|
||||||
memmove(p_line + 17, BITMAP_AntennaLevel5, sizeof(BITMAP_AntennaLevel5));
|
|
||||||
if (Level >= 7)
|
|
||||||
memmove(p_line + 20, BITMAP_AntennaLevel6, sizeof(BITMAP_AntennaLevel6));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ************
|
// ************
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
#include <stdlib.h> // abs()
|
#include <stdlib.h> // abs()
|
||||||
|
|
||||||
#include "app/dtmf.h"
|
#include "app/dtmf.h"
|
||||||
|
#include "app/menu.h"
|
||||||
#include "bitmaps.h"
|
#include "bitmaps.h"
|
||||||
#include "board.h"
|
#include "board.h"
|
||||||
#include "dcs.h"
|
#include "dcs.h"
|
||||||
@ -787,8 +788,7 @@ void UI_DisplayMenu(void)
|
|||||||
const uint32_t value = 22656 + gSubMenuSelection;
|
const uint32_t value = 22656 + gSubMenuSelection;
|
||||||
const uint32_t xtal_Hz = (0x4f0000u + value) * 5;
|
const uint32_t xtal_Hz = (0x4f0000u + value) * 5;
|
||||||
|
|
||||||
//gEeprom.BK4819_XTAL_FREQ_LOW = gSubMenuSelection; // already set when the user was adjusting the value
|
writeXtalFreqCal(gSubMenuSelection, false);
|
||||||
BK4819_WriteRegister(BK4819_REG_3B, value);
|
|
||||||
|
|
||||||
sprintf(String, "%d\n%u.%06u\nMHz",
|
sprintf(String, "%d\n%u.%06u\nMHz",
|
||||||
gSubMenuSelection,
|
gSubMenuSelection,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user