mirror of
https://github.com/OneOfEleven/uv-k5-firmware-custom.git
synced 2025-04-27 22:01:26 +03:00
Fixed keypad-5 noaa bug
This commit is contained in:
parent
eb7dcceaab
commit
540906cc3f
@ -36,11 +36,12 @@ To enable the custom option, set the above option to '1'
|
||||
|
||||
# Some other changes made
|
||||
|
||||
* Various bugs fixed that the QS firmware had
|
||||
* Various original QS firmware bugs fixed
|
||||
* Added new bugs
|
||||
* Finer RSSI bar steps
|
||||
* Nicer/cleaner big numeric font than original QS big numeric font
|
||||
* Various menu re-wordings - trying to reduce 'WTH does that mean ?'
|
||||
* Extra menu items (including hidden menu freq calibration)
|
||||
* plus others
|
||||
|
||||
# Compiler
|
||||
|
14
app/app.c
14
app/app.c
@ -475,9 +475,7 @@ void APP_StartListening(FUNCTION_Type_t Function)
|
||||
|
||||
void APP_SetFrequencyByStep(VFO_Info_t *pInfo, int8_t Step)
|
||||
{
|
||||
uint32_t Frequency;
|
||||
|
||||
Frequency = pInfo->ConfigRX.Frequency + (Step * pInfo->StepFrequency);
|
||||
uint32_t Frequency = pInfo->ConfigRX.Frequency + (Step * pInfo->StepFrequency);
|
||||
|
||||
if (pInfo->StepFrequency == 833)
|
||||
{
|
||||
@ -493,12 +491,12 @@ void APP_SetFrequencyByStep(VFO_Info_t *pInfo, int8_t Step)
|
||||
}
|
||||
|
||||
if (Frequency > UpperLimitFrequencyBandTable[pInfo->Band])
|
||||
pInfo->ConfigRX.Frequency = LowerLimitFrequencyBandTable[pInfo->Band];
|
||||
Frequency = LowerLimitFrequencyBandTable[pInfo->Band];
|
||||
else
|
||||
if (Frequency < LowerLimitFrequencyBandTable[pInfo->Band])
|
||||
pInfo->ConfigRX.Frequency = FREQUENCY_FloorToStep(UpperLimitFrequencyBandTable[pInfo->Band], pInfo->StepFrequency, LowerLimitFrequencyBandTable[pInfo->Band]);
|
||||
else
|
||||
pInfo->ConfigRX.Frequency = Frequency;
|
||||
Frequency = FREQUENCY_FloorToStep(UpperLimitFrequencyBandTable[pInfo->Band], pInfo->StepFrequency, LowerLimitFrequencyBandTable[pInfo->Band]);
|
||||
|
||||
pInfo->ConfigRX.Frequency = Frequency;
|
||||
}
|
||||
|
||||
static void FREQ_NextChannel(void)
|
||||
@ -1201,7 +1199,7 @@ void APP_TimeSlice10ms(void)
|
||||
#ifdef ENABLE_BOOT_BEEPS
|
||||
if (boot_counter < 255)
|
||||
if ((boot_counter % 25) == 0)
|
||||
AUDIO_PlayBeep(BEEP_440HZ_40MS_OPTIONAL);
|
||||
AUDIO_PlayBeep(BEEP_880HZ_40MS_OPTIONAL);
|
||||
#endif
|
||||
|
||||
if (UART_IsCommandAvailable())
|
||||
|
13
app/main.c
13
app/main.c
@ -161,8 +161,6 @@ static void processFKeyFunction(const KEY_Code_t Key, const bool beep)
|
||||
break;
|
||||
|
||||
case KEY_5:
|
||||
// TODO: something wrong here !!
|
||||
|
||||
#ifdef ENABLE_NOAA
|
||||
if (IS_NOT_NOAA_CHANNEL(gTxVfo->CHANNEL_SAVE))
|
||||
{
|
||||
@ -175,16 +173,9 @@ static void processFKeyFunction(const KEY_Code_t Key, const bool beep)
|
||||
gAnotherVoiceID = VOICE_ID_FREQUENCY_MODE;
|
||||
#endif
|
||||
}
|
||||
#else
|
||||
//gEeprom.ScreenChannel[Vfo] = gEeprom.NoaaChannel[gEeprom.TX_CHANNEL];
|
||||
gEeprom.ScreenChannel[Vfo] = gEeprom.FreqChannel[gEeprom.TX_CHANNEL];
|
||||
#ifdef ENABLE_VOICE
|
||||
gAnotherVoiceID = VOICE_ID_FREQUENCY_MODE;
|
||||
#endif
|
||||
gRequestSaveVFO = true;
|
||||
gVfoConfigureMode = VFO_CONFIGURE_RELOAD;
|
||||
#endif
|
||||
|
||||
gRequestSaveVFO = true;
|
||||
gVfoConfigureMode = VFO_CONFIGURE_RELOAD;
|
||||
break;
|
||||
|
||||
case KEY_6:
|
||||
|
4
audio.c
4
audio.c
@ -123,6 +123,9 @@ void AUDIO_PlayBeep(BEEP_Type_t Beep)
|
||||
case BEEP_440HZ_500MS:
|
||||
ToneFrequency = 440;
|
||||
break;
|
||||
case BEEP_880HZ_40MS_OPTIONAL:
|
||||
ToneFrequency = 880;
|
||||
break;
|
||||
}
|
||||
|
||||
BK4819_PlayTone(ToneFrequency, true);
|
||||
@ -149,6 +152,7 @@ void AUDIO_PlayBeep(BEEP_Type_t Beep)
|
||||
Duration = 60;
|
||||
break;
|
||||
|
||||
case BEEP_880HZ_40MS_OPTIONAL:
|
||||
case BEEP_440HZ_40MS_OPTIONAL:
|
||||
BK4819_ExitTxMute();
|
||||
Duration = 40;
|
||||
|
3
audio.h
3
audio.h
@ -27,7 +27,8 @@ enum BEEP_Type_t
|
||||
BEEP_500HZ_60MS_DOUBLE_BEEP_OPTIONAL,
|
||||
BEEP_440HZ_500MS,
|
||||
BEEP_500HZ_60MS_DOUBLE_BEEP,
|
||||
BEEP_440HZ_40MS_OPTIONAL
|
||||
BEEP_440HZ_40MS_OPTIONAL,
|
||||
BEEP_880HZ_40MS_OPTIONAL
|
||||
};
|
||||
|
||||
typedef enum BEEP_Type_t BEEP_Type_t;
|
||||
|
@ -532,8 +532,34 @@ void BK4819_DisableCompander(void)
|
||||
|
||||
void BK4819_EnableCompander(void)
|
||||
{
|
||||
const uint16_t Value = BK4819_ReadRegister(BK4819_REG_31);
|
||||
BK4819_WriteRegister(BK4819_REG_31, Value | (1u < 3));
|
||||
uint16_t val;
|
||||
|
||||
val = BK4819_ReadRegister(BK4819_REG_31);
|
||||
BK4819_WriteRegister(BK4819_REG_31, val | (1u < 3));
|
||||
|
||||
// set the compressor ratio
|
||||
//
|
||||
// REG_29 <15:14> 10 Compress (AF Tx) Ratio
|
||||
// 00 = Disable
|
||||
// 01 = 1.333:1
|
||||
// 10 = 2:1
|
||||
// 11 = 4:1
|
||||
//
|
||||
const uint16_t compress_ratio = 2; // 2:1
|
||||
val = BK4819_ReadRegister(BK4819_REG_29);
|
||||
BK4819_WriteRegister(BK4819_REG_29, (val & ~(3u < 14)) | (compress_ratio < 14));
|
||||
|
||||
// set the expander ratio
|
||||
//
|
||||
// REG_28 <15:14> 01 Expander (AF Rx) Ratio
|
||||
// 00 = Disable
|
||||
// 01 = 1:2
|
||||
// 10 = 1:3
|
||||
// 11 = 1:4
|
||||
//
|
||||
const uint16_t expand_ratio = 1; // 2:1
|
||||
val = BK4819_ReadRegister(BK4819_REG_28);
|
||||
BK4819_WriteRegister(BK4819_REG_28, (val & ~(3u < 14)) | (expand_ratio < 14));
|
||||
}
|
||||
|
||||
void BK4819_DisableVox(void)
|
||||
|
BIN
firmware.bin
BIN
firmware.bin
Binary file not shown.
Binary file not shown.
2
main.c
2
main.c
@ -128,7 +128,7 @@ void Main(void)
|
||||
{
|
||||
#ifdef ENABLE_BOOT_BEEPS
|
||||
if ((boot_counter % 25) == 0)
|
||||
AUDIO_PlayBeep(BEEP_440HZ_40MS_OPTIONAL);
|
||||
AUDIO_PlayBeep(BEEP_880HZ_40MS_OPTIONAL);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
#ifdef GIT_HASH
|
||||
#define VER GIT_HASH
|
||||
#else
|
||||
#define VER "230915"
|
||||
#define VER "230916"
|
||||
#endif
|
||||
|
||||
const char Version[] = "OEFW-"VER;
|
||||
|
@ -13,7 +13,7 @@ del /S /Q *.o >nul 2>nul
|
||||
del /S /Q *.d >nul 2>nul
|
||||
|
||||
::python -m pip install --upgrade pip crcmod
|
||||
fw-pack.py firmware.bin 230915 firmware.packed.bin
|
||||
fw-pack.py firmware.bin 230916 firmware.packed.bin
|
||||
|
||||
::arm-none-eabi-size firmware
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user