RTTY MARK frequency

* User configurable option to log RTTY using MARK
    frequency
pull/2/head
David Freese 2011-07-19 17:24:40 -05:00
rodzic ab822e7d9e
commit 836c082106
6 zmienionych plików z 80 dodań i 36 usunięć

Wyświetl plik

@ -1637,6 +1637,13 @@ static void cb_chkUOStx(Fl_Check_Button* o, void*) {
progdefaults.changed = true;
}
Fl_Check_Button *chk_useMARKfreq=(Fl_Check_Button *)0;
static void cb_chk_useMARKfreq(Fl_Check_Button* o, void*) {
progdefaults.useMARKfreq=o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btnPreferXhairScope=(Fl_Check_Button *)0;
static void cb_btnPreferXhairScope(Fl_Check_Button* o, void*) {
@ -2956,6 +2963,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);
@ -3962,7 +3970,6 @@ an merging"));
tabWaterfall->end();
} // Fl_Group* tabWaterfall
{ tabModems = new Fl_Group(-4, 25, 521, 347, _("Modems"));
tabModems->hide();
{ tabsModems = new Fl_Tabs(-4, 25, 521, 347);
tabsModems->selection_color((Fl_Color)FL_LIGHT1);
tabsModems->align(FL_ALIGN_TOP_RIGHT);
@ -4751,6 +4758,7 @@ an merging"));
tabContestia->end();
} // Fl_Group* tabContestia
{ tabPSK = new Fl_Group(-4, 50, 521, 322, _("PSK"));
tabPSK->hide();
{ tabsPSK = new Fl_Tabs(-4, 50, 521, 322);
tabsPSK->selection_color((Fl_Color)FL_LIGHT1);
{ Fl_Group* o = new Fl_Group(0, 75, 500, 295, _("General"));
@ -4852,7 +4860,6 @@ an merging"));
tabPSK->end();
} // Fl_Group* tabPSK
{ tabRTTY = new Fl_Group(0, 50, 500, 320, _("RTTY"));
tabRTTY->hide();
{ Fl_Group* o = new Fl_Group(5, 60, 490, 300);
o->box(FL_ENGRAVED_FRAME);
{ Fl_Choice* o = selShift = new Fl_Choice(15, 70, 100, 20, _("Carrier shift"));
@ -4895,22 +4902,22 @@ an merging"));
selStopBits->when(FL_WHEN_CHANGED);
o->add(szStopBits);
} // Fl_Choice* selStopBits
{ Fl_Group* o = new Fl_Group(255, 68, 230, 80);
{ Fl_Group* o = new Fl_Group(259, 66, 230, 70);
o->box(FL_ENGRAVED_FRAME);
{ Fl_Check_Button* o = btnAUTOCRLF = new Fl_Check_Button(265, 79, 90, 22, _("AutoCRLF"));
{ Fl_Check_Button* o = btnAUTOCRLF = new Fl_Check_Button(269, 77, 90, 22, _("AutoCRLF"));
btnAUTOCRLF->tooltip(_("Add CRLF after page width characters"));
btnAUTOCRLF->down_box(FL_DOWN_BOX);
btnAUTOCRLF->callback((Fl_Callback*)cb_btnAUTOCRLF);
o->value(progdefaults.rtty_autocrlf);
} // Fl_Check_Button* btnAUTOCRLF
{ Fl_Check_Button* o = btnCRCRLF = new Fl_Check_Button(385, 79, 90, 22, _("CR-CR-LF"));
{ Fl_Check_Button* o = btnCRCRLF = new Fl_Check_Button(389, 77, 90, 22, _("CR-CR-LF"));
btnCRCRLF->tooltip(_("Use \"cr cr lf\" for \"cr lf\""));
btnCRCRLF->down_box(FL_DOWN_BOX);
btnCRCRLF->callback((Fl_Callback*)cb_btnCRCRLF);
btnCRCRLF->when(FL_WHEN_RELEASE_ALWAYS);
o->value(progdefaults.rtty_crcrlf);
} // Fl_Check_Button* btnCRCRLF
{ Fl_Counter2* o = cntrAUTOCRLF = new Fl_Counter2(335, 118, 65, 20, _("characters"));
{ Fl_Counter2* o = cntrAUTOCRLF = new Fl_Counter2(339, 107, 65, 20, _("characters"));
cntrAUTOCRLF->tooltip(_("Set page width"));
cntrAUTOCRLF->type(1);
cntrAUTOCRLF->box(FL_UP_BOX);
@ -4929,21 +4936,21 @@ an merging"));
cntrAUTOCRLF->when(FL_WHEN_CHANGED);
o->labelsize(FL_NORMAL_SIZE);
} // Fl_Counter2* cntrAUTOCRLF
{ Fl_Box* o = new Fl_Box(265, 118, 60, 20, _("after:"));
{ Fl_Box* o = new Fl_Box(269, 107, 60, 20, _("after:"));
o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
} // Fl_Box* o
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(320, 158, 165, 62, _("Unshift On Space"));
{ Fl_Group* o = new Fl_Group(259, 135, 231, 52, _("Unshift On Space"));
o->box(FL_ENGRAVED_FRAME);
o->align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE);
{ Fl_Check_Button* o = chkUOSrx = new Fl_Check_Button(355, 185, 45, 20, _("RX"));
{ Fl_Check_Button* o = chkUOSrx = new Fl_Check_Button(308, 153, 63, 26, _("RX"));
chkUOSrx->tooltip(_("Revert to Unsifted char\'s on a space"));
chkUOSrx->down_box(FL_DOWN_BOX);
chkUOSrx->callback((Fl_Callback*)cb_chkUOSrx);
o->value(progdefaults.UOSrx);
} // Fl_Check_Button* chkUOSrx
{ Fl_Check_Button* o = chkUOStx = new Fl_Check_Button(420, 185, 45, 20, _("TX"));
{ Fl_Check_Button* o = chkUOStx = new Fl_Check_Button(398, 153, 63, 26, _("TX"));
chkUOStx->tooltip(_("Revert to Unsifted char\'s on a space"));
chkUOStx->down_box(FL_DOWN_BOX);
chkUOStx->callback((Fl_Callback*)cb_chkUOStx);
@ -4951,6 +4958,17 @@ an merging"));
} // Fl_Check_Button* chkUOStx
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(259, 187, 231, 52, _("Log RTTY frequency"));
o->box(FL_ENGRAVED_FRAME);
o->align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE);
{ Fl_Check_Button* o = chk_useMARKfreq = new Fl_Check_Button(308, 205, 63, 26, _("Use MARK freq\'"));
chk_useMARKfreq->tooltip(_("Revert to Unsifted char\'s on a space"));
chk_useMARKfreq->down_box(FL_DOWN_BOX);
chk_useMARKfreq->callback((Fl_Callback*)cb_chk_useMARKfreq);
o->value(progdefaults.useMARKfreq);
} // Fl_Check_Button* chk_useMARKfreq
o->end();
} // Fl_Group* o
{ Fl_Check_Button* o = btnPreferXhairScope = new Fl_Check_Button(15, 254, 165, 20, _("Use cross hair scope"));
btnPreferXhairScope->tooltip(_("Default to cross hair digiscope"));
btnPreferXhairScope->down_box(FL_DOWN_BOX);
@ -4963,7 +4981,7 @@ an merging"));
chkPseudoFSK->callback((Fl_Callback*)cb_chkPseudoFSK);
o->value(progdefaults.PseudoFSK);
} // Fl_Check_Button* chkPseudoFSK
{ Fl_Choice* o = mnuRTTYAFCSpeed = new Fl_Choice(320, 254, 80, 20, _("AFC speed"));
{ Fl_Choice* o = mnuRTTYAFCSpeed = new Fl_Choice(308, 254, 80, 20, _("AFC speed"));
mnuRTTYAFCSpeed->tooltip(_("AFC tracking speed"));
mnuRTTYAFCSpeed->down_box(FL_BORDER_BOX);
mnuRTTYAFCSpeed->callback((Fl_Callback*)cb_mnuRTTYAFCSpeed);
@ -4971,7 +4989,7 @@ an merging"));
o->add("Slow"); o->add("Normal"); o->add("Fast");
o->value(progdefaults.rtty_afcspeed);
} // Fl_Choice* mnuRTTYAFCSpeed
{ Fl_Check_Button* o = chkXagc = new Fl_Check_Button(320, 223, 62, 22, _("X-agc (hidden)"));
{ Fl_Check_Button* o = chkXagc = new Fl_Check_Button(308, 284, 62, 22, _("X-agc (hidden)"));
chkXagc->down_box(FL_DOWN_BOX);
chkXagc->callback((Fl_Callback*)cb_chkXagc);
o->value(progdefaults.Xagc);

Wyświetl plik

@ -105,8 +105,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
@ -1216,8 +1216,8 @@ behaves inside the waterfall} xywh {15 196 150 22} down_box BORDER_BOX align 8
}
}
Fl_Group tabModems {
label Modems
xywh {-4 25 521 347} hide
label Modems open
xywh {-4 25 521 347}
} {
Fl_Tabs tabsModems {open
xywh {-4 25 521 347} selection_color 50 align 9
@ -1944,7 +1944,7 @@ progdefaults.changed = true;}
}
Fl_Group tabPSK {
label PSK open
xywh {-4 50 521 322}
xywh {-4 50 521 322} hide
} {
Fl_Tabs tabsPSK {open
xywh {-4 50 521 322} selection_color 50
@ -2020,7 +2020,7 @@ progdefaults.changed = true;}
}
Fl_Group tabRTTY {
label RTTY open
xywh {0 50 500 320} hide
xywh {0 50 500 320}
} {
Fl_Group {} {open
xywh {5 60 490 300} box ENGRAVED_FRAME
@ -2074,54 +2074,66 @@ progdefaults.changed = true;} open
code0 {o->add(szStopBits);}
} {}
Fl_Group {} {open
xywh {255 68 230 80} box ENGRAVED_FRAME
xywh {259 66 230 70} box ENGRAVED_FRAME
} {
Fl_Check_Button btnAUTOCRLF {
label AutoCRLF
callback {progdefaults.rtty_autocrlf = o->value();
progdefaults.changed = true;}
tooltip {Add CRLF after page width characters} xywh {265 79 90 22} down_box DOWN_BOX
tooltip {Add CRLF after page width characters} xywh {269 77 90 22} down_box DOWN_BOX
code0 {o->value(progdefaults.rtty_autocrlf);}
}
Fl_Check_Button btnCRCRLF {
label {CR-CR-LF}
callback {progdefaults.rtty_crcrlf = o->value();
progdefaults.changed = true;}
tooltip {Use "cr cr lf" for "cr lf"} xywh {385 79 90 22} down_box DOWN_BOX when 6
tooltip {Use "cr cr lf" for "cr lf"} xywh {389 77 90 22} down_box DOWN_BOX when 6
code0 {o->value(progdefaults.rtty_crcrlf);}
}
Fl_Counter cntrAUTOCRLF {
label characters
callback {progdefaults.rtty_autocount = (int)o->value();
progdefaults.changed = true;}
tooltip {Set page width} xywh {335 118 65 20} type Simple align 8 minimum 68 maximum 80 step 1 value 72
tooltip {Set page width} xywh {339 107 65 20} type Simple align 8 minimum 68 maximum 80 step 1 value 72
code0 {o->labelsize(FL_NORMAL_SIZE);}
class Fl_Counter2
}
Fl_Box {} {
label {after:}
xywh {265 118 60 20} align 20
xywh {269 107 60 20} align 20
}
}
Fl_Group {} {
label {Unshift On Space} open
xywh {320 158 165 62} box ENGRAVED_FRAME align 21
xywh {259 135 231 52} box ENGRAVED_FRAME align 21
} {
Fl_Check_Button chkUOSrx {
label RX
callback {progdefaults.UOSrx=o->value();
progdefaults.changed = true;}
tooltip {Revert to Unsifted char's on a space} xywh {355 185 45 20} down_box DOWN_BOX
tooltip {Revert to Unsifted char's on a space} xywh {308 153 63 26} down_box DOWN_BOX
code0 {o->value(progdefaults.UOSrx);}
}
Fl_Check_Button chkUOStx {
label TX
callback {progdefaults.UOStx=o->value();
progdefaults.changed = true;}
tooltip {Revert to Unsifted char's on a space} xywh {420 185 45 20} down_box DOWN_BOX
tooltip {Revert to Unsifted char's on a space} xywh {398 153 63 26} down_box DOWN_BOX
code0 {o->value(progdefaults.UOStx);}
}
}
Fl_Group {} {
label {Log RTTY frequency} open
xywh {259 187 231 52} box ENGRAVED_FRAME align 21
} {
Fl_Check_Button chk_useMARKfreq {
label {Use MARK freq'}
callback {progdefaults.useMARKfreq=o->value();
progdefaults.changed = true;} selected
tooltip {Revert to Unsifted char's on a space} xywh {308 205 63 26} down_box DOWN_BOX
code0 {o->value(progdefaults.useMARKfreq);}
}
}
Fl_Check_Button btnPreferXhairScope {
label {Use cross hair scope}
callback {progdefaults.PreferXhairScope=o->value();
@ -2144,7 +2156,7 @@ progdefaults.changed = true;}
label {AFC speed}
callback {progdefaults.rtty_afcspeed = o->value();
progdefaults.changed = true;} open
tooltip {AFC tracking speed} xywh {320 254 80 20} down_box BORDER_BOX align 8
tooltip {AFC tracking speed} xywh {308 254 80 20} down_box BORDER_BOX align 8
code0 {o->add("Slow"); o->add("Normal"); o->add("Fast");}
code1 {o->value(progdefaults.rtty_afcspeed);}
} {}
@ -2152,7 +2164,7 @@ progdefaults.changed = true;} open
label {X-agc (hidden)}
callback {progdefaults.Xagc=o->value();
progdefaults.changed = true;}
xywh {320 223 62 22} down_box DOWN_BOX
xywh {308 284 62 22} down_box DOWN_BOX
code0 {o->value(progdefaults.Xagc);}
code1 {o->hide();}
}

Wyświetl plik

@ -226,6 +226,7 @@ extern Fl_Check_Button *btnCRCRLF;
extern Fl_Counter2 *cntrAUTOCRLF;
extern Fl_Check_Button *chkUOSrx;
extern Fl_Check_Button *chkUOStx;
extern Fl_Check_Button *chk_useMARKfreq;
extern Fl_Check_Button *btnPreferXhairScope;
extern Fl_Check_Button *chkPseudoFSK;
extern Fl_Choice *mnuRTTYAFCSpeed;

Wyświetl plik

@ -291,6 +291,9 @@
ELEM_(bool, UOStx, "UOSTX", \
"Revert to unshifted chars on a space (TX)", \
true) \
ELEM_(bool, useMARKfreq, "USEMARKFREQ", \
"Use MARK frequency for logging", \
true) \
ELEM_(bool, Xagc, "XAGC", \
"This setting is currently unused", \
false) \

Wyświetl plik

@ -113,6 +113,8 @@ private:
int counter;
int bitcntr;
int rxdata;
double cfreq; // center frequency between MARK/SPACE tones
double shift_offset; // 1/2 rtty_shift
double posfreq, negfreq;
double freqerrhi, freqerrlo;
double poserr, negerr;

Wyświetl plik

@ -593,16 +593,24 @@ void WFdisp::sig_data( double *sig, int len, int sr )
update_freq:
static char szFrequency[14];
if (rfc != 0) { // use a boolean for the waterfall
int cwoffset = 0;
string testmode = qso_opMODE->value();
if (testmode == "CW" or testmode == "CWR") {
cwoffset = progdefaults.CWsweetspot;
usb = ! (progdefaults.CWIsLSB ^ (testmode == "CWR"));
}
int cwoffset = 0;
int rttyoffset = 0;
trx_mode mode = active_modem->get_mode();
if (mode == MODE_RTTY && progdefaults.useMARKfreq) {
rttyoffset = (progdefaults.rtty_shift >= 0 ?
rtty::SHIFT[progdefaults.rtty_shift] : progdefaults.rtty_custom_shift);
rttyoffset /= 2;
if (active_modem->get_reverse()) rttyoffset *= -1;
}
string testmode = qso_opMODE->value();
if (testmode == "CW" or testmode == "CWR") {
cwoffset = progdefaults.CWsweetspot;
usb = ! (progdefaults.CWIsLSB ^ (testmode == "CWR"));
}
if (usb)
dfreq = rfc + active_modem->get_txfreq() -cwoffset;
dfreq = rfc + active_modem->get_txfreq() - cwoffset + rttyoffset;
else
dfreq = rfc - active_modem->get_txfreq() +cwoffset;
dfreq = rfc - active_modem->get_txfreq() + cwoffset - rttyoffset;
snprintf(szFrequency, sizeof(szFrequency), "%-.3f", dfreq / 1000.0);
} else {
dfreq = active_modem->get_txfreq();