User Command Buttons

* Add normal and SHIFT usage to all command buttons
    - allows user to assign on/off etc usage to a single
      command button.
    - SHIFT-left-button or right-button invokes secondary
      button command string.
This commit is contained in:
David Freese 2020-02-22 10:06:20 -06:00
parent 9d9a64ce37
commit 79b18cac1b
4 changed files with 299 additions and 44 deletions

View file

@ -788,23 +788,45 @@ static void cb_btn_xcvr_auto_off(Fl_Check_Button* o, void*) {
static void cb_btnUser( Fl_Button * o, void *d) {
long val = reinterpret_cast<long>(d);
switch (val) {
case 1: cb_send_command(progStatus.command1, cmdResponse); break;
case 2: cb_send_command(progStatus.command2, cmdResponse); break;
case 3: cb_send_command(progStatus.command3, cmdResponse); break;
case 4: cb_send_command(progStatus.command4, cmdResponse); break;
case 5: cb_send_command(progStatus.command5, cmdResponse); break;
case 6: cb_send_command(progStatus.command6, cmdResponse); break;
case 7: cb_send_command(progStatus.command7, cmdResponse); break;
case 8: cb_send_command(progStatus.command8, cmdResponse); break;
case 9: cb_send_command(progStatus.command9, cmdResponse); break;
case 10: cb_send_command(progStatus.command10, cmdResponse); break;
case 11: cb_send_command(progStatus.command11, cmdResponse); break;
case 12: cb_send_command(progStatus.command12, cmdResponse); break;
case 13: cb_send_command(progStatus.command13, cmdResponse); break;
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;
if (((Fl::event_state() & FL_SHIFT) == FL_SHIFT) ||
(Fl::event_button() == FL_RIGHT_MOUSE)) {
switch (val) {
case 1: cb_send_command(progStatus.shftcmd1, cmdResponse); break;
case 2: cb_send_command(progStatus.shftcmd2, cmdResponse); break;
case 3: cb_send_command(progStatus.shftcmd3, cmdResponse); break;
case 4: cb_send_command(progStatus.shftcmd4, cmdResponse); break;
case 5: cb_send_command(progStatus.shftcmd5, cmdResponse); break;
case 6: cb_send_command(progStatus.shftcmd6, cmdResponse); break;
case 7: cb_send_command(progStatus.shftcmd7, cmdResponse); break;
case 8: cb_send_command(progStatus.shftcmd8, cmdResponse); break;
case 9: cb_send_command(progStatus.shftcmd9, cmdResponse); break;
case 10: cb_send_command(progStatus.shftcmd10, cmdResponse); break;
case 11: cb_send_command(progStatus.shftcmd11, cmdResponse); break;
case 12: cb_send_command(progStatus.shftcmd12, cmdResponse); break;
case 13: cb_send_command(progStatus.shftcmd13, cmdResponse); break;
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;
}
} else {
switch (val) {
case 1: cb_send_command(progStatus.command1, cmdResponse); break;
case 2: cb_send_command(progStatus.command2, cmdResponse); break;
case 3: cb_send_command(progStatus.command3, cmdResponse); break;
case 4: cb_send_command(progStatus.command4, cmdResponse); break;
case 5: cb_send_command(progStatus.command5, cmdResponse); break;
case 6: cb_send_command(progStatus.command6, cmdResponse); break;
case 7: cb_send_command(progStatus.command7, cmdResponse); break;
case 8: cb_send_command(progStatus.command8, cmdResponse); break;
case 9: cb_send_command(progStatus.command9, cmdResponse); break;
case 10: cb_send_command(progStatus.command10, cmdResponse); break;
case 11: cb_send_command(progStatus.command11, cmdResponse); break;
case 12: cb_send_command(progStatus.command12, cmdResponse); break;
case 13: cb_send_command(progStatus.command13, cmdResponse); break;
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;
}
}
}

View file

@ -130,9 +130,18 @@ Fl_Group *tabCOMMANDS = (Fl_Group *)0;
Fl_Tabs *tabCmds = (Fl_Tabs *)0;
Fl_Group *tabCmds1 = (Fl_Group *)0;
Fl_Group *tabCmds2 = (Fl_Group *)0;
Fl_Group *tabCmds3 = (Fl_Group *)0;
Fl_Group *tabCmds4 = (Fl_Group *)0;
Fl_Box *bx1a = (Fl_Box *)0;
Fl_Box *bx1b = (Fl_Box *)0;
Fl_Box *bx2a = (Fl_Box *)0;
Fl_Box *bx2b = (Fl_Box *)0;
Fl_Box *bx3a = (Fl_Box *)0;
Fl_Box *bx3b = (Fl_Box *)0;
Fl_Box *bx4a = (Fl_Box *)0;
Fl_Box *bx4b = (Fl_Box *)0;
Fl_Box *bx1 = (Fl_Box *)0;
Fl_Box *bx2 = (Fl_Box *)0;
Fl_Input2 * cmdlbl1 = (Fl_Input2 *)0;
Fl_Input2 * cmdlbl2 = (Fl_Input2 *)0;
Fl_Input2 * cmdlbl3 = (Fl_Input2 *)0;
@ -167,6 +176,23 @@ Fl_Input2 * cmdtext14 = (Fl_Input2 *)0;
Fl_Input2 * cmdtext15 = (Fl_Input2 *)0;
Fl_Input2 * cmdtext16 = (Fl_Input2 *)0;
Fl_Input2 * shftcmdtext1 = (Fl_Input2 *)0;
Fl_Input2 * shftcmdtext2 = (Fl_Input2 *)0;
Fl_Input2 * shftcmdtext3 = (Fl_Input2 *)0;
Fl_Input2 * shftcmdtext4 = (Fl_Input2 *)0;
Fl_Input2 * shftcmdtext5 = (Fl_Input2 *)0;
Fl_Input2 * shftcmdtext6 = (Fl_Input2 *)0;
Fl_Input2 * shftcmdtext7 = (Fl_Input2 *)0;
Fl_Input2 * shftcmdtext8 = (Fl_Input2 *)0;
Fl_Input2 * shftcmdtext9 = (Fl_Input2 *)0;
Fl_Input2 * shftcmdtext10 = (Fl_Input2 *)0;
Fl_Input2 * shftcmdtext11 = (Fl_Input2 *)0;
Fl_Input2 * shftcmdtext12 = (Fl_Input2 *)0;
Fl_Input2 * shftcmdtext13 = (Fl_Input2 *)0;
Fl_Input2 * shftcmdtext14 = (Fl_Input2 *)0;
Fl_Input2 * shftcmdtext15 = (Fl_Input2 *)0;
Fl_Input2 * shftcmdtext16 = (Fl_Input2 *)0;
Fl_Output * cmdResponse = (Fl_Output *)0;
Fl_Group *tabRESTORE = (Fl_Group *)0;
@ -640,6 +666,23 @@ static void cb_cmdtext(Fl_Input2 *o, void *d) {
*cmd[val] = o->value();
}
static void cb_shftcmdtext(Fl_Input2 *o, void *d) {
long val = reinterpret_cast<long>(d);
std::string *cmd[] =
{ &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 };
if (val < 0) val = 0;
if (val > 15) val = 15;
*cmd[val] = o->value();
}
static void cb_btnOkXcvrDialog(Fl_Return_Button*, void*) {
string p1 = selectCommPort->value();
string p2 = selectAuxPort->value();
@ -1507,12 +1550,22 @@ std::cout << X << ", " << Y << ", " << W << " x " << H << std::endl;
&progStatus.label13, &progStatus.label14, &progStatus.label15, &progStatus.label16 };
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 };
Fl_Input2 *cmdtexts[] = {
cmdtext1, cmdtext2, cmdtext3, cmdtext4, cmdtext5, cmdtext6, cmdtext7, cmdtext8,
cmdtext9, cmdtext10, cmdtext11, cmdtext12, cmdtext13, cmdtext14, cmdtext15, cmdtext16 };
cmdtext1, cmdtext2, cmdtext3, cmdtext4,
cmdtext5, cmdtext6, cmdtext7, cmdtext8,
cmdtext9, cmdtext10, cmdtext11, cmdtext12,
cmdtext13, cmdtext14, cmdtext15, cmdtext16 };
Fl_Input2 *shftcmdtexts[] = {
shftcmdtext1, shftcmdtext2, shftcmdtext3, shftcmdtext4,
shftcmdtext5, shftcmdtext6, shftcmdtext7, shftcmdtext8,
shftcmdtext9, shftcmdtext10, shftcmdtext11, shftcmdtext12,
shftcmdtext13, shftcmdtext14, shftcmdtext15, shftcmdtext16 };
std::string *cmd[] = {
&progStatus.command1, &progStatus.command2, &progStatus.command3, &progStatus.command4,
@ -1520,63 +1573,135 @@ std::cout << X << ", " << Y << ", " << W << " x " << H << std::endl;
&progStatus.command9, &progStatus.command10, &progStatus.command11, &progStatus.command12,
&progStatus.command13, &progStatus.command14, &progStatus.command15, &progStatus.command16 };
tabCmds1 = new Fl_Group(X, Y + 20, W, H - 50, _("1-8"));
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 };
bx1 = new Fl_Box(X + 23, Y + 26, 75, 16, "Label");
bx1->box(FL_FLAT_BOX);
bx1->align(FL_ALIGN_CENTER | FL_ALIGN_INSIDE);
static const char *lbl[16] = {
"1", "2", "3", "4",
"5", "6", "7", "8",
"9", "10", "11", "12",
"13", "14", "15", "16"};
bx2 = new Fl_Box(X + 80, Y + 26, W - 80 - 2, 16, "Command");
bx2->box(FL_FLAT_BOX);
bx2->align(FL_ALIGN_CENTER | FL_ALIGN_INSIDE);
tabCmds1 = new Fl_Group(X, Y + 20, W, H - 50, _("1-4"));
static const char *lbl[16] = {
"1", "2", "3", "4", "5", "6", "7", "8",
"9", "10", "11", "12", "13", "14", "15", "16"};
bx1a = new Fl_Box(X + 23, Y + 26, 75, 16, "Label");
bx1a->box(FL_FLAT_BOX);
bx1a->align(FL_ALIGN_CENTER | FL_ALIGN_INSIDE);
for (int n = 0; n < 8; n++) {
bx1b = new Fl_Box(X + 80, Y + 26, W - 80 - 2, 16, "Command");
bx1b->box(FL_FLAT_BOX);
bx1b->align(FL_ALIGN_CENTER | FL_ALIGN_INSIDE);
cmdbtns[n] = new Fl_Input2(X + 27, Y + 46 + (n % 8) * 20, 80, 20, lbl[n]);
for (int n = 0; n < 4; 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 % 8) * 20, W - 110 - 2, 20, "");
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));
}
tabCmds1->end();
tabCmds2 = new Fl_Group(X, Y + 20, W, H - 50, _("9-16"));
tabCmds2->hide();
tabCmds2 = new Fl_Group(X, Y + 20, W, H - 50, _("5-8"));
Fl_Box *bx2a = new Fl_Box(X + 23, Y + 26, 75, 16, "Label");
bx2a = new Fl_Box(X + 23, Y + 26, 75, 16, "Label");
bx2a->box(FL_FLAT_BOX);
bx2a->align(FL_ALIGN_CENTER | FL_ALIGN_INSIDE);
Fl_Box *bx2b = new Fl_Box(X + 80, Y + 26, W - 80 - 2, 16, "Command");
bx2b = new Fl_Box(X + 80, Y + 26, W - 80 - 2, 16, "Command");
bx2b->box(FL_FLAT_BOX);
bx2b->align(FL_ALIGN_CENTER | FL_ALIGN_INSIDE);
for (int n = 8; n < 16; n++) {
cmdbtns[n] = new Fl_Input2(X + 27, Y + 46 + (n % 8) * 20, 80, 20, lbl[n]);
for (int n = 4; n < 8; 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 % 8) * 20, W - 110 - 2, 20, "");
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));
}
tabCmds2->end();
tabCmds3 = new Fl_Group(X, Y + 20, W, H - 50, _("9-12"));
tabCmds2->hide();
bx3a = new Fl_Box(X + 23, Y + 26, 75, 16, "Label");
bx3a->box(FL_FLAT_BOX);
bx3a->align(FL_ALIGN_CENTER | FL_ALIGN_INSIDE);
bx3b = new Fl_Box(X + 80, Y + 26, W - 80 - 2, 16, "Command");
bx3b->box(FL_FLAT_BOX);
bx3b->align(FL_ALIGN_CENTER | FL_ALIGN_INSIDE);
for (int n = 8; n < 12; 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));
}
tabCmds3->end();
tabCmds4 = new Fl_Group(X, Y + 20, W, H - 50, _("13-16"));
bx4a = new Fl_Box(X + 23, Y + 26, 75, 16, "Label");
bx4a->box(FL_FLAT_BOX);
bx4a->align(FL_ALIGN_CENTER | FL_ALIGN_INSIDE);
bx4b = new Fl_Box(X + 80, Y + 26, W - 80 - 2, 16, "Command");
bx4b->box(FL_FLAT_BOX);
bx4b->align(FL_ALIGN_CENTER | FL_ALIGN_INSIDE);
for (int n = 12; n < 16; 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));
}
tabCmds4->end();
tabCmds->end();
cmdResponse = new Fl_Output(cmdtexts[0]->x(), Y + H - 20, cmdtexts[0]->w(), 20, "Response:");

View file

@ -255,37 +255,53 @@ struct status {
// User command buttons
string label1;
string command1;
string shftcmd1;
string label2;
string command2;
string shftcmd2;
string label3;
string command3;
string shftcmd3;
string label4;
string command4;
string shftcmd4;
string label5;
string command5;
string shftcmd5;
string label6;
string command6;
string shftcmd6;
string label7;
string command7;
string shftcmd7;
string label8;
string command8;
string shftcmd8;
string label9;
string command9;
string shftcmd9;
string label10;
string command10;
string shftcmd10;
string label11;
string command11;
string shftcmd11;
string label12;
string command12;
string shftcmd12;
string label13;
string command13;
string shftcmd13;
string label14;
string command14;
string shftcmd14;
string label15;
string command15;
string shftcmd15;
string label16;
string command16;
string shftcmd16;
// =========================
int bg_red;
int bg_green;

View file

@ -267,37 +267,53 @@ status progStatus = {
// =========================
"cmd 1", // string label1;
"", // string command1;
"", // string shftcmd1;
"cmd 2", // string label2;
"", // string command2;
"", // string shftcmd2;
"cmd 3", // string label3;
"", // string command3;
"", // string shftcmd3;
"cmd 4", // string label4;
"", // string command4;
"", // string shftcmd4;
"cmd 5", // string label5;
"", // string command5;
"", // string shftcmd5;
"cmd 6", // string label6;
"", // string command6;
"", // string shftcmd6;
"cmd 7", // string label7;
"", // string command7;
"", // string shftcmd7;
"cmd 8", // string label8;
"", // string command8;
"", // string shftcmd8;
"cmd 9", // string label9;
"", // string command9;
"", // string shftcmd9;
"cmd 10", // string label10;
"", // string command10;
"", // string shftcmd10;
"cmd 11", // string label11;
"", // string command11;
"", // string shftcmd11;
"cmd 12", // string label12;
"", // string command12;
"", // string shftcmd12;
"cmd 13", // string label13;
"", // string command13;
"", // string shftcmd13;
"cmd 14", // string label14;
"", // string command14;
"", // string shftcmd14;
"cmd 15", // string label15;
"", // string command15;
"", // string shftcmd15;
"cmd 16", // string label16;
"", // string command16;
"", // string shftcmd16;
// =========================
232, // int bg_red;
@ -639,37 +655,67 @@ void status::saveLastState()
spref.set("label1", label1.c_str());
spref.set("command1", command1.c_str());
spref.set("shftcmd1", shftcmd1.c_str());
spref.set("label2", label2.c_str());
spref.set("command2", command2.c_str());
spref.set("shftcmd1", shftcmd2.c_str());
spref.set("label3", label3.c_str());
spref.set("command3", command3.c_str());
spref.set("shftcmd3", shftcmd3.c_str());
spref.set("label4", label4.c_str());
spref.set("command4", command4.c_str());
spref.set("shftcmd4", shftcmd4.c_str());
spref.set("label5", label5.c_str());
spref.set("command5", command5.c_str());
spref.set("shftcmd5", shftcmd5.c_str());
spref.set("label6", label6.c_str());
spref.set("command6", command6.c_str());
spref.set("shftcmd6", shftcmd6.c_str());
spref.set("label7", label7.c_str());
spref.set("command7", command7.c_str());
spref.set("shftcmd7", shftcmd7.c_str());
spref.set("label8", label8.c_str());
spref.set("command8", command8.c_str());
spref.set("shftcmd8", shftcmd8.c_str());
spref.set("label9", label9.c_str());
spref.set("command9", command9.c_str());
spref.set("shftcmd9", shftcmd9.c_str());
spref.set("label10", label10.c_str());
spref.set("command10", command10.c_str());
spref.set("shftcmd10", shftcmd10.c_str());
spref.set("label11", label11.c_str());
spref.set("command11", command11.c_str());
spref.set("shftcmd11", shftcmd11.c_str());
spref.set("label12", label12.c_str());
spref.set("command12", command12.c_str());
spref.set("shftcmd12", shftcmd12.c_str());
spref.set("label13", label13.c_str());
spref.set("command13", command13.c_str());
spref.set("shftcmd13", shftcmd13.c_str());
spref.set("label14", label14.c_str());
spref.set("command14", command14.c_str());
spref.set("shftcmd14", shftcmd14.c_str());
spref.set("label15", label15.c_str());
spref.set("command15", command15.c_str());
spref.set("shftcmd15", shftcmd15.c_str());
spref.set("label16", label16.c_str());
spref.set("command16", command16.c_str());
spref.set("shftcmd16", shftcmd16.c_str());
spref.set("fg_red", fg_red);
spref.set("fg_green", fg_green);
@ -1055,67 +1101,113 @@ bool status::loadXcvrState(string xcvr)
label1 = defbuffer;
spref.get("command1", defbuffer, command1.c_str(), 499);
command1 = defbuffer;
spref.get("shftcmd1", defbuffer, shftcmd1.c_str(), 499);
shftcmd1 = defbuffer;
spref.get("label2", defbuffer, label2.c_str(), 499);
label2 = defbuffer;
spref.get("command2", defbuffer, command2.c_str(), 499);
command2 = defbuffer;
spref.get("shftcmd2", defbuffer, shftcmd2.c_str(), 499);
shftcmd2 = defbuffer;
spref.get("label3", defbuffer, label3.c_str(), 499);
label3 = defbuffer;
spref.get("command3", defbuffer, command3.c_str(), 499);
command3 = defbuffer;
spref.get("shftcmd3", defbuffer, shftcmd3.c_str(), 499);
shftcmd3 = defbuffer;
spref.get("label4", defbuffer, label4.c_str(), 499);
label4 = defbuffer;
spref.get("command4", defbuffer, command4.c_str(), 499);
command4 = defbuffer;
spref.get("shftcmd4", defbuffer, shftcmd4.c_str(), 499);
shftcmd4 = defbuffer;
spref.get("label5", defbuffer, label5.c_str(), 499);
label5 = defbuffer;
spref.get("command5", defbuffer, command5.c_str(), 499);
command5 = defbuffer;
spref.get("shftcmd5", defbuffer, shftcmd5.c_str(), 499);
shftcmd5 = defbuffer;
spref.get("label6", defbuffer, label6.c_str(), 499);
label6 = defbuffer;
spref.get("command6", defbuffer, command6.c_str(), 499);
command6 = defbuffer;
spref.get("shftcmd6", defbuffer, shftcmd6.c_str(), 499);
shftcmd6 = defbuffer;
spref.get("label7", defbuffer, label7.c_str(), 499);
label7 = defbuffer;
spref.get("command7", defbuffer, command7.c_str(), 499);
command7 = defbuffer;
spref.get("shftcmd7", defbuffer, shftcmd7.c_str(), 499);
shftcmd7 = defbuffer;
spref.get("label8", defbuffer, label8.c_str(), 499);
label8 = defbuffer;
spref.get("command8", defbuffer, command8.c_str(), 499);
command8 = defbuffer;
spref.get("shftcmd8", defbuffer, shftcmd8.c_str(), 499);
shftcmd8 = defbuffer;
spref.get("label9", defbuffer, label9.c_str(), 499);
label9 = defbuffer;
spref.get("command9", defbuffer, command9.c_str(), 499);
command9 = defbuffer;
spref.get("shftcmd9", defbuffer, shftcmd9.c_str(), 499);
shftcmd9 = defbuffer;
spref.get("label10", defbuffer, label10.c_str(), 499);
label10 = defbuffer;
spref.get("command10", defbuffer, command10.c_str(), 499);
command10 = defbuffer;
spref.get("shftcmd10", defbuffer, shftcmd10.c_str(), 499);
shftcmd10 = defbuffer;
spref.get("label11", defbuffer, label11.c_str(), 499);
label11 = defbuffer;
spref.get("command11", defbuffer, command11.c_str(), 499);
command11 = defbuffer;
spref.get("shftcmd11", defbuffer, shftcmd11.c_str(), 499);
shftcmd11 = defbuffer;
spref.get("label12", defbuffer, label12.c_str(), 499);
label12 = defbuffer;
spref.get("command12", defbuffer, command12.c_str(), 499);
command12 = defbuffer;
spref.get("shftcmd12", defbuffer, shftcmd12.c_str(), 499);
shftcmd12 = defbuffer;
spref.get("label13", defbuffer, label13.c_str(), 499);
label13 = defbuffer;
spref.get("command13", defbuffer, command13.c_str(), 499);
command13 = defbuffer;
spref.get("shftcmd13", defbuffer, shftcmd13.c_str(), 499);
shftcmd13 = defbuffer;
spref.get("label14", defbuffer, label14.c_str(), 499);
label14 = defbuffer;
spref.get("command14", defbuffer, command14.c_str(), 499);
command14 = defbuffer;
spref.get("shftcmd14", defbuffer, shftcmd14.c_str(), 499);
shftcmd14 = defbuffer;
spref.get("label15", defbuffer, label15.c_str(), 499);
label15 = defbuffer;
spref.get("command15", defbuffer, command15.c_str(), 499);
command15 = defbuffer;
spref.get("shftcmd15", defbuffer, shftcmd15.c_str(), 499);
shftcmd15 = defbuffer;
spref.get("label16", defbuffer, label16.c_str(), 499);
label16 = defbuffer;
spref.get("command16", defbuffer, command16.c_str(), 499);
command16 = defbuffer;
spref.get("shftcmd16", defbuffer, shftcmd16.c_str(), 499);
shftcmd16 = defbuffer;
spref.get("fg_red", fg_red, fg_red);
spref.get("fg_green", fg_green, fg_green);