kopia lustrzana https://github.com/OpenRTX/OpenRTX
Disable CTCSS tones in M17 mode
Removed CTCSS modulation for M17 mode, removed FM analog specific settings in macro menu such as tone selection, tone enable and tx bandwidth.replace/59dab1a761353a48b49a583e712910e0230e0ac7
rodzic
dc346497d0
commit
65a632054a
|
@ -649,12 +649,17 @@ void _ui_fsm_menuMacro(kbd_msg_t msg, bool *sync_rtx) {
|
||||||
switch(ui_state.input_number)
|
switch(ui_state.input_number)
|
||||||
{
|
{
|
||||||
case 1:
|
case 1:
|
||||||
|
if(state.channel.mode == FM)
|
||||||
|
{
|
||||||
state.channel.fm.txTone++;
|
state.channel.fm.txTone++;
|
||||||
state.channel.fm.txTone %= MAX_TONE_INDEX;
|
state.channel.fm.txTone %= MAX_TONE_INDEX;
|
||||||
state.channel.fm.rxTone = state.channel.fm.txTone;
|
state.channel.fm.rxTone = state.channel.fm.txTone;
|
||||||
*sync_rtx = true;
|
*sync_rtx = true;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
|
if(state.channel.mode == FM)
|
||||||
|
{
|
||||||
tone_flags++;
|
tone_flags++;
|
||||||
tone_flags %= 4;
|
tone_flags %= 4;
|
||||||
tone_tx_enable = tone_flags >> 1;
|
tone_tx_enable = tone_flags >> 1;
|
||||||
|
@ -662,6 +667,7 @@ void _ui_fsm_menuMacro(kbd_msg_t msg, bool *sync_rtx) {
|
||||||
state.channel.fm.txToneEn = tone_tx_enable;
|
state.channel.fm.txToneEn = tone_tx_enable;
|
||||||
state.channel.fm.rxToneEn = tone_rx_enable;
|
state.channel.fm.rxToneEn = tone_rx_enable;
|
||||||
*sync_rtx = true;
|
*sync_rtx = true;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
if (state.channel.power == 1.0f)
|
if (state.channel.power == 1.0f)
|
||||||
|
@ -671,9 +677,12 @@ void _ui_fsm_menuMacro(kbd_msg_t msg, bool *sync_rtx) {
|
||||||
*sync_rtx = true;
|
*sync_rtx = true;
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
|
if(state.channel.mode == FM)
|
||||||
|
{
|
||||||
state.channel.bandwidth++;
|
state.channel.bandwidth++;
|
||||||
state.channel.bandwidth %= 3;
|
state.channel.bandwidth %= 3;
|
||||||
*sync_rtx = true;
|
*sync_rtx = true;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
// Cycle through radio modes
|
// Cycle through radio modes
|
||||||
|
|
|
@ -550,11 +550,21 @@ bool _ui_drawMacroMenu() {
|
||||||
// First row
|
// First row
|
||||||
gfx_print(layout.line1_pos, layout.top_font, TEXT_ALIGN_LEFT,
|
gfx_print(layout.line1_pos, layout.top_font, TEXT_ALIGN_LEFT,
|
||||||
yellow_fab413, "1");
|
yellow_fab413, "1");
|
||||||
|
if (last_state.channel.mode == FM)
|
||||||
|
{
|
||||||
gfx_print(layout.line1_pos, layout.top_font, TEXT_ALIGN_LEFT,
|
gfx_print(layout.line1_pos, layout.top_font, TEXT_ALIGN_LEFT,
|
||||||
color_white, " %6.1f",
|
color_white, " %6.1f",
|
||||||
ctcss_tone[last_state.channel.fm.txTone]/10.0f);
|
ctcss_tone[last_state.channel.fm.txTone]/10.0f);
|
||||||
|
}
|
||||||
|
else if (last_state.channel.mode == M17)
|
||||||
|
{
|
||||||
|
gfx_print(layout.line1_pos, layout.top_font, TEXT_ALIGN_LEFT,
|
||||||
|
color_white, " ");
|
||||||
|
}
|
||||||
gfx_print(layout.line1_pos, layout.top_font, TEXT_ALIGN_CENTER,
|
gfx_print(layout.line1_pos, layout.top_font, TEXT_ALIGN_CENTER,
|
||||||
yellow_fab413, "2 ");
|
yellow_fab413, "2 ");
|
||||||
|
if (last_state.channel.mode == FM)
|
||||||
|
{
|
||||||
char encdec_str[9] = { 0 };
|
char encdec_str[9] = { 0 };
|
||||||
bool tone_tx_enable = last_state.channel.fm.txToneEn;
|
bool tone_tx_enable = last_state.channel.fm.txToneEn;
|
||||||
bool tone_rx_enable = last_state.channel.fm.rxToneEn;
|
bool tone_rx_enable = last_state.channel.fm.rxToneEn;
|
||||||
|
@ -568,6 +578,13 @@ bool _ui_drawMacroMenu() {
|
||||||
snprintf(encdec_str, 9, " ");
|
snprintf(encdec_str, 9, " ");
|
||||||
gfx_print(layout.line1_pos, layout.top_font, TEXT_ALIGN_CENTER,
|
gfx_print(layout.line1_pos, layout.top_font, TEXT_ALIGN_CENTER,
|
||||||
color_white, encdec_str);
|
color_white, encdec_str);
|
||||||
|
}
|
||||||
|
else if (last_state.channel.mode == M17)
|
||||||
|
{
|
||||||
|
char encdec_str[9] = " ";
|
||||||
|
gfx_print(layout.line1_pos, layout.top_font, TEXT_ALIGN_CENTER,
|
||||||
|
color_white, encdec_str);
|
||||||
|
}
|
||||||
gfx_print(layout.line1_pos, layout.top_font, TEXT_ALIGN_RIGHT,
|
gfx_print(layout.line1_pos, layout.top_font, TEXT_ALIGN_RIGHT,
|
||||||
yellow_fab413, "3 ");
|
yellow_fab413, "3 ");
|
||||||
gfx_print(layout.line1_pos, layout.top_font, TEXT_ALIGN_RIGHT,
|
gfx_print(layout.line1_pos, layout.top_font, TEXT_ALIGN_RIGHT,
|
||||||
|
@ -578,6 +595,8 @@ bool _ui_drawMacroMenu() {
|
||||||
(layout.line3_pos.y - layout.line1_pos.y)/2};
|
(layout.line3_pos.y - layout.line1_pos.y)/2};
|
||||||
gfx_print(pos_2, layout.top_font, TEXT_ALIGN_LEFT,
|
gfx_print(pos_2, layout.top_font, TEXT_ALIGN_LEFT,
|
||||||
yellow_fab413, "4");
|
yellow_fab413, "4");
|
||||||
|
if (last_state.channel.mode == FM)
|
||||||
|
{
|
||||||
char bw_str[8] = { 0 };
|
char bw_str[8] = { 0 };
|
||||||
switch (last_state.channel.bandwidth)
|
switch (last_state.channel.bandwidth)
|
||||||
{
|
{
|
||||||
|
@ -593,6 +612,13 @@ bool _ui_drawMacroMenu() {
|
||||||
}
|
}
|
||||||
gfx_print(pos_2, layout.top_font, TEXT_ALIGN_LEFT,
|
gfx_print(pos_2, layout.top_font, TEXT_ALIGN_LEFT,
|
||||||
color_white, bw_str);
|
color_white, bw_str);
|
||||||
|
}
|
||||||
|
else if (last_state.channel.mode == M17)
|
||||||
|
{
|
||||||
|
gfx_print(pos_2, layout.top_font, TEXT_ALIGN_LEFT,
|
||||||
|
color_white, " ");
|
||||||
|
|
||||||
|
}
|
||||||
gfx_print(pos_2, layout.top_font, TEXT_ALIGN_CENTER,
|
gfx_print(pos_2, layout.top_font, TEXT_ALIGN_CENTER,
|
||||||
yellow_fab413, "5 ");
|
yellow_fab413, "5 ");
|
||||||
char mode_str[9] = "";
|
char mode_str[9] = "";
|
||||||
|
|
|
@ -300,7 +300,7 @@ void radio_enableTx()
|
||||||
|
|
||||||
gpio_setPin(TX_STG_EN); // Enable TX PA
|
gpio_setPin(TX_STG_EN); // Enable TX PA
|
||||||
|
|
||||||
if(config->txToneEn == 1)
|
if(config->opMode == FM && config->txToneEn == 1)
|
||||||
{
|
{
|
||||||
toneGen_toneOn(); // Enable CTSS
|
toneGen_toneOn(); // Enable CTSS
|
||||||
}
|
}
|
||||||
|
|
|
@ -222,7 +222,7 @@ void radio_enableTx()
|
||||||
|
|
||||||
gpio_setPin(PA_EN_2);
|
gpio_setPin(PA_EN_2);
|
||||||
|
|
||||||
if(config->txToneEn)
|
if(config.opMode == FM && config->txToneEn)
|
||||||
{
|
{
|
||||||
at1846s.enableTxCtcss(config->txTone);
|
at1846s.enableTxCtcss(config->txTone);
|
||||||
}
|
}
|
||||||
|
|
Ładowanie…
Reference in New Issue