CW h/w ptt

* allow disabling CAT ptt when using external
    CW keyer such as nanoIO.
This commit is contained in:
David Freese 2019-02-18 20:54:21 -06:00
parent ca3e777105
commit 1d4798c83f
5 changed files with 39 additions and 11 deletions

View file

@ -3723,6 +3723,13 @@ set_nanoIO_keyer(o->index());
progdefaults.changed = true;
}
Fl_Check_Button *btn_disable_CW_PTT=(Fl_Check_Button *)0;
static void cb_btn_disable_CW_PTT(Fl_Check_Button* o, void*) {
progdefaults.disable_CW_PTT=o->value();
progdefaults.changed=true;
}
Fl_Group *tabDomEX=(Fl_Group *)0;
Fl_Input2 *txtSecondary=(Fl_Input2 *)0;
@ -8194,6 +8201,7 @@ Fl_Double_Window* ConfigureDialog() {
{ tabOperator = new Fl_Group(0, 25, 600, 365, _("Operator"));
tabOperator->callback((Fl_Callback*)cb_tabOperator);
tabOperator->when(FL_WHEN_CHANGED);
tabOperator->hide();
{ Fl_Group* o = new Fl_Group(5, 35, 590, 285, _("Station / Operator"));
o->box(FL_ENGRAVED_FRAME);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
@ -10371,16 +10379,15 @@ i on a\ntouch screen device such as a tablet."));
tabWaterfall->end();
} // Fl_Group* tabWaterfall
{ tabModems = new Fl_Group(0, 25, 609, 365, _("Modems"));
tabModems->hide();
{ tabsModems = new Fl_Tabs(0, 25, 609, 365);
tabsModems->selection_color(FL_LIGHT1);
tabsModems->align(Fl_Align(FL_ALIGN_TOP_RIGHT));
{ tabCW = new Fl_Group(0, 50, 600, 340, _("CW"));
tabCW->hide();
{ tabsCW = new Fl_Tabs(0, 50, 600, 340);
tabsCW->selection_color(FL_LIGHT1);
{ tabsCW_general = new Fl_Group(0, 75, 600, 315, _("General"));
tabsCW_general->align(Fl_Align(FL_ALIGN_TOP_LEFT));
tabsCW_general->hide();
{ Fl_Group* o = new Fl_Group(35, 85, 530, 130, _("Receive"));
o->box(FL_ENGRAVED_FRAME);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
@ -11355,7 +11362,6 @@ ded Morse characters."));
} // Fl_Group* tabsCW_ext_chars
{ tab_nanoCW = new Fl_Group(0, 75, 600, 315, _("nanoCW"));
tab_nanoCW->align(Fl_Align(FL_ALIGN_TOP_LEFT));
tab_nanoCW->hide();
{ Fl_ComboBox* o = select_nanoCW_CommPort = new Fl_ComboBox(86, 85, 420, 23, _("Ser. Port"));
select_nanoCW_CommPort->tooltip(_("nanoIO serial port"));
select_nanoCW_CommPort->box(FL_DOWN_BOX);
@ -11467,6 +11473,12 @@ ded Morse characters."));
o->index(progdefaults.nanoIO_CW_keyer);
listbox_nano_keyer->end();
} // Fl_ListBox* listbox_nano_keyer
{ Fl_Check_Button* o = btn_disable_CW_PTT = new Fl_Check_Button(387, 145, 70, 15, _("disable PTT"));
btn_disable_CW_PTT->tooltip(_("Do not send CAT PTT signal"));
btn_disable_CW_PTT->down_box(FL_DOWN_BOX);
btn_disable_CW_PTT->callback((Fl_Callback*)cb_btn_disable_CW_PTT);
o->value(progdefaults.disable_CW_PTT);
} // Fl_Check_Button* btn_disable_CW_PTT
tab_nanoCW->end();
} // Fl_Group* tab_nanoCW
tabsCW->end();
@ -12393,6 +12405,7 @@ ded Morse characters."));
tabPSK->end();
} // Fl_Group* tabPSK
{ tabRTTY = new Fl_Group(0, 50, 609, 340, _("TTY"));
tabRTTY->hide();
{ tabsRTTY = new Fl_Tabs(0, 50, 609, 340);
tabsRTTY->selection_color(FL_LIGHT1);
{ tab_Rx_TTY = new Fl_Group(0, 75, 600, 315, _("Rx"));

View file

@ -439,8 +439,8 @@ static const char szProsigns[] = "~|%|&|+|=|{|}|<|>|[|]| ";} {}
} {
Fl_Group tabOperator {
label Operator
callback {progdefaults.changed = true;} open selected
xywh {0 25 600 365} when 1
callback {progdefaults.changed = true;} open
xywh {0 25 600 365} when 1 hide
} {
Fl_Group {} {
label {Station / Operator} open
@ -3577,21 +3577,21 @@ progdefaults.changed = true;}
}
Fl_Group tabModems {
label Modems open
xywh {0 25 609 365} hide
xywh {0 25 609 365}
} {
Fl_Tabs tabsModems {open
xywh {0 25 609 365} selection_color 50 align 9
} {
Fl_Group tabCW {
label CW open
xywh {0 50 600 340} hide
xywh {0 50 600 340}
} {
Fl_Tabs tabsCW {open
xywh {0 50 600 340} selection_color 50
} {
Fl_Group tabsCW_general {
label General
xywh {0 75 600 315} align 5
xywh {0 75 600 315} align 5 hide
} {
Fl_Group {} {
label Receive open
@ -4507,8 +4507,8 @@ for information regarding extended Morse characters.} open
}
}
Fl_Group tab_nanoCW {
label nanoCW
xywh {0 75 600 315} align 5 hide
label nanoCW selected
xywh {0 75 600 315} align 5
} {
Fl_Group select_nanoCW_CommPort {
label {Ser. Port}
@ -4598,6 +4598,13 @@ progdefaults.changed = true;} open
code1 {o->index(progdefaults.nanoIO_CW_keyer);}
class Fl_ListBox
} {}
Fl_Check_Button btn_disable_CW_PTT {
label {disable PTT}
callback {progdefaults.disable_CW_PTT=o->value();
progdefaults.changed=true;}
tooltip {Do not send CAT PTT signal} xywh {387 145 70 15} down_box DOWN_BOX
code0 {o->value(progdefaults.disable_CW_PTT);}
}
}
}
}
@ -5515,7 +5522,7 @@ progdefaults.changed = true;}
}
Fl_Group tabRTTY {
label TTY open
xywh {0 50 609 340}
xywh {0 50 609 340} hide
} {
Fl_Tabs tabsRTTY {open
xywh {0 50 609 340} selection_color 50

View file

@ -427,6 +427,7 @@ extern Fl_Button *btn_cwfsk_save;
extern Fl_Button *btn_cwfsk_query;
extern Fl_ListBox *listbox_incr;
extern Fl_ListBox *listbox_nano_keyer;
extern Fl_Check_Button *btn_disable_CW_PTT;
extern Fl_Group *tabDomEX;
extern Fl_Input2 *txtSecondary;
extern Fl_Check_Button *valDominoEX_FILTER;

View file

@ -1334,6 +1334,9 @@
ELEM_(int, nanoIO_CW_keyer, "NANOIOCWKEYER", \
"0 - IambicA, 1 - IambicB, 2 - Straight", \
0) \
ELEM_(bool, disable_CW_PTT, "disable_CW_PTT", \
"Disable CAT PTT signal during CW ops with expernal h/w", \
0) \
/* TTY h/w interface */ \
ELEM_(int, xcvr_FSK_sideband, "XCVRFSKSIDEBAND", \
"0 = LSB | 1 = USB", \

View file

@ -179,6 +179,10 @@ void exec_flrig_ptt() {
}
void set_flrig_ptt(int on) {
if (progdefaults.disable_CW_PTT &&
active_modem->get_mode() == MODE_CW &&
progStatus.nanoCW_online)
return;
guard_lock flrig_lock(&mutex_flrig);
new_ptt = on;
}