kopia lustrzana https://github.com/jamescoxon/dl-fldigi
CW decoder update
* Cooperative programming effort, W1HKJ and AG1LE * Added matched filter implementation using FFT convolution filter * Added Self Organizing Map decoding. * Added adjustable upper/lower detection levels * Added level indicators on CW digiscope * combined new fft-convolution filter, SOM decoder & FIR filter * added configure controls for filter selection * modified CW digiscope display to show 9 dot intervals independent if WPM settingpull/1/head
rodzic
ff25baebcf
commit
f47119c7f5
|
@ -1,5 +1,6 @@
|
|||
## Copyright (C) 2007-2009 Stelios Bounanos, M0GLD (m0gld AT enotty DOT net)
|
||||
# Copyright (c) 2008 Dave Freese, W1HKJ (w1hkj AT w1hkj DOT com)
|
||||
# Copyright (c) 2012 Remi Chateauneu, F4ECW (remi dot chateauneu AT gmail DOT com)
|
||||
# License: GPLv3+: GNU GPL version 3 or later.
|
||||
|
||||
bin_PROGRAMS =
|
||||
|
@ -270,6 +271,7 @@ fldigi_SOURCES += \
|
|||
filters/fftfilt.cxx \
|
||||
filters/filters.cxx \
|
||||
filters/viterbi.cxx \
|
||||
filters/mfilt.cxx \
|
||||
globals/globals.cxx \
|
||||
include/htmlstrings.h \
|
||||
include/arq_io.h \
|
||||
|
@ -303,6 +305,7 @@ fldigi_SOURCES += \
|
|||
include/fft.h \
|
||||
include/fftfilt.h \
|
||||
include/filters.h \
|
||||
include/mfilt.h \
|
||||
include/fl_digi.h \
|
||||
include/fl_lock.h \
|
||||
include/fldigi-config.h \
|
||||
|
|
Plik diff jest za duży
Load Diff
|
@ -1147,6 +1147,41 @@ static void cb_sldrCWbandwidth(Fl_Value_Slider2* o, void*) {
|
|||
progdefaults.changed = true;
|
||||
}
|
||||
|
||||
Fl_Check_Button *btnCWuseSOMdecoding=(Fl_Check_Button *)0;
|
||||
|
||||
static void cb_btnCWuseSOMdecoding(Fl_Check_Button* o, void*) {
|
||||
progdefaults.CWuseSOMdecoding = o->value();
|
||||
progdefaults.changed = true;
|
||||
}
|
||||
|
||||
Fl_Counter2 *cntLower=(Fl_Counter2 *)0;
|
||||
|
||||
static void cb_cntLower(Fl_Counter2* o, void*) {
|
||||
progdefaults.CWlower = o->value();
|
||||
progdefaults.changed = true;
|
||||
}
|
||||
|
||||
Fl_Counter2 *cntUpper=(Fl_Counter2 *)0;
|
||||
|
||||
static void cb_cntUpper(Fl_Counter2* o, void*) {
|
||||
progdefaults.CWupper = o->value();
|
||||
progdefaults.changed = true;
|
||||
}
|
||||
|
||||
Fl_Check_Button *btnCWmfilt=(Fl_Check_Button *)0;
|
||||
|
||||
static void cb_btnCWmfilt(Fl_Check_Button* o, void*) {
|
||||
progdefaults.CWmfilt = o->value();
|
||||
progdefaults.changed = true;
|
||||
}
|
||||
|
||||
Fl_Check_Button *btnCWuseFFTfilter=(Fl_Check_Button *)0;
|
||||
|
||||
static void cb_btnCWuseFFTfilter(Fl_Check_Button* o, void*) {
|
||||
progdefaults.CWuse_fft_filter = o->value();
|
||||
progdefaults.changed = true;
|
||||
}
|
||||
|
||||
Fl_Check_Button *btnCWrcvTrack=(Fl_Check_Button *)0;
|
||||
|
||||
static void cb_btnCWrcvTrack(Fl_Check_Button* o, void*) {
|
||||
|
@ -1188,6 +1223,13 @@ static void cb_cntCWdefWPM(Fl_Counter2* o, void*) {
|
|||
progdefaults.changed = true;
|
||||
}
|
||||
|
||||
Fl_Check_Button *btnCWusefarnsworth=(Fl_Check_Button *)0;
|
||||
|
||||
static void cb_btnCWusefarnsworth(Fl_Check_Button* o, void*) {
|
||||
progdefaults.CWusefarnsworth=o->value();
|
||||
progdefaults.changed = true;
|
||||
}
|
||||
|
||||
Fl_Counter *cntCWlowerlimit=(Fl_Counter *)0;
|
||||
|
||||
static void cb_cntCWlowerlimit(Fl_Counter* o, void*) {
|
||||
|
@ -1219,13 +1261,6 @@ static void cb_sldrCWfarnsworth(Fl_Value_Slider2* o, void*) {
|
|||
progdefaults.changed = true;
|
||||
}
|
||||
|
||||
Fl_Check_Button *btnCWusefarnsworth=(Fl_Check_Button *)0;
|
||||
|
||||
static void cb_btnCWusefarnsworth(Fl_Check_Button* o, void*) {
|
||||
progdefaults.CWusefarnsworth=o->value();
|
||||
progdefaults.changed = true;
|
||||
}
|
||||
|
||||
Fl_Counter2 *cntCWweight=(Fl_Counter2 *)0;
|
||||
|
||||
static void cb_cntCWweight(Fl_Counter2* o, void*) {
|
||||
|
@ -3622,11 +3657,10 @@ Fl_Double_Window* ConfigureDialog() {
|
|||
{ tabsConfigure = new Fl_Tabs(0, 0, 598, 372);
|
||||
tabsConfigure->color(FL_LIGHT1);
|
||||
tabsConfigure->selection_color(FL_LIGHT1);
|
||||
{ tabOperator = new Fl_Group(2, 25, 596, 345, _("Operator"));
|
||||
{ tabOperator = new Fl_Group(0, 25, 598, 345, _("Operator"));
|
||||
tabOperator->tooltip(_("Operator information"));
|
||||
tabOperator->callback((Fl_Callback*)cb_tabOperator);
|
||||
tabOperator->when(FL_WHEN_CHANGED);
|
||||
tabOperator->hide();
|
||||
{ Fl_Group* o = new Fl_Group(4, 35, 592, 165, _("Station"));
|
||||
o->box(FL_ENGRAVED_FRAME);
|
||||
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
|
||||
|
@ -3706,12 +3740,12 @@ Fl_Double_Window* ConfigureDialog() {
|
|||
grpNoise->box(FL_ENGRAVED_FRAME);
|
||||
grpNoise->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
|
||||
grpNoise->hide();
|
||||
{ Fl_Check_Button* o = btnNoiseOn = new Fl_Check_Button(153, 214, 70, 15, _("Noise on"));
|
||||
{ Fl_Check_Button* o = btnNoiseOn = new Fl_Check_Button(153, 236, 70, 15, _("Noise on"));
|
||||
btnNoiseOn->down_box(FL_DOWN_BOX);
|
||||
btnNoiseOn->callback((Fl_Callback*)cb_btnNoiseOn);
|
||||
o->value(progdefaults.noise);
|
||||
} // Fl_Check_Button* btnNoiseOn
|
||||
{ Fl_Counter2* o = noiseDB = new Fl_Counter2(153, 252, 89, 21, _("dB"));
|
||||
{ Fl_Counter2* o = noiseDB = new Fl_Counter2(153, 274, 89, 21, _("dB"));
|
||||
noiseDB->type(1);
|
||||
noiseDB->box(FL_UP_BOX);
|
||||
noiseDB->color(FL_BACKGROUND_COLOR);
|
||||
|
@ -3733,7 +3767,7 @@ Fl_Double_Window* ConfigureDialog() {
|
|||
} // Fl_Group* grpNoise
|
||||
tabOperator->end();
|
||||
} // Fl_Group* tabOperator
|
||||
{ tabUI = new Fl_Group(0, 25, 598, 346, _("UI"));
|
||||
{ tabUI = new Fl_Group(0, 25, 598, 345, _("UI"));
|
||||
tabUI->hide();
|
||||
{ tabsUI = new Fl_Tabs(2, 25, 596, 345);
|
||||
tabsUI->selection_color(FL_LIGHT1);
|
||||
|
@ -4393,7 +4427,7 @@ ab and newline are automatically included."));
|
|||
} // Fl_Tabs* tabsUI
|
||||
tabUI->end();
|
||||
} // Fl_Group* tabUI
|
||||
{ tabWaterfall = new Fl_Group(2, 25, 596, 345, _("Waterfall"));
|
||||
{ tabWaterfall = new Fl_Group(0, 25, 598, 345, _("Waterfall"));
|
||||
tabWaterfall->hide();
|
||||
{ tabsWaterfall = new Fl_Tabs(2, 25, 596, 345);
|
||||
tabsWaterfall->color(FL_LIGHT1);
|
||||
|
@ -4753,12 +4787,12 @@ an merging"));
|
|||
} // Fl_Tabs* tabsWaterfall
|
||||
tabWaterfall->end();
|
||||
} // Fl_Group* tabWaterfall
|
||||
{ tabModems = new Fl_Group(0, 25, 598, 347, _("Modems"));
|
||||
{ tabModems = new Fl_Group(0, 25, 598, 345, _("Modems"));
|
||||
tabModems->hide();
|
||||
{ tabsModems = new Fl_Tabs(0, 25, 598, 345, _("2"));
|
||||
tabsModems->selection_color(FL_LIGHT1);
|
||||
tabsModems->align(Fl_Align(FL_ALIGN_TOP_RIGHT));
|
||||
{ tabContestia = new Fl_Group(2, 50, 594, 320, _("Cntst\'"));
|
||||
tabContestia->hide();
|
||||
{ tabContestia = new Fl_Group(0, 50, 598, 320, _("Cntst\'"));
|
||||
{ Fl_Group* o = new Fl_Group(6, 60, 588, 200, _("Contestia"));
|
||||
o->box(FL_ENGRAVED_FRAME);
|
||||
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
|
||||
|
@ -4831,17 +4865,16 @@ an merging"));
|
|||
} // Fl_Group* o
|
||||
tabContestia->end();
|
||||
} // Fl_Group* tabContestia
|
||||
{ tabCW = new Fl_Group(0, 50, 596, 320, _("CW"));
|
||||
{ tabCW = new Fl_Group(0, 50, 598, 320, _("CW"));
|
||||
tabCW->hide();
|
||||
{ tabsCW = new Fl_Tabs(4, 50, 592, 320);
|
||||
{ tabsCW = new Fl_Tabs(0, 50, 598, 320);
|
||||
tabsCW->selection_color(FL_LIGHT1);
|
||||
{ Fl_Group* o = new Fl_Group(4, 75, 592, 295, _("General"));
|
||||
o->align(Fl_Align(FL_ALIGN_TOP_LEFT));
|
||||
o->hide();
|
||||
{ Fl_Group* o = new Fl_Group(6, 85, 588, 130, _("Receive"));
|
||||
{ Fl_Group* o = new Fl_Group(6, 85, 588, 153, _("Receive"));
|
||||
o->box(FL_ENGRAVED_FRAME);
|
||||
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
|
||||
{ Fl_Value_Slider2* o = sldrCWbandwidth = new Fl_Value_Slider2(75, 115, 290, 20, _("Filter bandwidth"));
|
||||
{ Fl_Value_Slider2* o = sldrCWbandwidth = new Fl_Value_Slider2(20, 159, 400, 20, _("Bandwidth"));
|
||||
sldrCWbandwidth->tooltip(_("CW dsp filter bandwidth"));
|
||||
sldrCWbandwidth->type(1);
|
||||
sldrCWbandwidth->box(FL_DOWN_BOX);
|
||||
|
@ -4851,25 +4884,86 @@ an merging"));
|
|||
sldrCWbandwidth->labelfont(0);
|
||||
sldrCWbandwidth->labelsize(14);
|
||||
sldrCWbandwidth->labelcolor(FL_FOREGROUND_COLOR);
|
||||
sldrCWbandwidth->minimum(10);
|
||||
sldrCWbandwidth->maximum(500);
|
||||
sldrCWbandwidth->step(10);
|
||||
sldrCWbandwidth->value(150);
|
||||
sldrCWbandwidth->minimum(2);
|
||||
sldrCWbandwidth->maximum(400);
|
||||
sldrCWbandwidth->step(1);
|
||||
sldrCWbandwidth->value(20);
|
||||
sldrCWbandwidth->textsize(14);
|
||||
sldrCWbandwidth->callback((Fl_Callback*)cb_sldrCWbandwidth);
|
||||
sldrCWbandwidth->align(Fl_Align(FL_ALIGN_RIGHT));
|
||||
sldrCWbandwidth->align(Fl_Align(FL_ALIGN_TOP_LEFT));
|
||||
sldrCWbandwidth->when(FL_WHEN_CHANGED);
|
||||
o->value(progdefaults.CWbandwidth);
|
||||
o->labelsize(FL_NORMAL_SIZE); o->textsize(FL_NORMAL_SIZE);
|
||||
} // Fl_Value_Slider2* sldrCWbandwidth
|
||||
{ Fl_Check_Button* o = btnCWrcvTrack = new Fl_Check_Button(75, 150, 80, 20, _("Tracking"));
|
||||
{ Fl_Check_Button* o = btnCWuseSOMdecoding = new Fl_Check_Button(20, 118, 125, 20, _("SOM decoding"));
|
||||
btnCWuseSOMdecoding->tooltip(_("Self Organizing Mapping"));
|
||||
btnCWuseSOMdecoding->down_box(FL_DOWN_BOX);
|
||||
btnCWuseSOMdecoding->value(1);
|
||||
btnCWuseSOMdecoding->callback((Fl_Callback*)cb_btnCWuseSOMdecoding);
|
||||
o->value(progdefaults.CWuseSOMdecoding);
|
||||
} // Fl_Check_Button* btnCWuseSOMdecoding
|
||||
{ Fl_Counter2* o = cntLower = new Fl_Counter2(166, 118, 65, 20, _("Lower"));
|
||||
cntLower->tooltip(_("Detector low threshold"));
|
||||
cntLower->type(1);
|
||||
cntLower->box(FL_UP_BOX);
|
||||
cntLower->color(FL_BACKGROUND_COLOR);
|
||||
cntLower->selection_color(FL_INACTIVE_COLOR);
|
||||
cntLower->labeltype(FL_NORMAL_LABEL);
|
||||
cntLower->labelfont(0);
|
||||
cntLower->labelsize(14);
|
||||
cntLower->labelcolor(FL_FOREGROUND_COLOR);
|
||||
cntLower->minimum(0.01);
|
||||
cntLower->maximum(0.99);
|
||||
cntLower->step(0.01);
|
||||
cntLower->value(0.45);
|
||||
cntLower->callback((Fl_Callback*)cb_cntLower);
|
||||
cntLower->align(Fl_Align(FL_ALIGN_RIGHT));
|
||||
cntLower->when(FL_WHEN_CHANGED);
|
||||
o->value(progdefaults.CWlower);
|
||||
o->labelsize(FL_NORMAL_SIZE);
|
||||
} // Fl_Counter2* cntLower
|
||||
{ Fl_Counter2* o = cntUpper = new Fl_Counter2(289, 118, 65, 20, _("Upper"));
|
||||
cntUpper->tooltip(_("Detector high threshold"));
|
||||
cntUpper->type(1);
|
||||
cntUpper->box(FL_UP_BOX);
|
||||
cntUpper->color(FL_BACKGROUND_COLOR);
|
||||
cntUpper->selection_color(FL_INACTIVE_COLOR);
|
||||
cntUpper->labeltype(FL_NORMAL_LABEL);
|
||||
cntUpper->labelfont(0);
|
||||
cntUpper->labelsize(14);
|
||||
cntUpper->labelcolor(FL_FOREGROUND_COLOR);
|
||||
cntUpper->minimum(0.01);
|
||||
cntUpper->maximum(0.99);
|
||||
cntUpper->step(0.01);
|
||||
cntUpper->value(0.55);
|
||||
cntUpper->callback((Fl_Callback*)cb_cntUpper);
|
||||
cntUpper->align(Fl_Align(FL_ALIGN_RIGHT));
|
||||
cntUpper->when(FL_WHEN_CHANGED);
|
||||
o->value(progdefaults.CWupper);
|
||||
o->labelsize(FL_NORMAL_SIZE);
|
||||
} // Fl_Counter2* cntUpper
|
||||
{ Fl_Check_Button* o = btnCWmfilt = new Fl_Check_Button(427, 118, 80, 20, _("Matched Filter"));
|
||||
btnCWmfilt->tooltip(_("Matched Filter bandwidth"));
|
||||
btnCWmfilt->down_box(FL_DOWN_BOX);
|
||||
btnCWmfilt->value(1);
|
||||
btnCWmfilt->callback((Fl_Callback*)cb_btnCWmfilt);
|
||||
o->value(progdefaults.CWmfilt);
|
||||
} // Fl_Check_Button* btnCWmfilt
|
||||
{ Fl_Check_Button* o = btnCWuseFFTfilter = new Fl_Check_Button(427, 148, 125, 20, _("FFT filter"));
|
||||
btnCWuseFFTfilter->tooltip(_("FFT / FIR filter"));
|
||||
btnCWuseFFTfilter->down_box(FL_DOWN_BOX);
|
||||
btnCWuseFFTfilter->value(1);
|
||||
btnCWuseFFTfilter->callback((Fl_Callback*)cb_btnCWuseFFTfilter);
|
||||
o->value(progdefaults.CWuse_fft_filter);
|
||||
} // Fl_Check_Button* btnCWuseFFTfilter
|
||||
{ Fl_Check_Button* o = btnCWrcvTrack = new Fl_Check_Button(427, 178, 80, 20, _("Tracking"));
|
||||
btnCWrcvTrack->tooltip(_("Automatic Rx speed tracking"));
|
||||
btnCWrcvTrack->down_box(FL_DOWN_BOX);
|
||||
btnCWrcvTrack->value(1);
|
||||
btnCWrcvTrack->callback((Fl_Callback*)cb_btnCWrcvTrack);
|
||||
o->value(progdefaults.CWtrack);
|
||||
} // Fl_Check_Button* btnCWrcvTrack
|
||||
{ Fl_Counter2* o = cntCWrange = new Fl_Counter2(260, 150, 65, 20, _("Tracking range (WPM)"));
|
||||
{ Fl_Counter2* o = cntCWrange = new Fl_Counter2(427, 209, 65, 20, _("Range,WPM"));
|
||||
cntCWrange->tooltip(_("Range +/- wpm"));
|
||||
cntCWrange->type(1);
|
||||
cntCWrange->box(FL_UP_BOX);
|
||||
|
@ -4889,25 +4983,25 @@ an merging"));
|
|||
o->value(progdefaults.CWrange);
|
||||
o->labelsize(FL_NORMAL_SIZE);
|
||||
} // Fl_Counter2* cntCWrange
|
||||
{ valCWrcvWPM = new Fl_Value_Output(70, 185, 35, 20);
|
||||
{ valCWrcvWPM = new Fl_Value_Output(20, 209, 35, 20, _("Rx WPM"));
|
||||
valCWrcvWPM->color(FL_BACKGROUND2_COLOR);
|
||||
valCWrcvWPM->callback((Fl_Callback*)cb_valCWrcvWPM);
|
||||
valCWrcvWPM->align(Fl_Align(FL_ALIGN_TOP_LEFT));
|
||||
} // Fl_Value_Output* valCWrcvWPM
|
||||
{ prgsCWrcvWPM = new Fl_Progress(140, 185, 250, 20);
|
||||
{ prgsCWrcvWPM = new Fl_Progress(57, 209, 363, 20);
|
||||
prgsCWrcvWPM->tooltip(_("Tracked CW speed in WPM"));
|
||||
prgsCWrcvWPM->color(FL_BACKGROUND_COLOR);
|
||||
prgsCWrcvWPM->selection_color(FL_SELECTION_COLOR);
|
||||
prgsCWrcvWPM->align(Fl_Align(FL_ALIGN_CENTER));
|
||||
prgsCWrcvWPM->align(Fl_Align(FL_ALIGN_TOP_LEFT));
|
||||
} // Fl_Progress* prgsCWrcvWPM
|
||||
{ Fl_Box* o = new Fl_Box(360, 185, 70, 20, _("RX WPM"));
|
||||
o->align(Fl_Align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE));
|
||||
{ new Fl_Box(166, 96, 258, 17, _("Detector threshold"));
|
||||
} // Fl_Box* o
|
||||
o->end();
|
||||
} // Fl_Group* o
|
||||
{ Fl_Group* o = new Fl_Group(6, 215, 588, 150, _("Transmit"));
|
||||
{ Fl_Group* o = new Fl_Group(6, 239, 588, 126, _("Transmit"));
|
||||
o->box(FL_ENGRAVED_FRAME);
|
||||
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
|
||||
{ Fl_Value_Slider2* o = sldrCWxmtWPM = new Fl_Value_Slider2(62, 240, 400, 20, _("TX WPM"));
|
||||
{ Fl_Value_Slider2* o = sldrCWxmtWPM = new Fl_Value_Slider2(20, 267, 400, 20, _("TX WPM"));
|
||||
sldrCWxmtWPM->tooltip(_("My transmit CW WPM"));
|
||||
sldrCWxmtWPM->type(1);
|
||||
sldrCWxmtWPM->box(FL_DOWN_BOX);
|
||||
|
@ -4923,12 +5017,12 @@ an merging"));
|
|||
sldrCWxmtWPM->value(20);
|
||||
sldrCWxmtWPM->textsize(14);
|
||||
sldrCWxmtWPM->callback((Fl_Callback*)cb_sldrCWxmtWPM);
|
||||
sldrCWxmtWPM->align(Fl_Align(FL_ALIGN_RIGHT));
|
||||
sldrCWxmtWPM->align(Fl_Align(FL_ALIGN_TOP));
|
||||
sldrCWxmtWPM->when(FL_WHEN_CHANGED);
|
||||
o->value(progdefaults.CWspeed);
|
||||
o->labelsize(FL_NORMAL_SIZE); o->textsize(FL_NORMAL_SIZE);
|
||||
} // Fl_Value_Slider2* sldrCWxmtWPM
|
||||
{ Fl_Counter2* o = cntCWdefWPM = new Fl_Counter2(82, 281, 64, 20, _("Default"));
|
||||
{ Fl_Counter2* o = cntCWdefWPM = new Fl_Counter2(427, 267, 64, 20, _("Default"));
|
||||
cntCWdefWPM->tooltip(_("The default CW speed"));
|
||||
cntCWdefWPM->type(1);
|
||||
cntCWdefWPM->box(FL_UP_BOX);
|
||||
|
@ -4943,12 +5037,17 @@ an merging"));
|
|||
cntCWdefWPM->step(1);
|
||||
cntCWdefWPM->value(18);
|
||||
cntCWdefWPM->callback((Fl_Callback*)cb_cntCWdefWPM);
|
||||
cntCWdefWPM->align(Fl_Align(FL_ALIGN_TOP));
|
||||
cntCWdefWPM->align(Fl_Align(FL_ALIGN_RIGHT));
|
||||
cntCWdefWPM->when(FL_WHEN_CHANGED);
|
||||
o->value(progdefaults.defCWspeed);
|
||||
o->labelsize(FL_NORMAL_SIZE);
|
||||
} // Fl_Counter2* cntCWdefWPM
|
||||
{ Fl_Counter* o = cntCWlowerlimit = new Fl_Counter(239, 281, 65, 20, _("Lower limit"));
|
||||
{ Fl_Check_Button* o = btnCWusefarnsworth = new Fl_Check_Button(20, 303, 136, 15, _("Use Farnsworth"));
|
||||
btnCWusefarnsworth->down_box(FL_DOWN_BOX);
|
||||
btnCWusefarnsworth->callback((Fl_Callback*)cb_btnCWusefarnsworth);
|
||||
o->value(progdefaults.CWusefarnsworth);
|
||||
} // Fl_Check_Button* btnCWusefarnsworth
|
||||
{ Fl_Counter* o = cntCWlowerlimit = new Fl_Counter(427, 300, 65, 20, _("Lower limit"));
|
||||
cntCWlowerlimit->tooltip(_("No slower than this"));
|
||||
cntCWlowerlimit->type(1);
|
||||
cntCWlowerlimit->minimum(5);
|
||||
|
@ -4956,11 +5055,11 @@ an merging"));
|
|||
cntCWlowerlimit->step(5);
|
||||
cntCWlowerlimit->value(10);
|
||||
cntCWlowerlimit->callback((Fl_Callback*)cb_cntCWlowerlimit);
|
||||
cntCWlowerlimit->align(Fl_Align(FL_ALIGN_TOP));
|
||||
cntCWlowerlimit->align(Fl_Align(FL_ALIGN_RIGHT));
|
||||
o->value(progdefaults.CWlowerlimit);
|
||||
o->labelsize(FL_NORMAL_SIZE);
|
||||
} // Fl_Counter* cntCWlowerlimit
|
||||
{ Fl_Counter* o = cntCWupperlimit = new Fl_Counter(397, 281, 65, 20, _("Upper limit"));
|
||||
{ Fl_Counter* o = cntCWupperlimit = new Fl_Counter(427, 335, 65, 20, _("Upper limit"));
|
||||
cntCWupperlimit->tooltip(_("No faster than this"));
|
||||
cntCWupperlimit->type(1);
|
||||
cntCWupperlimit->minimum(25);
|
||||
|
@ -4968,11 +5067,11 @@ an merging"));
|
|||
cntCWupperlimit->step(5);
|
||||
cntCWupperlimit->value(100);
|
||||
cntCWupperlimit->callback((Fl_Callback*)cb_cntCWupperlimit);
|
||||
cntCWupperlimit->align(Fl_Align(FL_ALIGN_TOP));
|
||||
cntCWupperlimit->align(Fl_Align(FL_ALIGN_RIGHT));
|
||||
o->value(progdefaults.CWupperlimit);
|
||||
o->labelsize(FL_NORMAL_SIZE);
|
||||
} // Fl_Counter* cntCWupperlimit
|
||||
{ Fl_Value_Slider2* o = sldrCWfarnsworth = new Fl_Value_Slider2(62, 335, 400, 20, _("F-WPM"));
|
||||
{ Fl_Value_Slider2* o = sldrCWfarnsworth = new Fl_Value_Slider2(20, 335, 400, 20, _("F-WPM"));
|
||||
sldrCWfarnsworth->tooltip(_("My transmit CW WPM"));
|
||||
sldrCWfarnsworth->type(1);
|
||||
sldrCWfarnsworth->box(FL_DOWN_BOX);
|
||||
|
@ -4988,16 +5087,11 @@ an merging"));
|
|||
sldrCWfarnsworth->value(20);
|
||||
sldrCWfarnsworth->textsize(14);
|
||||
sldrCWfarnsworth->callback((Fl_Callback*)cb_sldrCWfarnsworth);
|
||||
sldrCWfarnsworth->align(Fl_Align(FL_ALIGN_RIGHT));
|
||||
sldrCWfarnsworth->align(Fl_Align(FL_ALIGN_TOP));
|
||||
sldrCWfarnsworth->when(FL_WHEN_CHANGED);
|
||||
o->value(progdefaults.CWfarnsworth);
|
||||
o->labelsize(FL_NORMAL_SIZE); o->textsize(FL_NORMAL_SIZE);
|
||||
} // Fl_Value_Slider2* sldrCWfarnsworth
|
||||
{ Fl_Check_Button* o = btnCWusefarnsworth = new Fl_Check_Button(82, 312, 180, 15, _("Use Farnsworth timing"));
|
||||
btnCWusefarnsworth->down_box(FL_DOWN_BOX);
|
||||
btnCWusefarnsworth->callback((Fl_Callback*)cb_btnCWusefarnsworth);
|
||||
o->value(progdefaults.CWusefarnsworth);
|
||||
} // Fl_Check_Button* btnCWusefarnsworth
|
||||
o->end();
|
||||
} // Fl_Group* o
|
||||
o->end();
|
||||
|
@ -5150,6 +5244,7 @@ an merging"));
|
|||
} // Fl_Group* o
|
||||
{ Fl_Group* o = new Fl_Group(4, 75, 592, 295, _("Prosigns"));
|
||||
o->align(Fl_Align(FL_ALIGN_TOP_LEFT));
|
||||
o->hide();
|
||||
{ Fl_Group* o = new Fl_Group(6, 86, 588, 280);
|
||||
o->box(FL_ENGRAVED_FRAME);
|
||||
{ Fl_Check_Button* o = btnCW_use_paren = new Fl_Check_Button(289, 249, 68, 15, _("Use \'(\' paren not KN"));
|
||||
|
@ -5228,7 +5323,7 @@ an merging"));
|
|||
} // Fl_Tabs* tabsCW
|
||||
tabCW->end();
|
||||
} // Fl_Group* tabCW
|
||||
{ tabDomEX = new Fl_Group(2, 50, 594, 320, _("Dom"));
|
||||
{ tabDomEX = new Fl_Group(0, 50, 598, 320, _("Dom"));
|
||||
tabDomEX->hide();
|
||||
{ Fl_Group* o = new Fl_Group(6, 60, 588, 180);
|
||||
o->box(FL_ENGRAVED_FRAME);
|
||||
|
@ -5320,7 +5415,7 @@ an merging"));
|
|||
} // Fl_Group* o
|
||||
tabDomEX->end();
|
||||
} // Fl_Group* tabDomEX
|
||||
{ tabFeld = new Fl_Group(2, 50, 594, 320, _("Feld"));
|
||||
{ tabFeld = new Fl_Group(0, 50, 598, 320, _("Feld"));
|
||||
tabFeld->hide();
|
||||
{ Fl_Group* o = new Fl_Group(6, 60, 588, 150);
|
||||
o->box(FL_ENGRAVED_FRAME);
|
||||
|
@ -5407,7 +5502,7 @@ an merging"));
|
|||
} // Fl_Group* o
|
||||
tabFeld->end();
|
||||
} // Fl_Group* tabFeld
|
||||
{ tabMT63 = new Fl_Group(2, 50, 594, 320, _("MT63"));
|
||||
{ tabMT63 = new Fl_Group(0, 50, 598, 320, _("MT63"));
|
||||
tabMT63->hide();
|
||||
{ Fl_Group* o = new Fl_Group(6, 60, 588, 115);
|
||||
o->box(FL_ENGRAVED_FRAME);
|
||||
|
@ -5470,7 +5565,7 @@ an merging"));
|
|||
} // Fl_Group* o
|
||||
tabMT63->end();
|
||||
} // Fl_Group* tabMT63
|
||||
{ tabOlivia = new Fl_Group(2, 50, 594, 320, _("Olivia"));
|
||||
{ tabOlivia = new Fl_Group(0, 50, 598, 320, _("Olivia"));
|
||||
tabOlivia->hide();
|
||||
{ Fl_Group* o = new Fl_Group(6, 60, 588, 200);
|
||||
o->box(FL_ENGRAVED_FRAME);
|
||||
|
@ -5542,7 +5637,7 @@ an merging"));
|
|||
} // Fl_Group* o
|
||||
tabOlivia->end();
|
||||
} // Fl_Group* tabOlivia
|
||||
{ tabPSK = new Fl_Group(2, 50, 594, 320, _("PSK"));
|
||||
{ tabPSK = new Fl_Group(0, 50, 598, 320, _("PSK"));
|
||||
tabPSK->hide();
|
||||
{ Fl_Group* o = new Fl_Group(6, 60, 588, 98, _("AFC behavior"));
|
||||
o->box(FL_ENGRAVED_FRAME);
|
||||
|
@ -5636,7 +5731,7 @@ an merging"));
|
|||
} // Fl_Group* o
|
||||
tabPSK->end();
|
||||
} // Fl_Group* tabPSK
|
||||
{ tabRTTY = new Fl_Group(2, 50, 594, 320, _("RTTY"));
|
||||
{ tabRTTY = new Fl_Group(0, 50, 598, 320, _("RTTY"));
|
||||
tabRTTY->hide();
|
||||
{ Fl_Group* o = new Fl_Group(6, 60, 588, 300);
|
||||
o->box(FL_ENGRAVED_FRAME);
|
||||
|
@ -5824,7 +5919,8 @@ an merging"));
|
|||
} // Fl_Group* o
|
||||
tabRTTY->end();
|
||||
} // Fl_Group* tabRTTY
|
||||
{ tabTHOR = new Fl_Group(2, 50, 594, 320, _("Thor"));
|
||||
{ tabTHOR = new Fl_Group(0, 50, 598, 320, _("Thor"));
|
||||
tabTHOR->hide();
|
||||
{ Fl_Group* o = new Fl_Group(5, 60, 588, 270);
|
||||
o->box(FL_ENGRAVED_FRAME);
|
||||
{ txtTHORSecondary = new Fl_Input2(91, 87, 360, 40, _("Secondary Text"));
|
||||
|
@ -5929,7 +6025,7 @@ ng)"));
|
|||
} // Fl_Group* o
|
||||
tabTHOR->end();
|
||||
} // Fl_Group* tabTHOR
|
||||
{ tabPacket = new Fl_Group(2, 50, 594, 320, _("Packet"));
|
||||
{ tabPacket = new Fl_Group(0, 50, 598, 320, _("Packet"));
|
||||
tabPacket->hide();
|
||||
{ Fl_Group* o = new Fl_Group(6, 60, 588, 296);
|
||||
o->box(FL_ENGRAVED_FRAME);
|
||||
|
@ -6070,7 +6166,7 @@ ng)"));
|
|||
} // Fl_Group* o
|
||||
tabPacket->end();
|
||||
} // Fl_Group* tabPacket
|
||||
{ tabNavtex = new Fl_Group(2, 50, 594, 320, _("Navtex"));
|
||||
{ tabNavtex = new Fl_Group(0, 50, 598, 320, _("Navtex"));
|
||||
tabNavtex->hide();
|
||||
{ Fl_Group* o = new Fl_Group(6, 60, 588, 300);
|
||||
{ Fl_Check_Button* o = btnNvtxAdifLog = new Fl_Check_Button(81, 87, 235, 30, _("Log Navtex messages to Adif file"));
|
||||
|
@ -6092,7 +6188,7 @@ ng)"));
|
|||
} // Fl_Group* o
|
||||
tabNavtex->end();
|
||||
} // Fl_Group* tabNavtex
|
||||
{ tabWefax = new Fl_Group(2, 50, 594, 320, _("Wefax"));
|
||||
{ tabWefax = new Fl_Group(0, 50, 598, 320, _("Wefax"));
|
||||
tabWefax->hide();
|
||||
{ Fl_Group* o = new Fl_Group(6, 60, 588, 300);
|
||||
{ Fl_Check_Button* o = btnWefaxAdifLog = new Fl_Check_Button(97, 141, 235, 30, _("Log Wefax messages to Adif file"));
|
||||
|
@ -6165,7 +6261,7 @@ ng)"));
|
|||
} // Fl_Tabs* tabsModems
|
||||
tabModems->end();
|
||||
} // Fl_Group* tabModems
|
||||
{ tabRig = new Fl_Group(2, 25, 596, 345, _("Rig"));
|
||||
{ tabRig = new Fl_Group(0, 25, 598, 345, _("Rig"));
|
||||
tabRig->tooltip(_("Transceiver control"));
|
||||
tabRig->hide();
|
||||
{ tabsRig = new Fl_Tabs(4, 25, 592, 345);
|
||||
|
@ -6683,7 +6779,7 @@ ng)"));
|
|||
} // Fl_Tabs* tabsRig
|
||||
tabRig->end();
|
||||
} // Fl_Group* tabRig
|
||||
{ tabSoundCard = new Fl_Group(2, 25, 596, 345, _("Audio"));
|
||||
{ tabSoundCard = new Fl_Group(0, 25, 598, 345, _("Audio"));
|
||||
tabSoundCard->tooltip(_("Audio devices"));
|
||||
tabSoundCard->hide();
|
||||
{ tabsSoundCard = new Fl_Tabs(2, 25, 596, 345);
|
||||
|
@ -6948,7 +7044,7 @@ nce.\nYou may change the state from either location.\n..."));
|
|||
} // Fl_Tabs* tabsSoundCard
|
||||
tabSoundCard->end();
|
||||
} // Fl_Group* tabSoundCard
|
||||
{ tabID = new Fl_Group(2, 25, 596, 345, _("ID"));
|
||||
{ tabID = new Fl_Group(0, 25, 598, 345, _("ID"));
|
||||
tabID->hide();
|
||||
{ Fl_Group* o = new Fl_Group(6, 35, 588, 103, _("Video Preamble ID"));
|
||||
o->box(FL_ENGRAVED_FRAME);
|
||||
|
@ -7133,7 +7229,7 @@ d frequency"));
|
|||
} // Fl_Group* o
|
||||
tabID->end();
|
||||
} // Fl_Group* tabID
|
||||
{ tabMisc = new Fl_Group(2, 25, 596, 345, _("Misc"));
|
||||
{ tabMisc = new Fl_Group(0, 25, 598, 345, _("Misc"));
|
||||
tabMisc->hide();
|
||||
{ tabsMisc = new Fl_Tabs(4, 25, 592, 345);
|
||||
tabsMisc->selection_color(FL_LIGHT1);
|
||||
|
@ -7597,7 +7693,7 @@ d frequency"));
|
|||
} // Fl_Tabs* tabsMisc
|
||||
tabMisc->end();
|
||||
} // Fl_Group* tabMisc
|
||||
{ tabQRZ = new Fl_Group(2, 25, 596, 345, _("Web"));
|
||||
{ tabQRZ = new Fl_Group(0, 25, 598, 345, _("Web"));
|
||||
tabQRZ->tooltip(_("Callsign database"));
|
||||
tabQRZ->hide();
|
||||
{ Fl_Tabs* o = new Fl_Tabs(4, 25, 592, 345);
|
||||
|
|
|
@ -138,15 +138,15 @@ static const char szBaudRates[] = "300|600|1200|2400|4800|9600|19200|38400|57600
|
|||
static const char szProsigns[] = "~|%|&|+|=|{|}|<|>|[|]| ";} {}
|
||||
Fl_Window {} {
|
||||
label {Fldigi configuration} open
|
||||
xywh {183 175 600 400} type Double color 45 selection_color 51 labelsize 18 align 80 hide non_modal
|
||||
xywh {604 62 600 400} type Double color 45 selection_color 51 labelsize 18 align 80 non_modal visible
|
||||
} {
|
||||
Fl_Tabs tabsConfigure {open
|
||||
xywh {0 0 598 372} color 50 selection_color 50
|
||||
} {
|
||||
Fl_Group tabOperator {
|
||||
label Operator
|
||||
callback {progdefaults.changed = true;}
|
||||
tooltip {Operator information} xywh {2 25 596 345} when 1 hide
|
||||
callback {progdefaults.changed = true;} selected
|
||||
tooltip {Operator information} xywh {0 25 598 345} when 1
|
||||
} {
|
||||
Fl_Group {} {
|
||||
label Station open
|
||||
|
@ -212,21 +212,21 @@ progdefaults.changed = true;}
|
|||
Fl_Check_Button btnNoiseOn {
|
||||
label {Noise on}
|
||||
callback {progdefaults.noise = o->value();}
|
||||
xywh {153 214 70 15} down_box DOWN_BOX
|
||||
xywh {153 236 70 15} down_box DOWN_BOX
|
||||
code0 {o->value(progdefaults.noise);}
|
||||
}
|
||||
Fl_Counter noiseDB {
|
||||
label dB
|
||||
callback {progdefaults.s2n = o->value();}
|
||||
xywh {153 252 89 21} type Simple align 4 minimum -18 maximum 60 step 1 value 20
|
||||
xywh {153 274 89 21} type Simple align 4 minimum -18 maximum 60 step 1 value 20
|
||||
code0 {o->value(progdefaults.s2n);}
|
||||
class Fl_Counter2
|
||||
}
|
||||
}
|
||||
}
|
||||
Fl_Group tabUI {
|
||||
label UI open
|
||||
xywh {0 25 598 346} hide
|
||||
label UI
|
||||
xywh {0 25 598 345} hide
|
||||
} {
|
||||
Fl_Tabs tabsUI {open
|
||||
xywh {2 25 596 345} selection_color 50
|
||||
|
@ -1028,7 +1028,7 @@ WF_UI();}
|
|||
}
|
||||
Fl_Group tabWaterfall {
|
||||
label Waterfall
|
||||
xywh {2 25 596 345} hide
|
||||
xywh {0 25 598 345} hide
|
||||
} {
|
||||
Fl_Tabs tabsWaterfall {open
|
||||
xywh {2 25 596 345} color 50 selection_color 50
|
||||
|
@ -1397,7 +1397,7 @@ behaves inside the waterfall} xywh {69 196 150 22} down_box BORDER_BOX align 8
|
|||
}
|
||||
Fl_Group tabModems {
|
||||
label Modems open
|
||||
xywh {0 25 598 347}
|
||||
xywh {0 25 598 345} hide
|
||||
} {
|
||||
Fl_Tabs tabsModems {
|
||||
label 2 open
|
||||
|
@ -1405,7 +1405,7 @@ behaves inside the waterfall} xywh {69 196 150 22} down_box BORDER_BOX align 8
|
|||
} {
|
||||
Fl_Group tabContestia {
|
||||
label {Cntst'}
|
||||
xywh {2 50 594 320} hide
|
||||
xywh {0 50 598 320}
|
||||
} {
|
||||
Fl_Group {} {
|
||||
label Contestia
|
||||
|
@ -1464,59 +1464,99 @@ progdefaults.changed = true;}
|
|||
}
|
||||
Fl_Group tabCW {
|
||||
label CW open
|
||||
xywh {0 50 596 320} hide
|
||||
xywh {0 50 598 320} hide
|
||||
} {
|
||||
Fl_Tabs tabsCW {
|
||||
xywh {4 50 592 320} selection_color 50
|
||||
Fl_Tabs tabsCW {open
|
||||
xywh {0 50 598 320} selection_color 50
|
||||
} {
|
||||
Fl_Group {} {
|
||||
label General
|
||||
xywh {4 75 592 295} align 5 hide
|
||||
label General open
|
||||
xywh {4 75 592 295} align 5
|
||||
} {
|
||||
Fl_Group {} {
|
||||
label Receive open
|
||||
xywh {6 85 588 130} box ENGRAVED_FRAME align 21
|
||||
xywh {6 85 588 153} box ENGRAVED_FRAME align 21
|
||||
} {
|
||||
Fl_Value_Slider sldrCWbandwidth {
|
||||
label {Filter bandwidth}
|
||||
label Bandwidth
|
||||
callback {progdefaults.CWbandwidth = (int)o->value();
|
||||
progdefaults.changed = true;}
|
||||
tooltip {CW dsp filter bandwidth} xywh {75 115 290 20} type Horizontal align 8 minimum 10 maximum 500 step 10 value 150 textsize 14
|
||||
tooltip {CW dsp filter bandwidth} xywh {20 159 400 20} type Horizontal align 5 minimum 2 maximum 400 step 1 value 20 textsize 14
|
||||
code0 {o->value(progdefaults.CWbandwidth);}
|
||||
code1 {o->labelsize(FL_NORMAL_SIZE); o->textsize(FL_NORMAL_SIZE);}
|
||||
class Fl_Value_Slider2
|
||||
}
|
||||
Fl_Check_Button btnCWuseSOMdecoding {
|
||||
label {SOM decoding}
|
||||
callback {progdefaults.CWuseSOMdecoding = o->value();
|
||||
progdefaults.changed = true;}
|
||||
tooltip {Self Organizing Mapping} xywh {20 118 125 20} down_box DOWN_BOX value 1
|
||||
code0 {o->value(progdefaults.CWuseSOMdecoding);}
|
||||
}
|
||||
Fl_Counter cntLower {
|
||||
label Lower
|
||||
callback {progdefaults.CWlower = o->value();
|
||||
progdefaults.changed = true;}
|
||||
tooltip {Detector low threshold} xywh {166 118 65 20} type Simple align 8 minimum 0.01 maximum 0.99 step 0.01 value 0.45
|
||||
code0 {o->value(progdefaults.CWlower);}
|
||||
code1 {o->labelsize(FL_NORMAL_SIZE);}
|
||||
class Fl_Counter2
|
||||
}
|
||||
Fl_Counter cntUpper {
|
||||
label Upper
|
||||
callback {progdefaults.CWupper = o->value();
|
||||
progdefaults.changed = true;}
|
||||
tooltip {Detector high threshold} xywh {289 118 65 20} type Simple align 8 minimum 0.01 maximum 0.99 step 0.01 value 0.55
|
||||
code0 {o->value(progdefaults.CWupper);}
|
||||
code1 {o->labelsize(FL_NORMAL_SIZE);}
|
||||
class Fl_Counter2
|
||||
}
|
||||
Fl_Check_Button btnCWmfilt {
|
||||
label {Matched Filter}
|
||||
callback {progdefaults.CWmfilt = o->value();
|
||||
progdefaults.changed = true;}
|
||||
tooltip {Matched Filter bandwidth} xywh {427 118 80 20} down_box DOWN_BOX value 1
|
||||
code0 {o->value(progdefaults.CWmfilt);}
|
||||
}
|
||||
Fl_Check_Button btnCWuseFFTfilter {
|
||||
label {FFT filter}
|
||||
callback {progdefaults.CWuse_fft_filter = o->value();
|
||||
progdefaults.changed = true;}
|
||||
tooltip {FFT / FIR filter} xywh {427 148 125 20} down_box DOWN_BOX value 1
|
||||
code0 {o->value(progdefaults.CWuse_fft_filter);}
|
||||
}
|
||||
Fl_Check_Button btnCWrcvTrack {
|
||||
label Tracking
|
||||
callback {progdefaults.CWtrack = o->value();
|
||||
progdefaults.changed = true;}
|
||||
tooltip {Automatic Rx speed tracking} xywh {75 150 80 20} down_box DOWN_BOX value 1
|
||||
tooltip {Automatic Rx speed tracking} xywh {427 178 80 20} down_box DOWN_BOX value 1
|
||||
code0 {o->value(progdefaults.CWtrack);}
|
||||
}
|
||||
Fl_Counter cntCWrange {
|
||||
label {Tracking range (WPM)}
|
||||
label {Range,WPM}
|
||||
callback {progdefaults.CWrange = (int)o->value();
|
||||
progdefaults.changed = true;}
|
||||
tooltip {Range +/- wpm} xywh {260 150 65 20} type Simple align 8 minimum 5 maximum 25 step 1 value 10
|
||||
tooltip {Range +/- wpm} xywh {427 209 65 20} type Simple align 8 minimum 5 maximum 25 step 1 value 10
|
||||
code0 {o->value(progdefaults.CWrange);}
|
||||
code1 {o->labelsize(FL_NORMAL_SIZE);}
|
||||
class Fl_Counter2
|
||||
}
|
||||
Fl_Value_Output valCWrcvWPM {
|
||||
label {Rx WPM}
|
||||
callback {progdefaults.changed = true;}
|
||||
xywh {70 185 35 20} color 7
|
||||
xywh {20 209 35 20} color 7 align 5
|
||||
}
|
||||
Fl_Progress prgsCWrcvWPM {
|
||||
tooltip {Tracked CW speed in WPM} xywh {140 185 250 20} color 49 selection_color 15 align 0
|
||||
tooltip {Tracked CW speed in WPM} xywh {57 209 363 20} color 49 selection_color 15 align 5
|
||||
}
|
||||
Fl_Box {} {
|
||||
label {RX WPM}
|
||||
xywh {360 185 70 20} align 20
|
||||
label {Detector threshold}
|
||||
xywh {166 96 258 17}
|
||||
}
|
||||
}
|
||||
Fl_Group {} {
|
||||
label Transmit open
|
||||
xywh {6 215 588 150} box ENGRAVED_FRAME align 21
|
||||
xywh {6 239 588 126} box ENGRAVED_FRAME align 21
|
||||
} {
|
||||
Fl_Value_Slider sldrCWxmtWPM {
|
||||
label {TX WPM}
|
||||
|
@ -1527,7 +1567,7 @@ if (sldrCWfarnsworth->value() > progdefaults.CWspeed)
|
|||
sldrCWfarnsworth->value(progdefaults.CWspeed);
|
||||
progdefaults.changed = true;
|
||||
sync_cw_parameters();}
|
||||
tooltip {My transmit CW WPM} xywh {62 240 400 20} type Horizontal align 8 minimum 5 maximum 100 step 1 value 20 textsize 14
|
||||
tooltip {My transmit CW WPM} xywh {20 267 400 20} type Horizontal align 1 minimum 5 maximum 100 step 1 value 20 textsize 14
|
||||
code0 {o->value(progdefaults.CWspeed);}
|
||||
code1 {o->labelsize(FL_NORMAL_SIZE); o->textsize(FL_NORMAL_SIZE);}
|
||||
class Fl_Value_Slider2
|
||||
|
@ -1536,11 +1576,18 @@ sync_cw_parameters();}
|
|||
label Default
|
||||
callback {progdefaults.defCWspeed = (int)o->value();
|
||||
progdefaults.changed = true;}
|
||||
tooltip {The default CW speed} xywh {82 281 64 20} type Simple align 1 minimum 5 maximum 200 step 1 value 18
|
||||
tooltip {The default CW speed} xywh {427 267 64 20} type Simple align 8 minimum 5 maximum 200 step 1 value 18
|
||||
code0 {o->value(progdefaults.defCWspeed);}
|
||||
code1 {o->labelsize(FL_NORMAL_SIZE);}
|
||||
class Fl_Counter2
|
||||
}
|
||||
Fl_Check_Button btnCWusefarnsworth {
|
||||
label {Use Farnsworth}
|
||||
callback {progdefaults.CWusefarnsworth=o->value();
|
||||
progdefaults.changed = true;}
|
||||
xywh {20 303 136 15} down_box DOWN_BOX
|
||||
code0 {o->value(progdefaults.CWusefarnsworth);}
|
||||
}
|
||||
Fl_Counter cntCWlowerlimit {
|
||||
label {Lower limit}
|
||||
callback {progdefaults.CWlowerlimit = (int)o->value();
|
||||
|
@ -1550,7 +1597,7 @@ sldrCWxmtWPM->value(progdefaults.CWspeed);
|
|||
sldrCWxmtWPM->redraw();
|
||||
cntCWupperlimit->minimum(progdefaults.CWlowerlimit+20);
|
||||
cntCW_WPM->minimum(progdefaults.CWlowerlimit);}
|
||||
tooltip {No slower than this} xywh {239 281 65 20} type Simple align 1 minimum 5 maximum 20 step 5 value 10
|
||||
tooltip {No slower than this} xywh {427 300 65 20} type Simple align 8 minimum 5 maximum 20 step 5 value 10
|
||||
code0 {o->value(progdefaults.CWlowerlimit);}
|
||||
code1 {o->labelsize(FL_NORMAL_SIZE);}
|
||||
}
|
||||
|
@ -1563,7 +1610,7 @@ sldrCWxmtWPM->value(progdefaults.CWspeed);
|
|||
sldrCWxmtWPM->redraw();
|
||||
cntCWlowerlimit->maximum(progdefaults.CWupperlimit-20);
|
||||
cntCW_WPM->maximum(progdefaults.CWupperlimit);}
|
||||
tooltip {No faster than this} xywh {397 281 65 20} type Simple align 1 minimum 25 maximum 200 step 5 value 100
|
||||
tooltip {No faster than this} xywh {427 335 65 20} type Simple align 8 minimum 25 maximum 200 step 5 value 100
|
||||
code0 {o->value(progdefaults.CWupperlimit);}
|
||||
code1 {o->labelsize(FL_NORMAL_SIZE);}
|
||||
}
|
||||
|
@ -1571,18 +1618,11 @@ cntCW_WPM->maximum(progdefaults.CWupperlimit);}
|
|||
label {F-WPM}
|
||||
callback {progdefaults.CWfarnsworth = (int)o->value();
|
||||
progdefaults.changed = true;}
|
||||
tooltip {My transmit CW WPM} xywh {62 335 400 20} type Horizontal align 8 minimum 5 maximum 100 step 1 value 20 textsize 14
|
||||
tooltip {My transmit CW WPM} xywh {20 335 400 20} type Horizontal align 1 minimum 5 maximum 100 step 1 value 20 textsize 14
|
||||
code0 {o->value(progdefaults.CWfarnsworth);}
|
||||
code1 {o->labelsize(FL_NORMAL_SIZE); o->textsize(FL_NORMAL_SIZE);}
|
||||
class Fl_Value_Slider2
|
||||
}
|
||||
Fl_Check_Button btnCWusefarnsworth {
|
||||
label {Use Farnsworth timing}
|
||||
callback {progdefaults.CWusefarnsworth=o->value();
|
||||
progdefaults.changed = true;}
|
||||
xywh {82 312 180 15} down_box DOWN_BOX
|
||||
code0 {o->value(progdefaults.CWusefarnsworth);}
|
||||
}
|
||||
}
|
||||
}
|
||||
Fl_Group {} {
|
||||
|
@ -1696,7 +1736,7 @@ progdefaults.changed = true;}
|
|||
}
|
||||
Fl_Group {} {
|
||||
label Prosigns
|
||||
xywh {4 75 592 295} align 5
|
||||
xywh {4 75 592 295} align 5 hide
|
||||
} {
|
||||
Fl_Group {} {open
|
||||
xywh {6 86 588 280} box ENGRAVED_FRAME
|
||||
|
@ -1867,7 +1907,7 @@ progdefaults.changed = true;} open
|
|||
}
|
||||
Fl_Group tabDomEX {
|
||||
label Dom
|
||||
xywh {2 50 594 320} hide
|
||||
xywh {0 50 598 320} hide
|
||||
} {
|
||||
Fl_Group {} {open
|
||||
xywh {6 60 588 180} box ENGRAVED_FRAME
|
||||
|
@ -1928,7 +1968,7 @@ progdefaults.changed = true;}
|
|||
}
|
||||
Fl_Group tabFeld {
|
||||
label Feld
|
||||
xywh {2 50 594 320} hide
|
||||
xywh {0 50 598 320} hide
|
||||
} {
|
||||
Fl_Group {} {open
|
||||
xywh {6 60 588 150} box ENGRAVED_FRAME
|
||||
|
@ -2001,7 +2041,7 @@ progdefaults.changed = true;}
|
|||
}
|
||||
Fl_Group tabMT63 {
|
||||
label MT63
|
||||
xywh {2 50 594 320} hide
|
||||
xywh {0 50 598 320} hide
|
||||
} {
|
||||
Fl_Group {} {open
|
||||
xywh {6 60 588 115} box ENGRAVED_FRAME align 21
|
||||
|
@ -2076,7 +2116,7 @@ progdefaults.changed = true;}
|
|||
}
|
||||
Fl_Group tabOlivia {
|
||||
label Olivia
|
||||
xywh {2 50 594 320} hide
|
||||
xywh {0 50 598 320} hide
|
||||
} {
|
||||
Fl_Group {} {open
|
||||
xywh {6 60 588 200} box ENGRAVED_FRAME
|
||||
|
@ -2134,7 +2174,7 @@ progdefaults.changed = true;}
|
|||
}
|
||||
Fl_Group tabPSK {
|
||||
label PSK
|
||||
xywh {2 50 594 320} hide
|
||||
xywh {0 50 598 320} hide
|
||||
} {
|
||||
Fl_Group {} {
|
||||
label {AFC behavior} open
|
||||
|
@ -2201,7 +2241,7 @@ progdefaults.changed = true;}
|
|||
}
|
||||
Fl_Group tabRTTY {
|
||||
label RTTY
|
||||
xywh {2 50 594 320} hide
|
||||
xywh {0 50 598 320} hide
|
||||
} {
|
||||
Fl_Group {} {open
|
||||
xywh {6 60 588 300} box ENGRAVED_FRAME
|
||||
|
@ -2392,8 +2432,8 @@ progdefaults.changed = true;}
|
|||
}
|
||||
}
|
||||
Fl_Group tabTHOR {
|
||||
label Thor open
|
||||
xywh {2 50 594 320}
|
||||
label Thor
|
||||
xywh {0 50 598 320} hide
|
||||
} {
|
||||
Fl_Group {} {open
|
||||
xywh {5 60 588 270} box ENGRAVED_FRAME
|
||||
|
@ -2468,7 +2508,7 @@ progdefaults.changed = true;}
|
|||
}
|
||||
Fl_Group tabPacket {
|
||||
label Packet
|
||||
xywh {2 50 594 320} hide
|
||||
xywh {0 50 598 320} hide
|
||||
} {
|
||||
Fl_Group {} {open
|
||||
xywh {6 60 588 296} box ENGRAVED_FRAME
|
||||
|
@ -2590,7 +2630,7 @@ progdefaults.changed = true;}
|
|||
}
|
||||
Fl_Group tabNavtex {
|
||||
label Navtex
|
||||
xywh {2 50 594 320} hide
|
||||
xywh {0 50 598 320} hide
|
||||
} {
|
||||
Fl_Group {} {open
|
||||
xywh {6 60 588 300}
|
||||
|
@ -2620,7 +2660,7 @@ fc->show();}
|
|||
}
|
||||
Fl_Group tabWefax {
|
||||
label Wefax
|
||||
xywh {2 50 594 320} hide
|
||||
xywh {0 50 598 320} hide
|
||||
} {
|
||||
Fl_Group {} {open
|
||||
xywh {6 60 588 300}
|
||||
|
@ -2693,7 +2733,7 @@ progdefaults.changed = true;}
|
|||
}
|
||||
Fl_Group tabRig {
|
||||
label Rig
|
||||
tooltip {Transceiver control} xywh {2 25 596 345} hide
|
||||
tooltip {Transceiver control} xywh {0 25 598 345} hide
|
||||
} {
|
||||
Fl_Tabs tabsRig {open
|
||||
xywh {4 25 592 345} selection_color 50
|
||||
|
@ -3311,7 +3351,7 @@ progdefaults.changed = true;}
|
|||
}
|
||||
Fl_Group tabSoundCard {
|
||||
label Audio
|
||||
tooltip {Audio devices} xywh {2 25 596 345} hide
|
||||
tooltip {Audio devices} xywh {0 25 598 345} hide
|
||||
} {
|
||||
Fl_Tabs tabsSoundCard {open
|
||||
xywh {2 25 596 345} selection_color 50
|
||||
|
@ -3686,7 +3726,7 @@ if (o->value()) {
|
|||
}
|
||||
Fl_Group tabID {
|
||||
label ID
|
||||
xywh {2 25 596 345} hide
|
||||
xywh {0 25 598 345} hide
|
||||
} {
|
||||
Fl_Group {} {
|
||||
label {Video Preamble ID} open
|
||||
|
@ -3874,7 +3914,7 @@ progdefaults.changed = true;}
|
|||
}
|
||||
Fl_Group tabMisc {
|
||||
label Misc
|
||||
xywh {2 25 596 345} hide
|
||||
xywh {0 25 598 345} hide
|
||||
} {
|
||||
Fl_Tabs tabsMisc {open
|
||||
xywh {4 25 592 345} selection_color 50
|
||||
|
@ -4312,7 +4352,7 @@ progdefaults.changed = true;}
|
|||
}
|
||||
Fl_Group tabQRZ {
|
||||
label Web
|
||||
tooltip {Callsign database} xywh {2 25 596 345} hide
|
||||
tooltip {Callsign database} xywh {0 25 598 345} hide
|
||||
} {
|
||||
Fl_Tabs {} {open
|
||||
xywh {4 25 592 345}
|
||||
|
|
|
@ -5570,17 +5570,14 @@ void set_scope_mode(Digiscope::scope_mode md)
|
|||
REQ(&Fl_Window::size_range, scopeview, SCOPEWIN_MIN_WIDTH, SCOPEWIN_MIN_HEIGHT,
|
||||
0, 0, 0, 0, (md == Digiscope::PHASE || md == Digiscope::XHAIRS));
|
||||
}
|
||||
// if (wfscope)
|
||||
// wfscope->mode(md);
|
||||
wf->wfscope->mode(md);
|
||||
if (md == Digiscope::SCOPE) set_scope_clear_axis();
|
||||
}
|
||||
|
||||
void set_scope(double *data, int len, bool autoscale)
|
||||
{
|
||||
if (digiscope)
|
||||
digiscope->data(data, len, autoscale);
|
||||
// if (wfscope)
|
||||
// wfscope->data(data, len, autoscale);
|
||||
wf->wfscope->data(data, len, autoscale);
|
||||
}
|
||||
|
||||
|
@ -5588,8 +5585,6 @@ void set_phase(double phase, double quality, bool highlight)
|
|||
{
|
||||
if (digiscope)
|
||||
digiscope->phase(phase, quality, highlight);
|
||||
// if (wfscope)
|
||||
// wfscope->phase(phase, quality, highlight);
|
||||
wf->wfscope->phase(phase, quality, highlight);
|
||||
}
|
||||
|
||||
|
@ -5597,8 +5592,6 @@ void set_rtty(double flo, double fhi, double amp)
|
|||
{
|
||||
if (digiscope)
|
||||
digiscope->rtty(flo, fhi, amp);
|
||||
// if (wfscope)
|
||||
// wfscope->rtty(flo, fhi, amp);
|
||||
wf->wfscope->rtty(flo, fhi, amp);
|
||||
}
|
||||
|
||||
|
@ -5606,8 +5599,6 @@ void set_video(double *data, int len, bool dir)
|
|||
{
|
||||
if (digiscope)
|
||||
digiscope->video(data, len, dir);
|
||||
// if (wfscope)
|
||||
// wfscope->video(data, len, dir);
|
||||
wf->wfscope->video(data, len, dir);
|
||||
}
|
||||
|
||||
|
@ -5615,11 +5606,51 @@ void set_zdata(complex *zarray, int len)
|
|||
{
|
||||
if (digiscope)
|
||||
digiscope->zdata(zarray, len);
|
||||
// if (wfscope)
|
||||
// wfscope->zdata(zarray, len);
|
||||
wf->wfscope->zdata(zarray, len);
|
||||
}
|
||||
|
||||
void set_scope_xaxis_1(double y1)
|
||||
{
|
||||
if (digiscope)
|
||||
digiscope->xaxis_1(y1);
|
||||
wf->wfscope->xaxis_1(y1);
|
||||
}
|
||||
|
||||
void set_scope_xaxis_2(double y2)
|
||||
{
|
||||
if (digiscope)
|
||||
digiscope->xaxis_2(y2);
|
||||
wf->wfscope->xaxis_2(y2);
|
||||
}
|
||||
|
||||
void set_scope_yaxis_1(double x1)
|
||||
{
|
||||
if (digiscope)
|
||||
digiscope->yaxis_1(x1);
|
||||
wf->wfscope->yaxis_1(x1);
|
||||
}
|
||||
|
||||
void set_scope_yaxis_2(double x2)
|
||||
{
|
||||
if (digiscope)
|
||||
digiscope->yaxis_2(x2);
|
||||
wf->wfscope->yaxis_2(x2);
|
||||
}
|
||||
|
||||
void set_scope_clear_axis()
|
||||
{
|
||||
if (digiscope) {
|
||||
digiscope->xaxis_1(0);
|
||||
digiscope->xaxis_2(0);
|
||||
digiscope->yaxis_1(0);
|
||||
digiscope->yaxis_2(0);
|
||||
}
|
||||
wf->wfscope->xaxis_1(0);
|
||||
wf->wfscope->xaxis_2(0);
|
||||
wf->wfscope->yaxis_1(0);
|
||||
wf->wfscope->yaxis_2(0);
|
||||
}
|
||||
|
||||
// raw buffer functions can ONLY be called by FLMAIN_TID
|
||||
|
||||
//======================================================================
|
||||
|
|
|
@ -53,10 +53,31 @@ fftfilt::fftfilt(double f1, double f2, int len)
|
|||
ovlbuf[i].re = ovlbuf[i].im = 0.0;
|
||||
|
||||
inptr = 0;
|
||||
|
||||
|
||||
create_filter(f1, f2);
|
||||
}
|
||||
|
||||
fftfilt::fftfilt(double f, int len)
|
||||
{
|
||||
filterlen = len;
|
||||
fft = new Cfft(filterlen);
|
||||
ift = new Cfft(filterlen);
|
||||
|
||||
ovlbuf = new complex[filterlen/2];
|
||||
filter = new complex[filterlen];
|
||||
filtdata = new complex[filterlen];
|
||||
|
||||
for (int i = 0; i < filterlen; i++)
|
||||
filter[i].re = filter[i].im =
|
||||
filtdata[i].re = filtdata[i].im = 0.0;
|
||||
for (int i = 0; i < filterlen/2; i++)
|
||||
ovlbuf[i].re = ovlbuf[i].im = 0.0;
|
||||
|
||||
inptr = 0;
|
||||
|
||||
create_lpf(f);
|
||||
}
|
||||
|
||||
fftfilt::~fftfilt()
|
||||
{
|
||||
if (fft) delete fft;
|
||||
|
@ -76,7 +97,7 @@ void fftfilt::create_filter(double f1, double f2)
|
|||
|
||||
// initialize the filter to zero
|
||||
for (int i = 0; i < filterlen; i++)
|
||||
filter[i].re = filter[i].im = 0.0;
|
||||
filter[i].re = filter[i].im = 0.0;
|
||||
|
||||
// create the filter shape coefficients by fft
|
||||
// filter values initialized to the impulse response h(t)
|
||||
|
@ -100,6 +121,37 @@ void fftfilt::create_filter(double f1, double f2)
|
|||
}
|
||||
|
||||
|
||||
void fftfilt::create_lpf(double f)
|
||||
{
|
||||
int len = filterlen / 2 + 1;
|
||||
double t, h, x, it;
|
||||
Cfft *tmpfft;
|
||||
tmpfft = new Cfft(filterlen);
|
||||
|
||||
// initialize the filter to zero
|
||||
for (int i = 0; i < filterlen; i++)
|
||||
filter[i].re = filter[i].im = 0.0;
|
||||
|
||||
// create the filter shape coefficients by fft
|
||||
// filter values initialized to the impulse response h(t)
|
||||
for (int i = 0; i < len; i++) {
|
||||
it = (double) i;
|
||||
t = it - (len - 1) / 2.0;
|
||||
h = it / (len - 1);
|
||||
|
||||
x = f * sinc(2 * f * t);
|
||||
x *= blackman(h); // windowed by Blackman function
|
||||
x *= filterlen; // scaled for unity in passband
|
||||
filter[i].re = x;
|
||||
}
|
||||
// perform the complex forward fft to obtain H(w)
|
||||
tmpfft->cdft(filter);
|
||||
// start outputs after 2 full passes are complete
|
||||
pass = 2;
|
||||
delete tmpfft;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Filter with fast convolution (overlap-add algorithm).
|
||||
*/
|
||||
|
|
|
@ -0,0 +1,165 @@
|
|||
// ----------------------------------------------------------------------------
|
||||
// mfilt.cxx -- Matched Filter
|
||||
//
|
||||
// Filter implemented using matched filter convolution method
|
||||
// h(t) characterized by CW pulse of "dit" length
|
||||
//
|
||||
// Reference:
|
||||
// http://en.wikipedia.com/wiki/Matched_filter
|
||||
//
|
||||
//
|
||||
//
|
||||
// Copyright (C) 2012 Mauri Niininen, AG1LE
|
||||
//
|
||||
// This file is part of fldigi.
|
||||
//
|
||||
// Fldigi is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Fldigi is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with fldigi. If not, see <http://www.gnu.org/licenses/>.
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <cmath>
|
||||
#include <string.h>
|
||||
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
#include "misc.h"
|
||||
|
||||
#include "mfilt.h"
|
||||
|
||||
|
||||
mfilt::mfilt(double freq, int Fs, int speed, int buflen)
|
||||
{
|
||||
outbuf = 0;
|
||||
inbuf = 0;
|
||||
filter = 0;
|
||||
|
||||
create_filter(freq, Fs, speed, buflen);
|
||||
}
|
||||
|
||||
mfilt::~mfilt()
|
||||
{
|
||||
if (outbuf) delete [] outbuf;
|
||||
if (filter) delete [] filter;
|
||||
if (inbuf) delete [] inbuf;
|
||||
}
|
||||
|
||||
|
||||
void mfilt::create_filter(double freq, int Fs, int speed, int buflen)
|
||||
{
|
||||
int i;
|
||||
|
||||
double dit_time = 1.2/(double)speed; // calculate "dit" time based on morse speed
|
||||
|
||||
filterlen = Fs*dit_time; // how many samples needed for "dit" template (kernel)
|
||||
|
||||
inbuflen = buflen; // input buffer needs to be min 4x "dit" length
|
||||
|
||||
// cout << "\ndeleting buffers - inbuflen=" << buflen;
|
||||
|
||||
// if this is an update delete previous buffers
|
||||
if (outbuf) delete [] outbuf;
|
||||
if (filter) delete [] filter;
|
||||
if (inbuf) delete [] inbuf;
|
||||
|
||||
// cout << "\nallocating buffers - inbuflen=" << buflen;
|
||||
// allocate buffers
|
||||
outbuf = new double[inbuflen+filterlen+1]; // output buffer
|
||||
filter = new double[filterlen]; // dit template buffer
|
||||
inbuf = new double[inbuflen+1]; // input buffer
|
||||
|
||||
inptr = 0;
|
||||
|
||||
// cout << "\ncreating burst - filterlen=" << filterlen;
|
||||
// create a "dit" filter template - to be used in convolution
|
||||
double t = 0;
|
||||
for ( i = 0; i < filterlen; i++) {
|
||||
filter[i] = sin(2*M_PI*freq*t);
|
||||
t +=1.0/Fs;
|
||||
}
|
||||
|
||||
//cout << "fl & Inbuflen" << filterlen <<" "<< inbuflen << "\n";
|
||||
|
||||
}
|
||||
|
||||
|
||||
bool mfilt::convolve(double *X,double *Y, double *Z, int lenx, int leny)
|
||||
{
|
||||
// Routine peforms linear convolution by straight forward calculation
|
||||
// calculates z= x convolve y
|
||||
// Written by Clay S. Turner
|
||||
//
|
||||
// inputs:
|
||||
// X array of data comprising vector #1
|
||||
// Y array of data comprising vector #2
|
||||
// Z pointer to place to save resulting data - needs to be lenx+leny-1 long
|
||||
// lenx # of items in vector 1
|
||||
// leny # of items in vector 2
|
||||
|
||||
|
||||
double *zptr,s,*xp,*yp;
|
||||
int lenz;
|
||||
int i,n,n_lo,n_hi;
|
||||
|
||||
lenz=lenx+leny-1;
|
||||
zptr=Z;
|
||||
|
||||
for (i=0;i<lenz;i++) {
|
||||
s=0.0;
|
||||
n_lo=0>(i-leny+1)?0:i-leny+1;
|
||||
n_hi=lenx-1<i?lenx-1:i;
|
||||
xp=X+n_lo;
|
||||
yp=Y+i-n_lo;
|
||||
for (n=n_lo;n<=n_hi;n++) {
|
||||
s+=*xp * *yp;
|
||||
xp++;
|
||||
yp--;
|
||||
}
|
||||
*zptr=s;
|
||||
zptr++;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Filter with convolution
|
||||
*/
|
||||
int mfilt::run(const double *in, double **out, int *len)
|
||||
{
|
||||
int i, retval;
|
||||
|
||||
// collect inbuflen amount of input samples - need to be 4x dit length minimum
|
||||
// if len = 512 need to copy data to inbuf until inptr == inbuflen
|
||||
// if len > 512 we have a replay event, need to copy len amount to inbuf
|
||||
|
||||
|
||||
for (i=0; i < *len; i++) {
|
||||
inbuf[inptr++] = in[i];
|
||||
if (inptr == inbuflen ) break;
|
||||
}
|
||||
|
||||
if (inptr < inbuflen) return 1;
|
||||
|
||||
// enough input samples collected - now do the convolution
|
||||
|
||||
retval = convolve(inbuf, filter, outbuf, inbuflen, filterlen);
|
||||
*out = outbuf;
|
||||
*len = inbuflen+filterlen+1;
|
||||
inptr = 0;
|
||||
return 0;
|
||||
|
||||
}
|
|
@ -167,6 +167,11 @@ extern Fl_Check_Button *btnContestia_8bit;
|
|||
extern Fl_Group *tabCW;
|
||||
extern Fl_Tabs *tabsCW;
|
||||
extern Fl_Value_Slider2 *sldrCWbandwidth;
|
||||
extern Fl_Check_Button *btnCWuseSOMdecoding;
|
||||
extern Fl_Counter2 *cntLower;
|
||||
extern Fl_Counter2 *cntUpper;
|
||||
extern Fl_Check_Button *btnCWmfilt;
|
||||
extern Fl_Check_Button *btnCWuseFFTfilter;
|
||||
extern Fl_Check_Button *btnCWrcvTrack;
|
||||
extern Fl_Counter2 *cntCWrange;
|
||||
#include <FL/Fl_Value_Output.H>
|
||||
|
@ -175,11 +180,11 @@ extern Fl_Value_Output *valCWrcvWPM;
|
|||
extern Fl_Progress *prgsCWrcvWPM;
|
||||
extern Fl_Value_Slider2 *sldrCWxmtWPM;
|
||||
extern Fl_Counter2 *cntCWdefWPM;
|
||||
extern Fl_Check_Button *btnCWusefarnsworth;
|
||||
#include <FL/Fl_Counter.H>
|
||||
extern Fl_Counter *cntCWlowerlimit;
|
||||
extern Fl_Counter *cntCWupperlimit;
|
||||
extern Fl_Value_Slider2 *sldrCWfarnsworth;
|
||||
extern Fl_Check_Button *btnCWusefarnsworth;
|
||||
extern Fl_Counter2 *cntCWweight;
|
||||
extern Fl_Counter2 *cntCWdash2dot;
|
||||
extern Fl_Counter2 *cntCWrisetime;
|
||||
|
|
|
@ -327,9 +327,27 @@
|
|||
ELEM_(int, CWbandwidth, "CWBANDWIDTH", \
|
||||
"Filter bandwidth (Hz)", \
|
||||
150) \
|
||||
ELEM_(double, CWlower, "CWLOWER", \
|
||||
"Detector hysterisis, lower threshold", \
|
||||
0.4) \
|
||||
ELEM_(double, CWupper, "CWUPPER", \
|
||||
"Detector hysterisis, upper threshold", \
|
||||
0.6) \
|
||||
ELEM_(int, CWmfiltlen, "CWMFILTLEN", \
|
||||
"Matched Filter length", \
|
||||
100) \
|
||||
ELEM_(bool, CWtrack, "CWTRACK", \
|
||||
"Automatic receive speed tracking", \
|
||||
true) \
|
||||
ELEM_(bool, CWmfilt, "CWMFILT", \
|
||||
"Matched Filter in use", \
|
||||
false) \
|
||||
ELEM_(bool, CWuse_fft_filter, "CWUSEFFTFILTER", \
|
||||
"Use FFT overlap and add convolution filter", \
|
||||
false) \
|
||||
ELEM_(bool, CWuseSOMdecoding, "CWUSESOMDECODING", \
|
||||
"Self Organizing Map decoding", \
|
||||
false) \
|
||||
ELEM_(int, CWrange, "CWRANGE", \
|
||||
"Tracking range for CWTRACK (WPM)", \
|
||||
10) \
|
||||
|
|
111
src/include/cw.h
111
src/include/cw.h
|
@ -28,18 +28,24 @@
|
|||
#ifndef _CW_H
|
||||
#define _CW_H
|
||||
|
||||
#include <cstring>
|
||||
#include <string>
|
||||
|
||||
#include "modem.h"
|
||||
#include "filters.h"
|
||||
#include "fftfilt.h"
|
||||
//#include "mfilt.h" //AG1LE: added this
|
||||
#include "mbuffer.h"
|
||||
|
||||
|
||||
#define CWSampleRate 8000
|
||||
#define CWMaxSymLen 4096
|
||||
#define KNUM 128
|
||||
#define CWMaxSymLen 4096 // AG1LE: - was 4096
|
||||
#define KNUM 122
|
||||
|
||||
// decimation ratio for the receiver
|
||||
//#define DEC_RATIO 8
|
||||
//#define CW_FIRLEN 32
|
||||
//#define CW_FIRLEN 128
|
||||
//#define CW_FIRLEN 122
|
||||
//#define CW_FIRLEN 256
|
||||
//#define CW_FIRLEN 512
|
||||
// Limits on values of CW send and timing parameters
|
||||
|
@ -47,8 +53,8 @@
|
|||
//#define CW_MAX_SPEED 100 // Highest WPM allowed
|
||||
|
||||
// CW function return status codes.
|
||||
#define CW_SUCCESS 0
|
||||
#define CW_ERROR -1
|
||||
#define CW_SUCCESS 0
|
||||
#define CW_ERROR -1
|
||||
|
||||
#define ASC_NUL '\0' // End of string
|
||||
#define ASC_SPACE ' ' // ASCII space char
|
||||
|
@ -70,6 +76,8 @@
|
|||
|
||||
#define TRACKING_FILTER_SIZE 16
|
||||
|
||||
#define MAX_PIPE_SIZE (22 * CWSampleRate * 12 / 800)
|
||||
|
||||
enum CW_RX_STATE {
|
||||
RS_IDLE = 0,
|
||||
RS_IN_TONE,
|
||||
|
@ -84,16 +92,43 @@ enum CW_EVENT {
|
|||
};
|
||||
|
||||
class cw : public modem {
|
||||
protected:
|
||||
int symbollen; // length of a dot in sound samples (tx)
|
||||
int fsymlen; // length of extra interelement space (farnsworth)
|
||||
double phaseacc; // used by NCO for rx/tx tones
|
||||
unsigned int smpl_ctr; // sample counter for timing cw rx
|
||||
double agc_peak; // threshold for tone detection
|
||||
|
||||
C_FIR_filter *cwfilter;
|
||||
Cmovavg *bitfilter;
|
||||
Cmovavg *trackingfilter;
|
||||
#define CLRCOUNT 16
|
||||
#define DEC_RATIO 16
|
||||
#define CW_FIRLEN 512
|
||||
// Maximum number of signs (dit or dah) in a Morse char.
|
||||
#define WGT_SIZE 7
|
||||
|
||||
struct SOM_TABLE {
|
||||
char chr; /* The character(s) represented */
|
||||
const char *prt; /* The printable representation of the character */
|
||||
float wgt[WGT_SIZE]; /* Dot-dash weight vector */
|
||||
};
|
||||
|
||||
protected:
|
||||
int symbollen; // length of a dot in sound samples (tx)
|
||||
int fsymlen; // length of extra interelement space (farnsworth)
|
||||
double phaseacc; // used by NCO for rx/tx tones
|
||||
double FFTphase;
|
||||
double FIRphase;
|
||||
double FFTvalue;
|
||||
double FIRvalue;
|
||||
unsigned int smpl_ctr; // sample counter for timing cw rx
|
||||
double agc_peak; // threshold for tone detection
|
||||
|
||||
int FilterFFTLen;
|
||||
bool use_matched_filter;
|
||||
bool use_fft_filter;
|
||||
|
||||
double upper_threshold;
|
||||
double lower_threshold;
|
||||
|
||||
C_FIR_filter *hilbert; // Hilbert filter precedes sinc filter
|
||||
fftfilt *cw_FFT_filter; // sinc / matched filter
|
||||
C_FIR_filter *cw_FIR_filter; // linear phase finite impulse response filter
|
||||
|
||||
Cmovavg *bitfilter;
|
||||
Cmovavg *trackingfilter;
|
||||
|
||||
int bitfilterlen;
|
||||
|
||||
|
@ -101,8 +136,9 @@ protected:
|
|||
CW_RX_STATE old_cw_receive_state;
|
||||
CW_EVENT cw_event; // functions used by cw process routine
|
||||
|
||||
double pipe[CWMaxSymLen]; // storage for sync scope data
|
||||
mbuffer<double, CWMaxSymLen, 2> scopedata;
|
||||
double pipe[MAX_PIPE_SIZE+1]; // storage for sync scope data
|
||||
double clearpipe[MAX_PIPE_SIZE+1];
|
||||
mbuffer<double, MAX_PIPE_SIZE + 1, 4> scopedata;
|
||||
int pipeptr;
|
||||
int pipesize;
|
||||
bool scope_clear;
|
||||
|
@ -112,23 +148,23 @@ protected:
|
|||
int cw_bandwidth;
|
||||
int cw_squelch;
|
||||
int cw_send_speed; // Initially 18 WPM
|
||||
int cw_receive_speed; // Initially 18 WPM
|
||||
int cw_receive_speed; // Initially 18 WPM
|
||||
bool usedefaultWPM; // use default WPM
|
||||
|
||||
int cw_upper_limit;
|
||||
int cw_lower_limit;
|
||||
|
||||
long int cw_noise_spike_threshold; // Initially ignore any tone < 10mS
|
||||
long int cw_noise_spike_threshold; // Initially ignore any tone < 10mS
|
||||
int cw_in_sync; // Synchronization flag
|
||||
|
||||
// Sending parameters:
|
||||
long int cw_send_dot_length; // Length of a send Dot, in Usec
|
||||
long int cw_send_dash_length; // Length of a send Dash, in Usec
|
||||
long int cw_send_dot_length; // Length of a send Dot, in Usec
|
||||
long int cw_send_dash_length; // Length of a send Dash, in Usec
|
||||
int lastsym; // last symbol sent
|
||||
double risetime; // leading/trailing edge rise time (msec)
|
||||
int knum; // number of samples on edges
|
||||
int QSKshape; // leading/trailing edge shape factor
|
||||
double qskbuf[OUTBUFSIZE]; // signal array for qsk drive
|
||||
double risetime; // leading/trailing edge rise time (msec)
|
||||
int knum; // number of samples on edges
|
||||
int QSKshape; // leading/trailing edge shape factor
|
||||
double qskbuf[OUTBUFSIZE]; // signal array for qsk drive
|
||||
double qskphase; //
|
||||
bool firstelement;
|
||||
|
||||
|
@ -142,10 +178,11 @@ protected:
|
|||
#define RECEIVE_CAPACITY 256 // Way longer than any representation
|
||||
char rx_rep_buf[RECEIVE_CAPACITY];
|
||||
int cw_rr_current; // Receive buffer current location
|
||||
unsigned int cw_rr_start_timestamp; // Tone start timestamp
|
||||
unsigned int cw_rr_end_timestamp; // Tone end timestamp
|
||||
unsigned int cw_rr_start_timestamp; // Tone start timestamp
|
||||
unsigned int cw_rr_end_timestamp; // Tone end timestamp
|
||||
|
||||
long int cw_adaptive_receive_threshold; // 2-dot threshold for adaptive speed
|
||||
long int cw_adaptive_receive_threshold; // 2-dot threshold for adaptive speed
|
||||
int in_replay; //AG1LE: if we have replay even, set to 1 otherwise = 0 ;
|
||||
|
||||
// Receive adaptive speed tracking.
|
||||
double dot_tracking;
|
||||
|
@ -157,6 +194,7 @@ protected:
|
|||
void clear_syncscope();
|
||||
void update_Status();
|
||||
void sync_parameters();
|
||||
void reset_rx_filter();
|
||||
int handle_event(int cw_event, const char **c);
|
||||
int usec_diff(unsigned int earlier, unsigned int later);
|
||||
void send_symbol(int symbol, int len);
|
||||
|
@ -166,7 +204,16 @@ protected:
|
|||
void update_tracking(int dot, int dash);
|
||||
|
||||
void makeshape();
|
||||
|
||||
complex mixer(complex in);
|
||||
|
||||
static const SOM_TABLE som_table[];
|
||||
float cw_buffer[512];
|
||||
int cw_ptr;
|
||||
int clrcount;
|
||||
|
||||
bool use_paren;
|
||||
std::string prosigns;
|
||||
|
||||
public:
|
||||
cw();
|
||||
~cw();
|
||||
|
@ -174,12 +221,20 @@ public:
|
|||
void rx_init();
|
||||
void tx_init(SoundBase *sc);
|
||||
void restart() {};
|
||||
|
||||
int rx_process(const double *buf, int len);
|
||||
void rx_FFTprocess(const double *buf, int len);
|
||||
void rx_FIRprocess(const double *buf, int len);
|
||||
void decode_stream(double);
|
||||
|
||||
int tx_process();
|
||||
void incWPM();
|
||||
void decWPM();
|
||||
void toggleWPM();
|
||||
|
||||
int normalize(float *v, int n, int twodots);
|
||||
const char *find_winner (float *inbuf, int twodots);
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -67,6 +67,7 @@ private:
|
|||
double _phase;
|
||||
double _quality;
|
||||
double _flo, _fhi, _amp;
|
||||
double _x1, _x2, _y1, _y2;
|
||||
bool _highlight;
|
||||
scope_mode phase_mode;
|
||||
|
||||
|
@ -89,6 +90,11 @@ public:
|
|||
void rtty(double flo, double fhi, double amp);
|
||||
void mode(scope_mode md);
|
||||
scope_mode mode() { return _mode;};
|
||||
void xaxis_1(double y1) { _y1 = y1; }
|
||||
void xaxis_2(double y2) { _y2 = y2; }
|
||||
void yaxis_1(double x1) { _x1 = x1; }
|
||||
void yaxis_2(double x2) { _x2 = x2; }
|
||||
void clear_axis() { _x1 = _x2 = _y1 = _y2 = 0; }
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -22,8 +22,10 @@ protected:
|
|||
int pass;
|
||||
public:
|
||||
fftfilt(double f1, double f2, int len);
|
||||
fftfilt(double f, int len);
|
||||
~fftfilt();
|
||||
void create_filter(double f1, double f2);
|
||||
void create_lpf(double f);
|
||||
int run(const complex& in, complex **out);
|
||||
};
|
||||
|
||||
|
|
|
@ -184,6 +184,12 @@ extern void set_rtty(double, double, double);
|
|||
extern void set_video(double *, int, bool = true);
|
||||
extern void set_zdata(complex *, int);
|
||||
|
||||
extern void set_scope_xaxis_1(double y1);
|
||||
extern void set_scope_xaxis_2(double y2);
|
||||
extern void set_scope_yaxis_1(double x1);
|
||||
extern void set_scope_yaxis_2(double x2);
|
||||
extern void set_scope_clear_axis();
|
||||
|
||||
extern void set_CWwpm();
|
||||
extern void put_rx_char(unsigned int data, int style = FTextBase::RECV);
|
||||
extern void put_sec_char( char chr );
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
/*
|
||||
* mfilt.h -- Matched Filter using convolution
|
||||
*/
|
||||
|
||||
#ifndef _MFILT_H
|
||||
#define _MFILT_H
|
||||
|
||||
#include "complex.h"
|
||||
#include "fft.h"
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
class mfilt {
|
||||
protected:
|
||||
int filterlen;
|
||||
int inbuflen;
|
||||
double *filter;
|
||||
double *inbuf;
|
||||
double *outbuf;
|
||||
int inptr;
|
||||
|
||||
public:
|
||||
mfilt(double freq, int Fs, int speed, int buflen);
|
||||
~mfilt();
|
||||
void create_filter(double freq, int Fs, int speed, int buflen);
|
||||
bool convolve(double *X,double *Y, double *Z, int lenx, int leny);
|
||||
int run(const double *in, double **out, int *len);
|
||||
};
|
||||
|
||||
#endif
|
|
@ -139,6 +139,7 @@ public:
|
|||
virtual void decWPM() {};
|
||||
virtual void toggleWPM() {};
|
||||
virtual void sync_parameters() {};
|
||||
virtual void reset_rx_filter(bool) {};
|
||||
virtual void update_Status() {};
|
||||
|
||||
// for waterfall id transmission
|
||||
|
|
|
@ -52,6 +52,7 @@ Digiscope::Digiscope (int X, int Y, int W, int H) :
|
|||
_highlight = false;
|
||||
_len = MAX_LEN;
|
||||
_zptr = 0;
|
||||
_x1 = _x2 = _y1 = _y2;
|
||||
phase_mode = PHASE1;
|
||||
}
|
||||
|
||||
|
@ -336,10 +337,42 @@ void Digiscope::draw_scope()
|
|||
for (int i = 0; i < npts; i++)
|
||||
fl_vertex( (double)i / npts, _buf[i * _len / npts] );
|
||||
fl_end_line();
|
||||
|
||||
// x & y axis'
|
||||
if (_x1) {
|
||||
fl_color(FL_WHITE);
|
||||
fl_begin_line();
|
||||
fl_vertex(_x1, 0.0);
|
||||
fl_vertex(_x1, 1.0);
|
||||
fl_end_line();
|
||||
}
|
||||
if (_x2) {
|
||||
fl_color(FL_YELLOW);
|
||||
fl_begin_line();
|
||||
fl_vertex(_x2, 0.0);
|
||||
fl_vertex(_x2, 1.0);
|
||||
fl_end_line();
|
||||
}
|
||||
if (_y1) {
|
||||
fl_color(FL_WHITE);
|
||||
fl_begin_line();
|
||||
fl_vertex(0.0, _y1);
|
||||
fl_vertex(1.0, _y1);
|
||||
fl_end_line();
|
||||
}
|
||||
if (_y2) {
|
||||
fl_color(FL_YELLOW);
|
||||
fl_begin_line();
|
||||
fl_vertex(0.0, _y2);
|
||||
fl_vertex(1.0, _y2);
|
||||
fl_end_line();
|
||||
}
|
||||
|
||||
fl_pop_matrix();
|
||||
fl_pop_clip();
|
||||
}
|
||||
|
||||
|
||||
void Digiscope::draw_xy()
|
||||
{
|
||||
fl_clip(x()+2,y()+2,w()-4,h()-4);
|
||||
|
|
Ładowanie…
Reference in New Issue