24 user buttons

* Increase number of user defined buttons to 24
This commit is contained in:
David Freese 2020-10-27 11:12:18 -05:00
parent c735fb253d
commit 9b35358fb6
8 changed files with 428 additions and 45 deletions

View file

@ -260,6 +260,16 @@ Fl_Button *btnUser14 = (Fl_Button*)0;
Fl_Button *btnUser15 = (Fl_Button*)0;
Fl_Button *btnUser16 = (Fl_Button*)0;
Fl_Group *genericUser_3 = (Fl_Group *)0;
Fl_Button *btnUser17 = (Fl_Button*)0;
Fl_Button *btnUser18 = (Fl_Button*)0;
Fl_Button *btnUser19 = (Fl_Button*)0;
Fl_Button *btnUser20 = (Fl_Button*)0;
Fl_Button *btnUser21 = (Fl_Button*)0;
Fl_Button *btnUser22 = (Fl_Button*)0;
Fl_Button *btnUser23 = (Fl_Button*)0;
Fl_Button *btnUser24 = (Fl_Button*)0;
Fl_Group *genericRXB = (Fl_Group *)0;
Hspinner *cntRIT = (Hspinner *)0;
Hspinner *cntXIT = (Hspinner *)0;
@ -826,6 +836,14 @@ static void cb_btnUser( Fl_Button * o, void *d) {
case 14: cb_send_command(progStatus.shftcmd14, cmdResponse); break;
case 15: cb_send_command(progStatus.shftcmd15, cmdResponse); break;
case 16: cb_send_command(progStatus.shftcmd16, cmdResponse); break;
case 17: cb_send_command(progStatus.shftcmd17, cmdResponse); break;
case 18: cb_send_command(progStatus.shftcmd18, cmdResponse); break;
case 19: cb_send_command(progStatus.shftcmd19, cmdResponse); break;
case 20: cb_send_command(progStatus.shftcmd20, cmdResponse); break;
case 21: cb_send_command(progStatus.shftcmd21, cmdResponse); break;
case 22: cb_send_command(progStatus.shftcmd22, cmdResponse); break;
case 23: cb_send_command(progStatus.shftcmd23, cmdResponse); break;
case 24: cb_send_command(progStatus.shftcmd24, cmdResponse); break;
}
} else {
switch (val) {
@ -845,6 +863,14 @@ static void cb_btnUser( Fl_Button * o, void *d) {
case 14: cb_send_command(progStatus.command14, cmdResponse); break;
case 15: cb_send_command(progStatus.command15, cmdResponse); break;
case 16: cb_send_command(progStatus.command16, cmdResponse); break;
case 17: cb_send_command(progStatus.command17, cmdResponse); break;
case 18: cb_send_command(progStatus.command18, cmdResponse); break;
case 19: cb_send_command(progStatus.command19, cmdResponse); break;
case 20: cb_send_command(progStatus.command20, cmdResponse); break;
case 21: cb_send_command(progStatus.command21, cmdResponse); break;
case 22: cb_send_command(progStatus.command22, cmdResponse); break;
case 23: cb_send_command(progStatus.command23, cmdResponse); break;
case 24: cb_send_command(progStatus.command24, cmdResponse); break;
}
}
}

View file

@ -1057,7 +1057,7 @@ Fl_Double_Window *tabs_window()
tabsGeneric = new Fl_Tabs(0, 0, small_mainW, gph);
tabsGeneric->selection_color(FL_LIGHT1);
tab_yaesu_bands = new Fl_Group(0, 24, small_mainW, gph - 24, _("Bands"));
tab_yaesu_bands = new Fl_Group(0, 24, small_mainW, gph - 24, _("Band"));
btn_yaesu_select_1 = new Fl_Button(4, 40, 60, 18, _("1.8"));
btn_yaesu_select_1->tooltip(_("160m Band"));
btn_yaesu_select_1->color((Fl_Color)246);
@ -1131,7 +1131,7 @@ Fl_Double_Window *tabs_window()
tab_yaesu_bands->end();
tab_FT8n_bands = new Fl_Group(0, 24, small_mainW, gph - 24, _("Bands"));
tab_FT8n_bands = new Fl_Group(0, 24, small_mainW, gph - 24, _("Band"));
static const char setsave[] = _("Left click - set\nRight click - save");
btn_FT8n_select_1 = new Fl_Button(4, 30, 60, 18, _("1.8"));
btn_FT8n_select_1->tooltip(setsave);
@ -1229,7 +1229,7 @@ Fl_Double_Window *tabs_window()
tab_FT8n_CTCSS->end();
tab_icom_bands = new Fl_Group(0, 24, small_mainW, gph - 24, _("Bands"));
tab_icom_bands = new Fl_Group(0, 24, small_mainW, gph - 24, _("Band"));
btn_icom_select_1 = new Fl_Button(4, 30, 60, 18, _("1.8"));
btn_icom_select_1->tooltip(_("Left click - get\nRight click - set"));
btn_icom_select_1->color((Fl_Color)246);
@ -1581,7 +1581,7 @@ Fl_Double_Window *tabs_window()
genericMisc->end();
genericUser_1 = new Fl_Group(0, 24, small_mainW, gph - 24, _("User A"));
genericUser_1 = new Fl_Group(0, 24, small_mainW, gph - 24, _("Cmd A"));
btnUser1 = new Fl_Button(5, genericUser_1->y() + 12, 100, 20, "USER 1");
btnUser1->callback((Fl_Callback*)cb_btnUser, (void*)1);
@ -1608,7 +1608,7 @@ Fl_Double_Window *tabs_window()
genericUser_1->end();
genericUser_2 = new Fl_Group(0, 24, small_mainW, gph - 24, _("User B"));
genericUser_2 = new Fl_Group(0, 24, small_mainW, gph - 24, _("Cmd B"));
btnUser9 = new Fl_Button(5, genericUser_2->y() + 12, 100, 20, "USER 9");
btnUser9->callback((Fl_Callback*)cb_btnUser, (void*)9);
@ -1635,6 +1635,33 @@ Fl_Double_Window *tabs_window()
genericUser_2->end();
genericUser_3 = new Fl_Group(0, 24, small_mainW, gph - 24, _("Cmd C"));
btnUser17 = new Fl_Button(5, genericUser_3->y() + 12, 100, 20, "USER 1");
btnUser17->callback((Fl_Callback*)cb_btnUser, (void*)1);
btnUser18 = new Fl_Button(110, genericUser_3->y() + 12, 100, 20, "USER 2");
btnUser18->callback((Fl_Callback*)cb_btnUser, (void*)2);
btnUser19 = new Fl_Button(215, genericUser_3->y() + 12, 100, 20, "USER 3");
btnUser19->callback((Fl_Callback*)cb_btnUser, (void*)3);
btnUser20 = new Fl_Button(320, genericUser_3->y() + 12, 100, 20, "USER 4");
btnUser20->callback((Fl_Callback*)cb_btnUser, (void*)4);
btnUser21 = new Fl_Button(5, genericUser_3->y() + 36, 100, 20, "USER 5");
btnUser21->callback((Fl_Callback*)cb_btnUser, (void*)5);
btnUser22 = new Fl_Button(110, genericUser_3->y() + 36, 100, 20, "USER 6");
btnUser22->callback((Fl_Callback*)cb_btnUser, (void*)6);
btnUser23 = new Fl_Button(215, genericUser_3->y() + 36, 100, 20, "USER 7");
btnUser23->callback((Fl_Callback*)cb_btnUser, (void*)7);
btnUser24 = new Fl_Button(320, genericUser_3->y() + 36, 100, 20, "USER 8");
btnUser24->callback((Fl_Callback*)cb_btnUser, (void*)8);
genericUser_3->end();
tab7610 = new Fl_Group(0, 24, small_mainW, gph - 24, _("IC7610"));
ic7610att = new Fl_ComboBox(5, tab7610->y() + 10, 70, 20, "Att level");
ic7610att->add("OFF|3db|6db|9db|12db|15db|18db|21db|24db|27db|30db|33db|36db|39db|42db|45db|");
@ -1671,7 +1698,7 @@ Fl_Double_Window *tabs_window()
tab7610->end();
tabsGeneric->resizable(genericUser_2);
tabsGeneric->resizable(genericUser_3);
tabsGeneric->end();
grpTABS->end();

View file

@ -802,7 +802,7 @@ Fl_Group *touch_main_group(int X, int Y, int W, int H)
tabsGeneric->selection_color(FL_LIGHT1);
tab_yaesu_bands = new Fl_Group(xpos, ypos+tabh, W, tabb, _("Bands"));
tab_yaesu_bands = new Fl_Group(xpos, ypos+tabh, W, tabb, _("Band"));
btn_yaesu_select_1 = new Fl_Button(xpos+4, by, 50, bh, _("1.8"));
btn_yaesu_select_1->tooltip(_("160m Band"));
@ -877,7 +877,7 @@ Fl_Group *touch_main_group(int X, int Y, int W, int H)
tab_yaesu_bands->end();
tab_FT8n_bands = new Fl_Group(xpos, ypos+tabh, W, tabb, _("Bands"));
tab_FT8n_bands = new Fl_Group(xpos, ypos+tabh, W, tabb, _("Band"));
static const char setsave[] = _("Left click - set\nRight click - save");
btn_FT8n_select_1 = new Fl_Button(xpos+4, by, 50, bh, _("1.8"));
btn_FT8n_select_1->tooltip(setsave);
@ -981,7 +981,7 @@ Fl_Group *touch_main_group(int X, int Y, int W, int H)
tab_FT8n_CTCSS->end();
tab_icom_bands = new Fl_Group(xpos, ypos+tabh, W, tabb, _("Bands"));
tab_icom_bands = new Fl_Group(xpos, ypos+tabh, W, tabb, _("Band"));
btn_icom_select_1 = new Fl_Button(xpos+4, by, 50, bh, _("1.8"));
btn_icom_select_1->tooltip(_("Left click - get\nRight click - set"));
@ -1419,7 +1419,7 @@ Fl_Group *touch_main_group(int X, int Y, int W, int H)
genericAux->end();
genericUser_1 = new Fl_Group(xpos, ypos+tabh, W, tabb, _("User A"));
genericUser_1 = new Fl_Group(xpos, ypos+tabh, W, tabb, _("Cmd A"));
genericUser_1->hide();
btnUser1 = new Fl_Button(5, by, 80, 50, "USER 1");
@ -1448,7 +1448,7 @@ Fl_Group *touch_main_group(int X, int Y, int W, int H)
genericUser_1->end();
genericUser_2 = new Fl_Group(xpos, ypos+tabh, W, tabb, _("User B"));
genericUser_2 = new Fl_Group(xpos, ypos+tabh, W, tabb, _("Cmd B"));
genericUser_2->hide();
btnUser9 = new Fl_Button(5, by, 80, 50, "USER 9");
@ -1477,6 +1477,35 @@ Fl_Group *touch_main_group(int X, int Y, int W, int H)
genericUser_2->end();
genericUser_3 = new Fl_Group(xpos, ypos+tabh, W, tabb, _("Cmd C"));
genericUser_3->hide();
btnUser17 = new Fl_Button(5, by, 80, 50, "USER 9");
btnUser17->callback((Fl_Callback*)cb_btnUser, (void*)9);
btnUser18 = new Fl_Button(90, by, 80, 50, "USER 10");
btnUser18->callback((Fl_Callback*)cb_btnUser, (void*)10);
btnUser19 = new Fl_Button(175, by, 80, 50, "USER 11");
btnUser19->callback((Fl_Callback*)cb_btnUser, (void*)11);
btnUser20 = new Fl_Button(260, by, 80, 50, "USER 12");
btnUser20->callback((Fl_Callback*)cb_btnUser, (void*)12);
btnUser21 = new Fl_Button(345, by, 80, 50, "USER 13");
btnUser21->callback((Fl_Callback*)cb_btnUser, (void*)13);
btnUser22 = new Fl_Button(430, by, 80, 50, "USER 14");
btnUser22->callback((Fl_Callback*)cb_btnUser, (void*)14);
btnUser23 = new Fl_Button(515, by, 80, 50, "USER 15");
btnUser23->callback((Fl_Callback*)cb_btnUser, (void*)15);
btnUser24 = new Fl_Button(600, by, 80, 50, "USER 16");
btnUser24->callback((Fl_Callback*)cb_btnUser, (void*)16);
genericUser_3->end();
tab7610 = new Fl_Group(xpos, ypos+tabh, W, tabb, _("IC7610"));
ic7610att = new Fl_ComboBox(5, by, 120, 50, "Att level");
ic7610att->add("OFF|3db|6db|9db|12db|15db|18db|21db|24db|27db|30db|33db|36db|39db|42db|45db|");

View file

@ -147,6 +147,8 @@ Fl_Group *tabCOMMANDS = (Fl_Group *)0;
Fl_Group *tabCmds2 = (Fl_Group *)0;
Fl_Group *tabCmds3 = (Fl_Group *)0;
Fl_Group *tabCmds4 = (Fl_Group *)0;
Fl_Group *tabCmds5 = (Fl_Group *)0;
Fl_Group *tabCmds6 = (Fl_Group *)0;
Fl_Box *bx1a = (Fl_Box *)0;
Fl_Box *bx1b = (Fl_Box *)0;
@ -156,6 +158,10 @@ Fl_Group *tabCOMMANDS = (Fl_Group *)0;
Fl_Box *bx3b = (Fl_Box *)0;
Fl_Box *bx4a = (Fl_Box *)0;
Fl_Box *bx4b = (Fl_Box *)0;
Fl_Box *bx5a = (Fl_Box *)0;
Fl_Box *bx5b = (Fl_Box *)0;
Fl_Box *bx6a = (Fl_Box *)0;
Fl_Box *bx6b = (Fl_Box *)0;
Fl_Input2 * cmdlbl1 = (Fl_Input2 *)0;
Fl_Input2 * cmdlbl2 = (Fl_Input2 *)0;
@ -173,6 +179,14 @@ Fl_Group *tabCOMMANDS = (Fl_Group *)0;
Fl_Input2 * cmdlbl14 = (Fl_Input2 *)0;
Fl_Input2 * cmdlbl15 = (Fl_Input2 *)0;
Fl_Input2 * cmdlbl16 = (Fl_Input2 *)0;
Fl_Input2 * cmdlbl17 = (Fl_Input2 *)0;
Fl_Input2 * cmdlbl18 = (Fl_Input2 *)0;
Fl_Input2 * cmdlbl19 = (Fl_Input2 *)0;
Fl_Input2 * cmdlbl20 = (Fl_Input2 *)0;
Fl_Input2 * cmdlbl21 = (Fl_Input2 *)0;
Fl_Input2 * cmdlbl22 = (Fl_Input2 *)0;
Fl_Input2 * cmdlbl23 = (Fl_Input2 *)0;
Fl_Input2 * cmdlbl24 = (Fl_Input2 *)0;
Fl_Input2 * cmdtext1 = (Fl_Input2 *)0;
Fl_Input2 * cmdtext2 = (Fl_Input2 *)0;
@ -190,6 +204,14 @@ Fl_Group *tabCOMMANDS = (Fl_Group *)0;
Fl_Input2 * cmdtext14 = (Fl_Input2 *)0;
Fl_Input2 * cmdtext15 = (Fl_Input2 *)0;
Fl_Input2 * cmdtext16 = (Fl_Input2 *)0;
Fl_Input2 * cmdtext17 = (Fl_Input2 *)0;
Fl_Input2 * cmdtext18 = (Fl_Input2 *)0;
Fl_Input2 * cmdtext19 = (Fl_Input2 *)0;
Fl_Input2 * cmdtext20 = (Fl_Input2 *)0;
Fl_Input2 * cmdtext21 = (Fl_Input2 *)0;
Fl_Input2 * cmdtext22 = (Fl_Input2 *)0;
Fl_Input2 * cmdtext23 = (Fl_Input2 *)0;
Fl_Input2 * cmdtext24 = (Fl_Input2 *)0;
Fl_Input2 * shftcmdtext1 = (Fl_Input2 *)0;
Fl_Input2 * shftcmdtext2 = (Fl_Input2 *)0;
@ -207,6 +229,14 @@ Fl_Group *tabCOMMANDS = (Fl_Group *)0;
Fl_Input2 * shftcmdtext14 = (Fl_Input2 *)0;
Fl_Input2 * shftcmdtext15 = (Fl_Input2 *)0;
Fl_Input2 * shftcmdtext16 = (Fl_Input2 *)0;
Fl_Input2 * shftcmdtext17= (Fl_Input2 *)0;
Fl_Input2 * shftcmdtext18 = (Fl_Input2 *)0;
Fl_Input2 * shftcmdtext19 = (Fl_Input2 *)0;
Fl_Input2 * shftcmdtext20 = (Fl_Input2 *)0;
Fl_Input2 * shftcmdtext21 = (Fl_Input2 *)0;
Fl_Input2 * shftcmdtext22 = (Fl_Input2 *)0;
Fl_Input2 * shftcmdtext23 = (Fl_Input2 *)0;
Fl_Input2 * shftcmdtext24 = (Fl_Input2 *)0;
Fl_Output * cmdResponse = (Fl_Output *)0;
@ -713,10 +743,18 @@ static void cb_cmdlbl(Fl_Input2 *o, void *d) {
{ &progStatus.label13, btnUser13 },
{ &progStatus.label14, btnUser14 },
{ &progStatus.label15, btnUser15 },
{ &progStatus.label16, btnUser16 } };
{ &progStatus.label16, btnUser16 },
{ &progStatus.label17, btnUser17 },
{ &progStatus.label18, btnUser18 },
{ &progStatus.label19, btnUser19 },
{ &progStatus.label20, btnUser20 },
{ &progStatus.label21, btnUser21 },
{ &progStatus.label22, btnUser22 },
{ &progStatus.label23, btnUser23 },
{ &progStatus.label24, btnUser24 } };
if (val < 0) val = 0;
if (val > 15) val = 15;
if (val > 23) val = 23;
*bpairs[val].plbl = o->value();
bpairs[val].b->label(o->value());
@ -733,9 +771,13 @@ static void cb_cmdtext(Fl_Input2 *o, void *d) {
&progStatus.command9, &progStatus.command10,
&progStatus.command11, &progStatus.command12,
&progStatus.command13, &progStatus.command14,
&progStatus.command15, &progStatus.command16 };
&progStatus.command15, &progStatus.command16,
&progStatus.command17, &progStatus.command18,
&progStatus.command19, &progStatus.command20,
&progStatus.command21, &progStatus.command22,
&progStatus.command23, &progStatus.command24 };
if (val < 0) val = 0;
if (val > 15) val = 15;
if (val > 23) val = 23;
*cmd[val] = o->value();
}
@ -750,9 +792,13 @@ static void cb_shftcmdtext(Fl_Input2 *o, void *d) {
&progStatus.shftcmd9, &progStatus.shftcmd10,
&progStatus.shftcmd11, &progStatus.shftcmd12,
&progStatus.shftcmd13, &progStatus.shftcmd14,
&progStatus.shftcmd15, &progStatus.shftcmd16 };
&progStatus.shftcmd15, &progStatus.shftcmd16,
&progStatus.shftcmd17, &progStatus.shftcmd18,
&progStatus.shftcmd19, &progStatus.shftcmd20,
&progStatus.shftcmd21, &progStatus.shftcmd22,
&progStatus.shftcmd23, &progStatus.shftcmd24 };
if (val < 0) val = 0;
if (val > 15) val = 15;
if (val > 23) val = 23;
*cmd[val] = o->value();
}
@ -1733,46 +1779,64 @@ Fl_Group *createCOMMANDS(int X, int Y, int W, int H, const char *label)
Fl_Tabs *tabCmds = new Fl_Tabs(X, Y, W, H - 25);
std::string *cmdlbls[] = {
&progStatus.label1, &progStatus.label2, &progStatus.label3, &progStatus.label4,
&progStatus.label5, &progStatus.label6, &progStatus.label7, &progStatus.label8,
&progStatus.label9, &progStatus.label10, &progStatus.label11, &progStatus.label12,
&progStatus.label13, &progStatus.label14, &progStatus.label15, &progStatus.label16 };
&progStatus.label1, &progStatus.label2, &progStatus.label3, &progStatus.label4,
&progStatus.label5, &progStatus.label6, &progStatus.label7, &progStatus.label8,
&progStatus.label9, &progStatus.label10, &progStatus.label11, &progStatus.label12,
&progStatus.label13, &progStatus.label14, &progStatus.label15, &progStatus.label16,
&progStatus.label17, &progStatus.label18, &progStatus.label19, &progStatus.label20,
&progStatus.label21, &progStatus.label22, &progStatus.label23, &progStatus.label24
};
Fl_Input2 *cmdbtns[] = {
cmdlbl1, cmdlbl2, cmdlbl3, cmdlbl4,
cmdlbl5, cmdlbl6, cmdlbl7, cmdlbl8,
cmdlbl9, cmdlbl10, cmdlbl11, cmdlbl12,
cmdlbl13, cmdlbl14, cmdlbl15, cmdlbl16 };
cmdlbl1, cmdlbl2, cmdlbl3, cmdlbl4,
cmdlbl5, cmdlbl6, cmdlbl7, cmdlbl8,
cmdlbl9, cmdlbl10, cmdlbl11, cmdlbl12,
cmdlbl13, cmdlbl14, cmdlbl15, cmdlbl16,
cmdlbl17, cmdlbl18, cmdlbl19, cmdlbl20,
cmdlbl21, cmdlbl22, cmdlbl23, cmdlbl24
};
Fl_Input2 *cmdtexts[] = {
cmdtext1, cmdtext2, cmdtext3, cmdtext4,
cmdtext1, cmdtext2, cmdtext3, cmdtext4,
cmdtext5, cmdtext6, cmdtext7, cmdtext8,
cmdtext9, cmdtext10, cmdtext11, cmdtext12,
cmdtext13, cmdtext14, cmdtext15, cmdtext16 };
cmdtext9, cmdtext10, cmdtext11, cmdtext12,
cmdtext13, cmdtext14, cmdtext15, cmdtext16,
cmdtext17, cmdtext18, cmdtext19, cmdtext20,
cmdtext21, cmdtext22, cmdtext23, cmdtext24
};
Fl_Input2 *shftcmdtexts[] = {
shftcmdtext1, shftcmdtext2, shftcmdtext3, shftcmdtext4,
shftcmdtext5, shftcmdtext6, shftcmdtext7, shftcmdtext8,
shftcmdtext9, shftcmdtext10, shftcmdtext11, shftcmdtext12,
shftcmdtext13, shftcmdtext14, shftcmdtext15, shftcmdtext16 };
shftcmdtext1, shftcmdtext2, shftcmdtext3, shftcmdtext4,
shftcmdtext5, shftcmdtext6, shftcmdtext7, shftcmdtext8,
shftcmdtext9, shftcmdtext10, shftcmdtext11, shftcmdtext12,
shftcmdtext13, shftcmdtext14, shftcmdtext15, shftcmdtext16,
shftcmdtext17, shftcmdtext18, shftcmdtext19, shftcmdtext20,
shftcmdtext21, shftcmdtext22, shftcmdtext23, shftcmdtext24
};
std::string *cmd[] = {
&progStatus.command1, &progStatus.command2, &progStatus.command3, &progStatus.command4,
&progStatus.command5, &progStatus.command6, &progStatus.command7, &progStatus.command8,
&progStatus.command9, &progStatus.command10, &progStatus.command11, &progStatus.command12,
&progStatus.command13, &progStatus.command14, &progStatus.command15, &progStatus.command16 };
&progStatus.command1, &progStatus.command2, &progStatus.command3, &progStatus.command4,
&progStatus.command5, &progStatus.command6, &progStatus.command7, &progStatus.command8,
&progStatus.command9, &progStatus.command10, &progStatus.command11, &progStatus.command12,
&progStatus.command13, &progStatus.command14, &progStatus.command15, &progStatus.command16,
&progStatus.command17, &progStatus.command18, &progStatus.command19, &progStatus.command20,
&progStatus.command21, &progStatus.command22, &progStatus.command23, &progStatus.command24
};
std::string *shftcmd[] = {
&progStatus.shftcmd1, &progStatus.shftcmd2, &progStatus.shftcmd3, &progStatus.shftcmd4,
&progStatus.shftcmd5, &progStatus.shftcmd6, &progStatus.shftcmd7, &progStatus.shftcmd8,
&progStatus.shftcmd9, &progStatus.shftcmd10, &progStatus.shftcmd11, &progStatus.shftcmd12,
&progStatus.shftcmd13, &progStatus.shftcmd14, &progStatus.shftcmd15, &progStatus.shftcmd16 };
&progStatus.shftcmd1, &progStatus.shftcmd2, &progStatus.shftcmd3, &progStatus.shftcmd4,
&progStatus.shftcmd5, &progStatus.shftcmd6, &progStatus.shftcmd7, &progStatus.shftcmd8,
&progStatus.shftcmd9, &progStatus.shftcmd10, &progStatus.shftcmd11, &progStatus.shftcmd12,
&progStatus.shftcmd13, &progStatus.shftcmd14, &progStatus.shftcmd15, &progStatus.shftcmd16,
&progStatus.shftcmd17, &progStatus.shftcmd18, &progStatus.shftcmd19, &progStatus.shftcmd20,
&progStatus.shftcmd21, &progStatus.shftcmd22, &progStatus.shftcmd23, &progStatus.shftcmd24
};
static const char *lbl[16] = {
"1", "2", "3", "4",
"5", "6", "7", "8",
"9", "10", "11", "12",
"13", "14", "15", "16"};
static const char *lbl[24] = {
"1", "2", "3", "4", "5", "6", "7", "8",
"9", "10", "11", "12", "13", "14", "15", "16",
"17", "18", "19", "20", "21", "22", "23", "24"
};
tabCmds1 = new Fl_Group(X, Y + 20, W, H - 50, _("1-4"));
@ -1891,6 +1955,64 @@ Fl_Group *createCOMMANDS(int X, int Y, int W, int H, const char *label)
tabCmds4->end();
tabCmds5 = new Fl_Group(X, Y + 20, W, H - 50, _("17-20"));
bx5a = new Fl_Box(X + 23, Y + 26, 75, 16, "Label");
bx5a->box(FL_FLAT_BOX);
bx5a->align(FL_ALIGN_CENTER | FL_ALIGN_INSIDE);
bx5b = new Fl_Box(X + 80, Y + 26, W - 80 - 2, 16, "Command");
bx5b->box(FL_FLAT_BOX);
bx5b->align(FL_ALIGN_CENTER | FL_ALIGN_INSIDE);
for (int n = 16; n < 20; n++) {
cmdbtns[n] = new Fl_Input2(X + 27, Y + 46 + (n % 4) * 40, 80, 20, lbl[n]);
cmdbtns[n]->align(FL_ALIGN_LEFT);
cmdbtns[n]->value(cmdlbls[n]->c_str());
cmdbtns[n]->callback((Fl_Callback*)cb_cmdlbl, (void *)long(n));
cmdtexts[n] = new Fl_Input2(X + 110, Y + 46 + (n % 4) * 40, W - 110 - 2, 20, "");
cmdtexts[n]->align(FL_ALIGN_LEFT);
cmdtexts[n]->value(cmd[n]->c_str());
cmdtexts[n]->callback((Fl_Callback*)cb_cmdtext, (void *)long(n));
shftcmdtexts[n] = new Fl_Input2(X + 110, Y + 66 + (n % 4) * 40, W - 110 - 2, 20, "SHIFT");
shftcmdtexts[n]->align(FL_ALIGN_LEFT);
shftcmdtexts[n]->value(shftcmd[n]->c_str());
shftcmdtexts[n]->callback((Fl_Callback*)cb_shftcmdtext, (void *)long(n));
}
tabCmds5->end();
tabCmds6 = new Fl_Group(X, Y + 20, W, H - 50, _("21-24"));
bx6a = new Fl_Box(X + 23, Y + 26, 75, 16, "Label");
bx6a->box(FL_FLAT_BOX);
bx6a->align(FL_ALIGN_CENTER | FL_ALIGN_INSIDE);
bx6b = new Fl_Box(X + 80, Y + 26, W - 80 - 2, 16, "Command");
bx6b->box(FL_FLAT_BOX);
bx6b->align(FL_ALIGN_CENTER | FL_ALIGN_INSIDE);
for (int n = 20; n < 24; n++) {
cmdbtns[n] = new Fl_Input2(X + 27, Y + 46 + (n % 4) * 40, 80, 20, lbl[n]);
cmdbtns[n]->align(FL_ALIGN_LEFT);
cmdbtns[n]->value(cmdlbls[n]->c_str());
cmdbtns[n]->callback((Fl_Callback*)cb_cmdlbl, (void *)long(n));
cmdtexts[n] = new Fl_Input2(X + 110, Y + 46 + (n % 4) * 40, W - 110 - 2, 20, "");
cmdtexts[n]->align(FL_ALIGN_LEFT);
cmdtexts[n]->value(cmd[n]->c_str());
cmdtexts[n]->callback((Fl_Callback*)cb_cmdtext, (void *)long(n));
shftcmdtexts[n] = new Fl_Input2(X + 110, Y + 66 + (n % 4) * 40, W - 110 - 2, 20, "SHIFT");
shftcmdtexts[n]->align(FL_ALIGN_LEFT);
shftcmdtexts[n]->value(shftcmd[n]->c_str());
shftcmdtexts[n]->callback((Fl_Callback*)cb_shftcmdtext, (void *)long(n));
}
tabCmds6->end();
tabCmds->end();
cmdResponse = new Fl_Output(cmdtexts[0]->x(), Y + H - 20, cmdtexts[0]->w(), 20, "Response:");

View file

@ -258,6 +258,16 @@ extern Fl_Button *btnUser14;
extern Fl_Button *btnUser15;
extern Fl_Button *btnUser16;
extern Fl_Group *genericUser_3;
extern Fl_Button *btnUser17;
extern Fl_Button *btnUser18;
extern Fl_Button *btnUser19;
extern Fl_Button *btnUser20;
extern Fl_Button *btnUser21;
extern Fl_Button *btnUser22;
extern Fl_Button *btnUser23;
extern Fl_Button *btnUser24;
extern Hspinner *spnr_cw_spot_tone;
extern Hspinner *spnr_cw_qsk;
extern Hspinner *spnr_cw_weight;

View file

@ -318,6 +318,32 @@ struct status {
string label16;
string command16;
string shftcmd16;
string label17;
string command17;
string shftcmd17;
string label18;
string command18;
string shftcmd18;
string label19;
string command19;
string shftcmd19;
string label20;
string command20;
string shftcmd20;
string label21;
string command21;
string shftcmd21;
string label22;
string command22;
string shftcmd22;
string label23;
string command23;
string shftcmd23;
string label24;
string command24;
string shftcmd24;
// =========================
int bg_red;
int bg_green;

View file

@ -333,7 +333,33 @@ status progStatus = {
"", // string command16;
"", // string shftcmd16;
"cmd 17", // string label17;
"", // string command17;
"", // string shftcmd17;
"cmd 18", // string label18;
"", // string command18;
"", // string shftcmd18;
"cmd 19", // string label19;
"", // string command19;
"", // string shftcmd19;
"cmd 20", // string label20;
"", // string command20;
"", // string shftcmd20;
"cmd 21", // string label21;
"", // string command21;
"", // string shftcmd21;
"cmd 22", // string label22;
"", // string command22;
"", // string shftcmd22;
"cmd 23", // string label23;
"", // string command23;
"", // string shftcmd23;
"cmd 24", // string label24;
"", // string command24;
"", // string shftcmd24;
// =========================
232, // int bg_red;
255, // int bg_green;
232, // int bg_blue;
@ -788,6 +814,38 @@ void status::saveLastState()
spref.set("command16", command16.c_str());
spref.set("shftcmd16", shftcmd16.c_str());
spref.set("label17", label17.c_str());
spref.set("command17", command17.c_str());
spref.set("shftcmd17", shftcmd17.c_str());
spref.set("label18", label18.c_str());
spref.set("command18", command18.c_str());
spref.set("shftcmd18", shftcmd18.c_str());
spref.set("label19", label19.c_str());
spref.set("command19", command19.c_str());
spref.set("shftcmd19", shftcmd19.c_str());
spref.set("label20", label20.c_str());
spref.set("command20", command20.c_str());
spref.set("shftcmd20", shftcmd20.c_str());
spref.set("label21", label21.c_str());
spref.set("command21", command21.c_str());
spref.set("shftcmd21", shftcmd21.c_str());
spref.set("label22", label22.c_str());
spref.set("command22", command22.c_str());
spref.set("shftcmd22", shftcmd22.c_str());
spref.set("label23", label23.c_str());
spref.set("command23", command23.c_str());
spref.set("shftcmd23", shftcmd23.c_str());
spref.set("label24", label24.c_str());
spref.set("command24", command24.c_str());
spref.set("shftcmd24", shftcmd24.c_str());
spref.set("fg_red", fg_red);
spref.set("fg_green", fg_green);
spref.set("fg_blue", fg_blue);
@ -1335,6 +1393,62 @@ bool status::loadXcvrState(string xcvr)
spref.get("shftcmd16", defbuffer, shftcmd16.c_str(), 499);
shftcmd16 = defbuffer;
spref.get("label17", defbuffer, label17.c_str(), 499);
label17 = defbuffer;
spref.get("command17", defbuffer, command17.c_str(), 499);
command17 = defbuffer;
spref.get("shftcmd17", defbuffer, shftcmd17.c_str(), 499);
shftcmd17 = defbuffer;
spref.get("label18", defbuffer, label18.c_str(), 499);
label18 = defbuffer;
spref.get("command18", defbuffer, command18.c_str(), 499);
command18 = defbuffer;
spref.get("shftcmd18", defbuffer, shftcmd18.c_str(), 499);
shftcmd18 = defbuffer;
spref.get("label19", defbuffer, label19.c_str(), 499);
label19 = defbuffer;
spref.get("command19", defbuffer, command19.c_str(), 499);
command19 = defbuffer;
spref.get("shftcmd19", defbuffer, shftcmd11.c_str(), 499);
shftcmd19 = defbuffer;
spref.get("label20", defbuffer, label20.c_str(), 499);
label20 = defbuffer;
spref.get("command20", defbuffer, command20.c_str(), 499);
command20 = defbuffer;
spref.get("shftcmd20", defbuffer, shftcmd20.c_str(), 499);
shftcmd20 = defbuffer;
spref.get("label21", defbuffer, label21.c_str(), 499);
label21 = defbuffer;
spref.get("command21", defbuffer, command21.c_str(), 499);
command21 = defbuffer;
spref.get("shftcmd21", defbuffer, shftcmd21.c_str(), 499);
shftcmd21 = defbuffer;
spref.get("label22", defbuffer, label22.c_str(), 499);
label22 = defbuffer;
spref.get("command22", defbuffer, command22.c_str(), 499);
command22 = defbuffer;
spref.get("shftcmd22", defbuffer, shftcmd22.c_str(), 499);
shftcmd22 = defbuffer;
spref.get("label23", defbuffer, label23.c_str(), 499);
label23 = defbuffer;
spref.get("command23", defbuffer, command23.c_str(), 499);
command23 = defbuffer;
spref.get("shftcmd23", defbuffer, shftcmd23.c_str(), 499);
shftcmd23 = defbuffer;
spref.get("label24", defbuffer, label24.c_str(), 499);
label24 = defbuffer;
spref.get("command24", defbuffer, command24.c_str(), 499);
command24 = defbuffer;
spref.get("shftcmd24", defbuffer, shftcmd24.c_str(), 499);
shftcmd24 = defbuffer;
spref.get("fg_red", fg_red, fg_red);
spref.get("fg_green", fg_green, fg_green);
spref.get("fg_blue", fg_blue, fg_blue);
@ -1649,6 +1763,15 @@ void status::UI_laststate()
btnUser15->label(label15.c_str()); btnUser15->redraw_label();
btnUser16->label(label16.c_str()); btnUser16->redraw_label();
btnUser17->label(label17.c_str()); btnUser17->redraw_label();
btnUser18->label(label18.c_str()); btnUser18->redraw_label();
btnUser19->label(label19.c_str()); btnUser19->redraw_label();
btnUser20->label(label20.c_str()); btnUser20->redraw_label();
btnUser21->label(label21.c_str()); btnUser21->redraw_label();
btnUser22->label(label22.c_str()); btnUser22->redraw_label();
btnUser23->label(label23.c_str()); btnUser23->redraw_label();
btnUser24->label(label24.c_str()); btnUser24->redraw_label();
Fl::scheme(ui_scheme.c_str());
}
@ -1793,6 +1916,22 @@ string status::info()
info << "command 15 : " << command15 << "\n";
info << "label 16 : " << label16 << "\n";
info << "command 16 : " << command16 << "\n";
info << "label 17 : " << label17 << "\n";
info << "command 17 : " << command17 << "\n";
info << "label 18 : " << label18 << "\n";
info << "command 18 : " << command18 << "\n";
info << "label 19 : " << label19 << "\n";
info << "command 19 : " << command19 << "\n";
info << "label 20 : " << label20 << "\n";
info << "command 20 : " << command20 << "\n";
info << "label 21 : " << label21 << "\n";
info << "command 21 : " << command21 << "\n";
info << "label 22 : " << label22 << "\n";
info << "command 22 : " << command22 << "\n";
info << "label 23 : " << label23 << "\n";
info << "command 23 : " << command23 << "\n";
info << "label 24 : " << label24 << "\n";
info << "command 24 : " << command24 << "\n";
return info.str();
}

View file

@ -4160,6 +4160,7 @@ void initTabs()
hidden_tabs->add(genericMisc);
hidden_tabs->add(genericUser_1);
hidden_tabs->add(genericUser_2);
hidden_tabs->add(genericUser_3);
hidden_tabs->add(tab7610);
} else {
tabsGeneric->remove(tab_yaesu_bands);
@ -4174,6 +4175,7 @@ void initTabs()
tabsGeneric->remove(genericMisc);
tabsGeneric->remove(genericUser_1);
tabsGeneric->remove(genericUser_2);
tabsGeneric->remove(genericUser_3);
tabsGeneric->remove(tab7610);
}
@ -4404,8 +4406,10 @@ void initTabs()
tabsGeneric->add(genericUser_1);
tabsGeneric->add(genericUser_2);
tabsGeneric->add(genericUser_3);
genericUser_1->redraw();
genericUser_2->redraw();
genericUser_3->redraw();
if (selrig->name_ == rig_IC7610.name_) {
tabsGeneric->add(tab7610);