CW Offset optional

* Make CW Offset optional in the waterfall
  * Computation of CW offset optional and independent of BFO
    sideband selection
  * tested on K3 only
pull/1/head
Pierfrancesco Caci 2011-06-29 04:17:05 -05:00 zatwierdzone przez David Freese
rodzic c2d0b93c62
commit 12714ebe04
5 zmienionych plików z 40 dodań i 15 usunięć

Wyświetl plik

@ -2898,6 +2898,13 @@ static void cb_btnCWIsLSB(Fl_Check_Button* o, void*) {
progdefaults.changed=true;
}
Fl_Check_Button *btnCWOffset=(Fl_Check_Button *)0;
static void cb_btnCWOffset(Fl_Check_Button* o, void*) {
progdefaults.CWOffset=o->value();
progdefaults.changed=true;
}
Fl_Group *tabText_IO=(Fl_Group *)0;
Fl_Group *grpTalker=(Fl_Group *)0;
@ -3056,6 +3063,7 @@ static const char szProsigns[] = "~|%|&|+|=|{|}|<|>|[|]| ";
tabOperator->tooltip(_("Operator information"));
tabOperator->callback((Fl_Callback*)cb_tabOperator);
tabOperator->when(FL_WHEN_CHANGED);
tabOperator->hide();
{ Fl_Group* o = new Fl_Group(5, 35, 490, 165, _("Station"));
o->box(FL_ENGRAVED_FRAME);
o->align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE);
@ -6266,10 +6274,10 @@ d frequency"));
tabID->end();
} // Fl_Group* tabID
{ tabMisc = new Fl_Group(0, 25, 500, 345, _("Misc"));
tabMisc->hide();
{ tabsMisc = new Fl_Tabs(0, 25, 500, 345);
tabsMisc->selection_color((Fl_Color)FL_LIGHT1);
{ tabCPUspeed = new Fl_Group(0, 50, 500, 320, _("CPU"));
tabCPUspeed->hide();
{ Fl_Group* o = new Fl_Group(5, 60, 490, 51);
o->box(FL_ENGRAVED_FRAME);
o->align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE);
@ -6512,7 +6520,6 @@ d frequency"));
tabSpot->end();
} // Fl_Group* tabSpot
{ tabSweetSpot = new Fl_Group(0, 50, 500, 320, _("Sweet Spot"));
tabSweetSpot->hide();
{ Fl_Group* o = new Fl_Group(5, 60, 490, 75);
o->box(FL_ENGRAVED_FRAME);
o->align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE);
@ -6582,15 +6589,22 @@ d frequency"));
} // Fl_Check_Button* btnStartAtSweetSpot
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(5, 140, 490, 60, _("K3 A1A configuation"));
{ Fl_Group* o = new Fl_Group(5, 140, 490, 60, _("A1A offset configuration"));
o->box(FL_ENGRAVED_FRAME);
o->align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE);
{ Fl_Check_Button* o = btnCWIsLSB = new Fl_Check_Button(220, 161, 70, 15, _("CW is LSB"));
{ Fl_Check_Button* o = btnCWIsLSB = new Fl_Check_Button(355, 165, 70, 15, _("CW is LSB"));
btnCWIsLSB->tooltip(_("Select this for Elecraft K3\nOther radios should not need it."));
btnCWIsLSB->down_box(FL_DOWN_BOX);
btnCWIsLSB->callback((Fl_Callback*)cb_btnCWIsLSB);
o->value(progdefaults.CWIsLSB);
} // Fl_Check_Button* btnCWIsLSB
{ Fl_Check_Button* o = btnCWOffset = new Fl_Check_Button(30, 165, 70, 15, _("Display true frequency in the waterfall"));
btnCWOffset->tooltip(_("Enable to show the true transmit frequency on the waterfall when the radio is\
in CW (A1A) mode"));
btnCWOffset->down_box(FL_DOWN_BOX);
btnCWOffset->callback((Fl_Callback*)cb_btnCWOffset);
o->value(progdefaults.CWOffset);
} // Fl_Check_Button* btnCWOffset
o->end();
} // Fl_Group* o
tabSweetSpot->end();

Wyświetl plik

@ -106,8 +106,8 @@ static const char szProsigns[] = "~|%|&|+|=|{|}|<|>|[|]| ";} {}
} {
Fl_Group tabOperator {
label Operator
callback {progdefaults.changed = true;} selected
tooltip {Operator information} xywh {0 25 500 345} when 1
callback {progdefaults.changed = true;}
tooltip {Operator information} xywh {0 25 500 345} when 1 hide
} {
Fl_Group {} {
label Station open
@ -3393,14 +3393,14 @@ progdefaults.changed = true;}
}
Fl_Group tabMisc {
label Misc open
xywh {0 25 500 345} hide
xywh {0 25 500 345}
} {
Fl_Tabs tabsMisc {open
xywh {0 25 500 345} selection_color 50
} {
Fl_Group tabCPUspeed {
label CPU open
xywh {0 50 500 320}
xywh {0 50 500 320} hide
} {
Fl_Group {} {open
xywh {5 60 490 51} box ENGRAVED_FRAME align 21
@ -3615,7 +3615,7 @@ progdefaults.changed = true;}
}
Fl_Group tabSweetSpot {
label {Sweet Spot} open
xywh {0 50 500 320} hide
xywh {0 50 500 320}
} {
Fl_Group {} {open
xywh {5 60 490 75} box ENGRAVED_FRAME align 21
@ -3657,7 +3657,7 @@ OFF - keep current wf cursor position} xywh {15 101 348 20} down_box DOWN_BOX va
}
}
Fl_Group {} {
label {K3 A1A configuation} open
label {A1A offset configuration} open selected
xywh {5 140 490 60} box ENGRAVED_FRAME align 21
} {
Fl_Check_Button btnCWIsLSB {
@ -3665,9 +3665,16 @@ OFF - keep current wf cursor position} xywh {15 101 348 20} down_box DOWN_BOX va
callback {progdefaults.CWIsLSB=o->value();
progdefaults.changed=true;}
tooltip {Select this for Elecraft K3
Other radios should not need it.} xywh {220 161 70 15} down_box DOWN_BOX
Other radios should not need it.} xywh {355 165 70 15} down_box DOWN_BOX
code0 {o->value(progdefaults.CWIsLSB);}
}
Fl_Check_Button btnCWOffset {
label {Display true frequency in the waterfall}
callback {progdefaults.CWOffset=o->value();
progdefaults.changed=true;}
tooltip {Enable to show the true transmit frequency on the waterfall when the radio is in CW (A1A) mode} xywh {30 165 70 15} down_box DOWN_BOX
code0 {o->value(progdefaults.CWOffset);}
}
}
}
Fl_Group tabText_IO {

Wyświetl plik

@ -402,6 +402,7 @@ extern Fl_Value_Input2 *valRTTYsweetspot;
extern Fl_Value_Input2 *valPSKsweetspot;
extern Fl_Check_Button *btnStartAtSweetSpot;
extern Fl_Check_Button *btnCWIsLSB;
extern Fl_Check_Button *btnCWOffset;
extern Fl_Group *tabText_IO;
extern Fl_Group *grpTalker;
extern void open_talker();

Wyświetl plik

@ -163,6 +163,9 @@
ELEM_(bool, StartAtSweetSpot, "STARTATSWEETSPOT", \
"Always start new modems at sweet spot frequencies", \
false) \
ELEM_(bool, CWOffset, "CWOFFSET", \
"Select if waterfall should compensate for BFO offset in CW", \
false) \
ELEM_(bool, CWIsLSB, "CWISLSB", \
"Select if BFO is injected as LSB instead of USB", \
false) \

Wyświetl plik

@ -597,8 +597,8 @@ update_freq:
int cwoffset = 0;
string testmode = qso_opMODE->value();
if (testmode == "CW" or testmode == "CWR") {
cwoffset = progdefaults.CWsweetspot;
usb = ! (progdefaults.CWIsLSB ^ (testmode == "CWR"));
cwoffset = (progdefaults.CWOffset ? progdefaults.CWsweetspot : 0 );
usb = ! (progdefaults.CWIsLSB ^ (testmode == "CWR"));
}
if (usb)
dfreq = rfc + active_modem->get_txfreq() -cwoffset;
@ -737,8 +737,8 @@ void WFdisp::drawScale() {
int cwoffset = 0;
string testmode = qso_opMODE->value();
if (testmode == "CW" or testmode == "CWR") {
cwoffset = progdefaults.CWsweetspot;
usb = ! (progdefaults.CWIsLSB ^ (testmode == "CWR"));
cwoffset = ( progdefaults.CWOffset ? progdefaults.CWsweetspot : 0 );
usb = ! (progdefaults.CWIsLSB ^ (testmode == "CWR"));
}
if (usb)
fr = (rfc - (rfc%500))/1000.0 + 0.5*i - cwoffset/1000.0;