Dropped support for 20kHz bandwidth

Dropped support for 20kHz bandwith in rtx code and radio drivers. This option
is supported only by MDx radios and so far is not being used at all.
This commit is contained in:
Silvano Seva 2023-12-29 10:58:54 +01:00
parent 1791e70eef
commit d8c0ab1c44
13 changed files with 6 additions and 24 deletions

View File

@ -75,8 +75,7 @@ rtxStatus_t;
enum bandwidth
{
BW_12_5 = 0, /**< 12.5kHz bandwidth */
BW_20 = 1, /**< 20kHz bandwidth */
BW_25 = 2 /**< 25kHz bandwidth */
BW_25 = 1 /**< 25kHz bandwidth */
};
/**

View File

@ -159,7 +159,7 @@ void vp_announceBandwidth(const uint8_t bandwidth, const vpQueueFlags_t flags)
vp_queuePrompt(PROMPT_BANDWIDTH);
}
char* bandwidths[] = {"12.5", "20", "25"};
char* bandwidths[] = {"12.5", "25"};
vp_queueString(bandwidths[bandwidth], vpAnnounceCommonSymbols);
vp_queuePrompt(PROMPT_KILOHERTZ);
playIfNeeded(flags);

View File

@ -977,7 +977,7 @@ static void _ui_fsm_menuMacro(kbd_msg_t msg, bool *sync_rtx)
if(state.channel.mode == OPMODE_FM)
{
state.channel.bandwidth++;
state.channel.bandwidth %= 3;
state.channel.bandwidth %= 2;
*sync_rtx = true;
vp_announceBandwidth(state.channel.bandwidth, queueFlags);
}

View File

@ -83,8 +83,6 @@ void _ui_drawModeInfo(ui_state_t* ui_state)
// Get Bandwidth string
if(last_state.channel.bandwidth == BW_12_5)
sniprintf(bw_str, 8, "NFM");
else if(last_state.channel.bandwidth == BW_20)
sniprintf(bw_str, 8, "FM20");
else if(last_state.channel.bandwidth == BW_25)
sniprintf(bw_str, 8, "FM");

View File

@ -1151,9 +1151,6 @@ bool _ui_drawMacroMenu(ui_state_t* ui_state)
case BW_12_5:
sniprintf(bw_str, 12, " BW 12.5");
break;
case BW_20:
sniprintf(bw_str, 12, " BW 20 ");
break;
case BW_25:
sniprintf(bw_str, 12, " BW 25 ");
break;

View File

@ -69,8 +69,6 @@ void _ui_drawModeInfo(ui_state_t* ui_state)
// Get Bandwidth string
if(last_state.channel.bandwidth == BW_12_5)
snprintf(bw_str, 8, "12.5");
else if(last_state.channel.bandwidth == BW_20)
snprintf(bw_str, 8, "20");
else if(last_state.channel.bandwidth == BW_25)
snprintf(bw_str, 8, "25");
// Get encdec string

View File

@ -75,7 +75,7 @@ int cps_readChannel(channel_t *channel, uint16_t pos)
W25Qx_sleep();
channel->mode = chData.channel_mode;
channel->bandwidth = chData.bandwidth;
channel->bandwidth = (chData.bandwidth == 0) ? 0 : 1; // Consider 20kHz as 25kHz
channel->rx_only = chData.rx_only;
channel->power = ((chData.power == 1) ? 5000 : 1000); // 5W or 1W
channel->rx_frequency = bcdToBin(chData.rx_frequency) * 10;

View File

@ -53,7 +53,7 @@ static int _readChannelAtAddress(channel_t *channel, uint32_t addr)
if(wcslen((wchar_t *) chData.name) == 0) return -1;
channel->mode = chData.channel_mode;
channel->bandwidth = chData.bandwidth;
channel->bandwidth = (chData.bandwidth == 0) ? 0 : 1; // Consider 20kHz as 25kHz
channel->rx_only = chData.rx_only;
channel->rx_frequency = bcdToBin(chData.rx_frequency) * 10;
channel->tx_frequency = bcdToBin(chData.tx_frequency) * 10;

View File

@ -51,7 +51,7 @@ static int _readChannelAtAddress(channel_t *channel, uint32_t addr)
if(wcslen((wchar_t *) chData.name) == 0) return -1;
channel->mode = chData.channel_mode;
channel->bandwidth = chData.bandwidth;
channel->bandwidth = (chData.bandwidth == 0) ? 0 : 1; // Consider 20kHz as 25kHz
channel->rx_only = chData.rx_only;
channel->rx_frequency = bcdToBin(chData.rx_frequency) * 10;
channel->tx_frequency = bcdToBin(chData.tx_frequency) * 10;

View File

@ -348,7 +348,6 @@ void radio_updateConfiguration()
at1846s.setTxDeviation(calData.data[currTxBand].mixGainNarrowband);
break;
case BW_20:
case BW_25:
at1846s.setBandwidth(AT1846S_BW::_25);
at1846s.setTxDeviation(calData.data[currTxBand].mixGainWideband);

View File

@ -67,13 +67,6 @@ void _setBandwidth(const enum bandwidth bw)
C5000.setModFactor(0x1E);
break;
case BW_20:
#ifndef MDx_ENABLE_SWD
gpio_setPin(WN_SW);
#endif
C5000.setModFactor(0x30);
break;
case BW_25:
#ifndef MDx_ENABLE_SWD
gpio_setPin(WN_SW);

View File

@ -346,7 +346,6 @@ void radio_updateConfiguration()
at1846s.setBandwidth(AT1846S_BW::_12P5);
break;
case BW_20:
case BW_25:
at1846s.setBandwidth(AT1846S_BW::_25);
break;

View File

@ -161,7 +161,6 @@ void radio_updateConfiguration()
at1846s.setBandwidth(AT1846S_BW::_12P5);
break;
case BW_20:
case BW_25:
at1846s.setBandwidth(AT1846S_BW::_25);
break;