mirror of
https://github.com/OneOfEleven/uv-k5-firmware-custom.git
synced 2025-04-28 22:31:25 +03:00
Disable the weak signal auto RX bandwidth reduction - test
This commit is contained in:
parent
1dbe874240
commit
5900d46edb
@ -1710,6 +1710,11 @@ void APP_TimeSlice500ms(void)
|
|||||||
cancelUserInputModes();
|
cancelUserInputModes();
|
||||||
|
|
||||||
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_timeout == 0)
|
if (--gDTMF_RX_live_timeout == 0)
|
||||||
{
|
{
|
||||||
@ -1720,6 +1725,7 @@ void APP_TimeSlice500ms(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (gDTMF_RX_timeout > 0)
|
if (gDTMF_RX_timeout > 0)
|
||||||
if (--gDTMF_RX_timeout == 0)
|
if (--gDTMF_RX_timeout == 0)
|
||||||
|
@ -403,13 +403,12 @@ void DTMF_Reply(void)
|
|||||||
if (pString == NULL)
|
if (pString == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Delay = gEeprom.DTMF_PRELOAD_TIME;
|
Delay = (gEeprom.DTMF_PRELOAD_TIME < 200) ? 200 : gEeprom.DTMF_PRELOAD_TIME;
|
||||||
|
|
||||||
if (gEeprom.DTMF_SIDE_TONE)
|
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);
|
GPIO_SetBit(&GPIOC->DATA, GPIOC_PIN_AUDIO_PATH);
|
||||||
gEnableSpeaker = true;
|
gEnableSpeaker = true;
|
||||||
Delay = (gEeprom.DTMF_PRELOAD_TIME < 60) ? 60 : gEeprom.DTMF_PRELOAD_TIME;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SYSTEM_DelayMs(Delay);
|
SYSTEM_DelayMs(Delay);
|
||||||
|
@ -913,7 +913,7 @@ void BK4819_EnableDTMF(void)
|
|||||||
// REG_24 <3:0> 14 Max symbol number for SelCall detection
|
// 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 = 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
|
BK4819_WriteRegister(BK4819_REG_24, // 1 00011000 1 1 1 1110
|
||||||
(1u << BK4819_REG_24_SHIFT_UNKNOWN_15)
|
(1u << BK4819_REG_24_SHIFT_UNKNOWN_15)
|
||||||
| (threshold << BK4819_REG_24_SHIFT_THRESHOLD) // 0 ~ 255
|
| (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_WIDE:
|
||||||
case BK4819_FILTER_BW_NARROW:
|
case BK4819_FILTER_BW_NARROW:
|
||||||
#ifdef ENABLE_AM_FIX
|
#ifdef ENABLE_AM_FIX
|
||||||
BK4819_SetFilterBandwidth(Bandwidth, gRxVfo->AM_mode && gSetting_AM_fix);
|
// BK4819_SetFilterBandwidth(Bandwidth, gRxVfo->AM_mode && gSetting_AM_fix);
|
||||||
// BK4819_SetFilterBandwidth(Bandwidth, false);
|
BK4819_SetFilterBandwidth(Bandwidth, true);
|
||||||
#else
|
#else
|
||||||
BK4819_SetFilterBandwidth(Bandwidth, false);
|
BK4819_SetFilterBandwidth(Bandwidth, false);
|
||||||
#endif
|
#endif
|
||||||
@ -732,6 +732,7 @@ void RADIO_SetupRegisters(bool bSwitchToFunction0)
|
|||||||
#else
|
#else
|
||||||
if (gCurrentFunction != FUNCTION_TRANSMIT)
|
if (gCurrentFunction != FUNCTION_TRANSMIT)
|
||||||
{
|
{
|
||||||
|
BK4819_DisableDTMF();
|
||||||
BK4819_EnableDTMF();
|
BK4819_EnableDTMF();
|
||||||
InterruptMask |= BK4819_REG_3F_DTMF_5TONE_FOUND;
|
InterruptMask |= BK4819_REG_3F_DTMF_5TONE_FOUND;
|
||||||
}
|
}
|
||||||
@ -812,8 +813,8 @@ void RADIO_SetTxParameters(void)
|
|||||||
case BK4819_FILTER_BW_WIDE:
|
case BK4819_FILTER_BW_WIDE:
|
||||||
case BK4819_FILTER_BW_NARROW:
|
case BK4819_FILTER_BW_NARROW:
|
||||||
#ifdef ENABLE_AM_FIX
|
#ifdef ENABLE_AM_FIX
|
||||||
BK4819_SetFilterBandwidth(Bandwidth, gCurrentVfo->AM_mode && gSetting_AM_fix);
|
// BK4819_SetFilterBandwidth(Bandwidth, gCurrentVfo->AM_mode && gSetting_AM_fix);
|
||||||
// BK4819_SetFilterBandwidth(Bandwidth, false);
|
BK4819_SetFilterBandwidth(Bandwidth, true);
|
||||||
#else
|
#else
|
||||||
BK4819_SetFilterBandwidth(Bandwidth, false);
|
BK4819_SetFilterBandwidth(Bandwidth, false);
|
||||||
#endif
|
#endif
|
||||||
|
11
ui/main.c
11
ui/main.c
@ -36,17 +36,6 @@
|
|||||||
#include "ui/main.h"
|
#include "ui/main.h"
|
||||||
#include "ui/ui.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;
|
center_line_t center_line = CENTER_LINE_NONE;
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
|
13
ui/main.h
13
ui/main.h
@ -17,6 +17,19 @@
|
|||||||
#ifndef UI_MAIN_H
|
#ifndef UI_MAIN_H
|
||||||
#define 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_DisplayAudioBar(void);
|
||||||
void UI_UpdateRSSI(const int16_t rssi, const int vfo);
|
void UI_UpdateRSSI(const int16_t rssi, const int vfo);
|
||||||
void UI_DisplayMain(void);
|
void UI_DisplayMain(void);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user