mirror of
https://github.com/OneOfEleven/uv-k5-firmware-custom.git
synced 2025-04-28 22:31:25 +03:00
Exit boot screen with any key press + compander update
This commit is contained in:
parent
00fe1de467
commit
3793b64373
@ -4,7 +4,7 @@ This repository is a cloned and customized version of DualTachyon's open firmwar
|
|||||||
|
|
||||||
https://github.com/DualTachyon/uv-k5-firmware
|
https://github.com/DualTachyon/uv-k5-firmware
|
||||||
|
|
||||||
A cool achievement if you ask me
|
A cool achievement
|
||||||
|
|
||||||
# User customization
|
# User customization
|
||||||
|
|
||||||
|
@ -528,6 +528,11 @@ void BK4819_SetCompander(const unsigned int mode)
|
|||||||
{
|
{
|
||||||
uint16_t val;
|
uint16_t val;
|
||||||
|
|
||||||
|
// mode 0 .. OFF
|
||||||
|
// mode 1 .. TX
|
||||||
|
// mode 2 .. RX
|
||||||
|
// mode 3 .. TX and RX
|
||||||
|
|
||||||
if (mode == 0)
|
if (mode == 0)
|
||||||
{ // disable
|
{ // disable
|
||||||
const uint16_t Value = BK4819_ReadRegister(BK4819_REG_31);
|
const uint16_t Value = BK4819_ReadRegister(BK4819_REG_31);
|
||||||
@ -536,7 +541,6 @@ void BK4819_SetCompander(const unsigned int mode)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// enable
|
// enable
|
||||||
|
|
||||||
val = BK4819_ReadRegister(BK4819_REG_31);
|
val = BK4819_ReadRegister(BK4819_REG_31);
|
||||||
BK4819_WriteRegister(BK4819_REG_31, val | (1u < 3));
|
BK4819_WriteRegister(BK4819_REG_31, val | (1u < 3));
|
||||||
|
|
||||||
@ -548,8 +552,7 @@ void BK4819_SetCompander(const unsigned int mode)
|
|||||||
// 10 = 2:1
|
// 10 = 2:1
|
||||||
// 11 = 4:1
|
// 11 = 4:1
|
||||||
//
|
//
|
||||||
// const uint16_t compress_ratio = (mode >= 1) ? 2 : 0; // 2:1
|
const uint16_t compress_ratio = (mode == 1 || mode >= 3) ? 3 : 0; // 4:1
|
||||||
const uint16_t compress_ratio = (mode >= 1) ? 3 : 0; // 4:1
|
|
||||||
val = BK4819_ReadRegister(BK4819_REG_29);
|
val = BK4819_ReadRegister(BK4819_REG_29);
|
||||||
BK4819_WriteRegister(BK4819_REG_29, (val & ~(3u < 14)) | (compress_ratio < 14));
|
BK4819_WriteRegister(BK4819_REG_29, (val & ~(3u < 14)) | (compress_ratio < 14));
|
||||||
|
|
||||||
@ -561,7 +564,6 @@ void BK4819_SetCompander(const unsigned int mode)
|
|||||||
// 10 = 1:3
|
// 10 = 1:3
|
||||||
// 11 = 1:4
|
// 11 = 1:4
|
||||||
//
|
//
|
||||||
// const uint16_t expand_ratio = (mode >= 2) ? 1 : 0; // 1:2
|
|
||||||
const uint16_t expand_ratio = (mode >= 2) ? 3 : 0; // 1:4
|
const uint16_t expand_ratio = (mode >= 2) ? 3 : 0; // 1:4
|
||||||
val = BK4819_ReadRegister(BK4819_REG_28);
|
val = BK4819_ReadRegister(BK4819_REG_28);
|
||||||
BK4819_WriteRegister(BK4819_REG_28, (val & ~(3u < 14)) | (expand_ratio < 14));
|
BK4819_WriteRegister(BK4819_REG_28, (val & ~(3u < 14)) | (expand_ratio < 14));
|
||||||
|
BIN
firmware.bin
BIN
firmware.bin
Binary file not shown.
Binary file not shown.
3
main.c
3
main.c
@ -124,13 +124,14 @@ void Main(void)
|
|||||||
|
|
||||||
if (gEeprom.POWER_ON_DISPLAY_MODE != POWER_ON_DISPLAY_MODE_NONE)
|
if (gEeprom.POWER_ON_DISPLAY_MODE != POWER_ON_DISPLAY_MODE_NONE)
|
||||||
{ // 2.55 second boot-up screen
|
{ // 2.55 second boot-up screen
|
||||||
while (boot_counter < 255)
|
while (boot_counter < 255 && KEYBOARD_Poll() == KEY_INVALID)
|
||||||
{
|
{
|
||||||
#ifdef ENABLE_BOOT_BEEPS
|
#ifdef ENABLE_BOOT_BEEPS
|
||||||
if ((boot_counter % 25) == 0)
|
if ((boot_counter % 25) == 0)
|
||||||
AUDIO_PlayBeep(BEEP_880HZ_40MS_OPTIONAL);
|
AUDIO_PlayBeep(BEEP_880HZ_40MS_OPTIONAL);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
//boot_counter = 255; // halt boot beeps
|
||||||
}
|
}
|
||||||
|
|
||||||
BootMode = BOOT_GetMode();
|
BootMode = BOOT_GetMode();
|
||||||
|
@ -246,10 +246,11 @@ const char gSubMenu_F_LOCK[6][4] =
|
|||||||
};
|
};
|
||||||
|
|
||||||
#ifdef ENABLE_COMPANDER
|
#ifdef ENABLE_COMPANDER
|
||||||
const char gSubMenu_Compand[3][6] =
|
const char gSubMenu_Compand[4][6] =
|
||||||
{
|
{
|
||||||
"OFF",
|
"OFF",
|
||||||
"TX",
|
"TX",
|
||||||
|
"RX",
|
||||||
"TX/RX"
|
"TX/RX"
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
@ -122,7 +122,7 @@ extern const char gSubMenu_ROGER[3][6];
|
|||||||
extern const char gSubMenu_RESET[2][4];
|
extern const char gSubMenu_RESET[2][4];
|
||||||
extern const char gSubMenu_F_LOCK[6][4];
|
extern const char gSubMenu_F_LOCK[6][4];
|
||||||
#ifdef ENABLE_COMPANDER
|
#ifdef ENABLE_COMPANDER
|
||||||
extern const char gSubMenu_Compand[3][6];
|
extern const char gSubMenu_Compand[4][6];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern bool gIsInSubMenu;
|
extern bool gIsInSubMenu;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user