mirror of
https://github.com/egzumer/uv-k5-firmware-custom
synced 2024-11-22 01:32:43 +00:00
Disable the weak signal auto RX bandwidth reduction - test
This commit is contained in:
parent
1dbe874240
commit
5900d46edb
16
app/app.c
16
app/app.c
@ -1711,16 +1711,22 @@ void APP_TimeSlice500ms(void)
|
||||
|
||||
if (gDTMF_RX_live_timeout > 0)
|
||||
{
|
||||
if (--gDTMF_RX_live_timeout == 0)
|
||||
#ifdef ENABLE_RSSI_BAR
|
||||
if (center_line == CENTER_LINE_DTMF_DEC ||
|
||||
center_line == CENTER_LINE_NONE) // wait till the center line is free for us to use before timing out
|
||||
#endif
|
||||
{
|
||||
if (gDTMF_RX_live[0] != 0)
|
||||
if (--gDTMF_RX_live_timeout == 0)
|
||||
{
|
||||
memset(gDTMF_RX_live, 0, sizeof(gDTMF_RX_live));
|
||||
gUpdateDisplay = true;
|
||||
if (gDTMF_RX_live[0] != 0)
|
||||
{
|
||||
memset(gDTMF_RX_live, 0, sizeof(gDTMF_RX_live));
|
||||
gUpdateDisplay = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (gDTMF_RX_timeout > 0)
|
||||
if (--gDTMF_RX_timeout == 0)
|
||||
DTMF_clear_RX();
|
||||
|
@ -403,13 +403,12 @@ void DTMF_Reply(void)
|
||||
if (pString == NULL)
|
||||
return;
|
||||
|
||||
Delay = gEeprom.DTMF_PRELOAD_TIME;
|
||||
Delay = (gEeprom.DTMF_PRELOAD_TIME < 200) ? 200 : gEeprom.DTMF_PRELOAD_TIME;
|
||||
|
||||
if (gEeprom.DTMF_SIDE_TONE)
|
||||
{ // the will also hear the transmitted tones
|
||||
{ // the user will also hear the transmitted tones
|
||||
GPIO_SetBit(&GPIOC->DATA, GPIOC_PIN_AUDIO_PATH);
|
||||
gEnableSpeaker = true;
|
||||
Delay = (gEeprom.DTMF_PRELOAD_TIME < 60) ? 60 : gEeprom.DTMF_PRELOAD_TIME;
|
||||
}
|
||||
|
||||
SYSTEM_DelayMs(Delay);
|
||||
|
@ -913,7 +913,7 @@ void BK4819_EnableDTMF(void)
|
||||
// REG_24 <3:0> 14 Max symbol number for SelCall detection
|
||||
|
||||
// const uint16_t threshold = 24; // doesn't decode non-QS radios
|
||||
const uint16_t threshold = 140; // but 128 ~ 247 does
|
||||
const uint16_t threshold = 200; // but 128 ~ 247 does
|
||||
BK4819_WriteRegister(BK4819_REG_24, // 1 00011000 1 1 1 1110
|
||||
(1u << BK4819_REG_24_SHIFT_UNKNOWN_15)
|
||||
| (threshold << BK4819_REG_24_SHIFT_THRESHOLD) // 0 ~ 255
|
||||
|
BIN
firmware.bin
BIN
firmware.bin
Binary file not shown.
Binary file not shown.
9
radio.c
9
radio.c
@ -564,8 +564,8 @@ void RADIO_SetupRegisters(bool bSwitchToFunction0)
|
||||
case BK4819_FILTER_BW_WIDE:
|
||||
case BK4819_FILTER_BW_NARROW:
|
||||
#ifdef ENABLE_AM_FIX
|
||||
BK4819_SetFilterBandwidth(Bandwidth, gRxVfo->AM_mode && gSetting_AM_fix);
|
||||
// BK4819_SetFilterBandwidth(Bandwidth, false);
|
||||
// BK4819_SetFilterBandwidth(Bandwidth, gRxVfo->AM_mode && gSetting_AM_fix);
|
||||
BK4819_SetFilterBandwidth(Bandwidth, true);
|
||||
#else
|
||||
BK4819_SetFilterBandwidth(Bandwidth, false);
|
||||
#endif
|
||||
@ -732,6 +732,7 @@ void RADIO_SetupRegisters(bool bSwitchToFunction0)
|
||||
#else
|
||||
if (gCurrentFunction != FUNCTION_TRANSMIT)
|
||||
{
|
||||
BK4819_DisableDTMF();
|
||||
BK4819_EnableDTMF();
|
||||
InterruptMask |= BK4819_REG_3F_DTMF_5TONE_FOUND;
|
||||
}
|
||||
@ -812,8 +813,8 @@ void RADIO_SetTxParameters(void)
|
||||
case BK4819_FILTER_BW_WIDE:
|
||||
case BK4819_FILTER_BW_NARROW:
|
||||
#ifdef ENABLE_AM_FIX
|
||||
BK4819_SetFilterBandwidth(Bandwidth, gCurrentVfo->AM_mode && gSetting_AM_fix);
|
||||
// BK4819_SetFilterBandwidth(Bandwidth, false);
|
||||
// BK4819_SetFilterBandwidth(Bandwidth, gCurrentVfo->AM_mode && gSetting_AM_fix);
|
||||
BK4819_SetFilterBandwidth(Bandwidth, true);
|
||||
#else
|
||||
BK4819_SetFilterBandwidth(Bandwidth, false);
|
||||
#endif
|
||||
|
11
ui/main.c
11
ui/main.c
@ -36,17 +36,6 @@
|
||||
#include "ui/main.h"
|
||||
#include "ui/ui.h"
|
||||
|
||||
enum center_line_t {
|
||||
CENTER_LINE_NONE = 0,
|
||||
CENTER_LINE_IN_USE,
|
||||
CENTER_LINE_AUDIO_BAR,
|
||||
CENTER_LINE_RSSI,
|
||||
CENTER_LINE_AM_FIX_DATA,
|
||||
CENTER_LINE_DTMF_DEC,
|
||||
CENTER_LINE_CHARGE_DATA
|
||||
};
|
||||
typedef enum center_line_t center_line_t;
|
||||
|
||||
center_line_t center_line = CENTER_LINE_NONE;
|
||||
|
||||
// ***************************************************************************
|
||||
|
13
ui/main.h
13
ui/main.h
@ -17,6 +17,19 @@
|
||||
#ifndef UI_MAIN_H
|
||||
#define UI_MAIN_H
|
||||
|
||||
enum center_line_t {
|
||||
CENTER_LINE_NONE = 0,
|
||||
CENTER_LINE_IN_USE,
|
||||
CENTER_LINE_AUDIO_BAR,
|
||||
CENTER_LINE_RSSI,
|
||||
CENTER_LINE_AM_FIX_DATA,
|
||||
CENTER_LINE_DTMF_DEC,
|
||||
CENTER_LINE_CHARGE_DATA
|
||||
};
|
||||
typedef enum center_line_t center_line_t;
|
||||
|
||||
extern center_line_t center_line;
|
||||
|
||||
void UI_DisplayAudioBar(void);
|
||||
void UI_UpdateRSSI(const int16_t rssi, const int vfo);
|
||||
void UI_DisplayMain(void);
|
||||
|
Loading…
Reference in New Issue
Block a user