Fixed missing '{' when 'ENABLE_ALARM' is enabled

This commit is contained in:
OneOfEleven 2023-09-26 06:51:36 +01:00
parent d8aeb54362
commit bd6ca8f847
4 changed files with 49 additions and 49 deletions

View File

@ -555,87 +555,87 @@ void BK4819_SetFilterBandwidth(const BK4819_FilterBandwidth_t Bandwidth, const b
// 1 = 6dB // 1 = 6dB
if (Bandwidth == BK4819_FILTER_BW_WIDE) if (Bandwidth == BK4819_FILTER_BW_WIDE)
{ { // 25kHz
if (weak_no_different) if (weak_no_different)
{ // make the bandwidth the same with weak signals (sounds much better) { // make the RX bandwidth the same with weak signals (sounds better)
BK4819_WriteRegister(BK4819_REG_43, BK4819_WriteRegister(BK4819_REG_43,
(0u << 15) | // 0 (0u << 15) | // 0
(3u << 12) | // 3 RF filter bandwidth (3u << 12) | // 3 RF filter bandwidth
(3u << 9) | // *0 RF filter bandwidth when signal is weak (3u << 9) | // *0 RF filter bandwidth when signal is weak
(7u << 6) | // *0 AFTxLPF2 filter Band Width (6u << 6) | // *0 AFTxLPF2 filter Band Width
(2u << 4) | // 2 BW Mode Selection (2u << 4) | // 2 BW Mode Selection
(1u << 3) | // 1 (1u << 3) | // 1
(0u << 2) | // 0 Gain after FM Demodulation (0u << 2) | // 0 Gain after FM Demodulation
(0u << 0)); // 0 (0u << 0)); // 0
} }
else else
{ { // with weak RX signals the RX bandwidth is reduced
BK4819_WriteRegister(BK4819_REG_43, // 0x3028); // 0 011 000 000 10 1 0 00 BK4819_WriteRegister(BK4819_REG_43, // 0x3028); // 0 011 000 000 10 1 0 00
(0u << 15) | // 0 (0u << 15) | // 0
(3u << 12) | // 3 RF filter bandwidth (3u << 12) | // 3 RF filter bandwidth
(1u << 9) | // *0 RF filter bandwidth when signal is weak (1u << 9) | // *0 RF filter bandwidth when signal is weak
(7u << 6) | // *0 AFTxLPF2 filter Band Width (6u << 6) | // *0 AFTxLPF2 filter Band Width
(2u << 4) | // 2 BW Mode Selection (2u << 4) | // 2 BW Mode Selection
(1u << 3) | // 1 (1u << 3) | // 1
(0u << 2) | // 0 Gain after FM Demodulation (0u << 2) | // 0 Gain after FM Demodulation
(0u << 0)); // 0 (0u << 0)); // 0
} }
} }
else else
if (Bandwidth == BK4819_FILTER_BW_NARROW) if (Bandwidth == BK4819_FILTER_BW_NARROW)
{ { // 12.5kHz
if (weak_no_different) if (weak_no_different)
{ {
BK4819_WriteRegister(BK4819_REG_43, // 0x4048); // 0 100 000 001 00 1 0 00 BK4819_WriteRegister(BK4819_REG_43, // 0x4048); // 0 100 000 001 00 1 0 00
(0u << 15) | // 0 (0u << 15) | // 0
(3u << 12) | // 4 RF filter bandwidth (3u << 12) | // 4 RF filter bandwidth
(3u << 9) | // *0 RF filter bandwidth when signal is weak (3u << 9) | // *0 RF filter bandwidth when signal is weak
(0u << 6) | // *1 AFTxLPF2 filter Band Width (0u << 6) | // *1 AFTxLPF2 filter Band Width
(0u << 4) | // 0 BW Mode Selection (0u << 4) | // 0 BW Mode Selection
(1u << 3) | // 1 (1u << 3) | // 1
(0u << 2) | // 0 Gain after FM Demodulation (0u << 2) | // 0 Gain after FM Demodulation
(0u << 0)); // 0 (0u << 0)); // 0
} }
else else
{ {
BK4819_WriteRegister(BK4819_REG_43, // 0x4048); // 0 100 000 001 00 1 0 00 BK4819_WriteRegister(BK4819_REG_43, // 0x4048); // 0 100 000 001 00 1 0 00
(0u << 15) | // 0 (0u << 15) | // 0
(3u << 12) | // 4 RF filter bandwidth (3u << 12) | // 4 RF filter bandwidth
(1u << 9) | // *0 RF filter bandwidth when signal is weak (1u << 9) | // *0 RF filter bandwidth when signal is weak
(0u << 6) | // *1 AFTxLPF2 filter Band Width (0u << 6) | // *1 AFTxLPF2 filter Band Width
(0u << 4) | // 0 BW Mode Selection (0u << 4) | // 0 BW Mode Selection
(1u << 3) | // 1 (1u << 3) | // 1
(0u << 2) | // 0 Gain after FM Demodulation (0u << 2) | // 0 Gain after FM Demodulation
(0u << 0)); // 0 (0u << 0)); // 0
} }
} }
else else
if (Bandwidth == BK4819_FILTER_BW_NARROWER) if (Bandwidth == BK4819_FILTER_BW_NARROWER)
{ { // 6.25kHz
if (weak_no_different) if (weak_no_different)
{ {
BK4819_WriteRegister(BK4819_REG_43, BK4819_WriteRegister(BK4819_REG_43,
(0u << 15) | // 0 (0u << 15) | // 0
(2u << 12) | // 4 RF filter bandwidth (2u << 12) | // 4 RF filter bandwidth
(2u << 9) | // 0 RF filter bandwidth when signal is weak (2u << 9) | // 0 RF filter bandwidth when signal is weak
(1u << 6) | // 1 AFTxLPF2 filter Band Width (1u << 6) | // 1 AFTxLPF2 filter Band Width
(1u << 4) | // 1 BW Mode Selection (1u << 4) | // 1 BW Mode Selection
(1u << 3) | // 1 (1u << 3) | // 1
(0u << 2) | // 0 Gain after FM Demodulation (0u << 2) | // 0 Gain after FM Demodulation
(0u << 0)); // 0 (0u << 0)); // 0
} }
else else
{ {
BK4819_WriteRegister(BK4819_REG_43, BK4819_WriteRegister(BK4819_REG_43,
(0u << 15) | // 0 (0u << 15) | // 0
(2u << 12) | // 4 RF filter bandwidth (2u << 12) | // 4 RF filter bandwidth
(0u << 9) | // 0 RF filter bandwidth when signal is weak (0u << 9) | // 0 RF filter bandwidth when signal is weak
(1u << 6) | // 1 AFTxLPF2 filter Band Width (1u << 6) | // 1 AFTxLPF2 filter Band Width
(1u << 4) | // 1 BW Mode Selection (1u << 4) | // 1 BW Mode Selection
(1u << 3) | // 1 (1u << 3) | // 1
(0u << 2) | // 0 Gain after FM Demodulation (0u << 2) | // 0 Gain after FM Demodulation
(0u << 0)); // 0 (0u << 0)); // 0
} }
} }
} }

Binary file not shown.

Binary file not shown.

View File

@ -40,7 +40,7 @@
// //
const t_menu_item MenuList[] = const t_menu_item MenuList[] =
{ {
// name, voice ID, menu ID // text, voice ID, menu ID
{"SQL", VOICE_ID_SQUELCH, MENU_SQL }, {"SQL", VOICE_ID_SQUELCH, MENU_SQL },
{"STEP", VOICE_ID_FREQUENCY_STEP, MENU_STEP }, {"STEP", VOICE_ID_FREQUENCY_STEP, MENU_STEP },
@ -86,7 +86,7 @@ const t_menu_item MenuList[] =
{"SLIST1", VOICE_ID_INVALID, MENU_SLIST1 }, {"SLIST1", VOICE_ID_INVALID, MENU_SLIST1 },
{"SLIST2", VOICE_ID_INVALID, MENU_SLIST2 }, {"SLIST2", VOICE_ID_INVALID, MENU_SLIST2 },
#ifdef ENABLE_ALARM #ifdef ENABLE_ALARM
"AL-MOD", VOICE_ID_INVALID, MENU_AL_MOD }, {"AL-MOD", VOICE_ID_INVALID, MENU_AL_MOD },
#endif #endif
{"ANI-ID", VOICE_ID_ANI_CODE, MENU_ANI_ID }, {"ANI-ID", VOICE_ID_ANI_CODE, MENU_ANI_ID },
{"UPCODE", VOICE_ID_INVALID, MENU_UPCODE }, {"UPCODE", VOICE_ID_INVALID, MENU_UPCODE },