Upstream version 2.10M

pull/2/head
Stelios Bounanos 2008-02-29 06:58:19 +00:00
rodzic b295c0f877
commit b4bd00695e
12 zmienionych plików z 65 dodań i 17 usunięć

Wyświetl plik

@ -19,6 +19,7 @@ Change Log:
15) Added support to the PortAudio backend for separate capture and playback
devices and sample rates
16) Added mt63 500/1000/2000 modes
17) Added psk acquisition level control
2.09 1) Modified src/Makefile.am for FreeBSD name space clash
2) Added psk multi-channel viewer with regex search capability

Wyświetl plik

@ -4,7 +4,7 @@
AC_COPYRIGHT([Copyright (C) 2007, 2008 Stelios Bounanos, M0GLD (m0gld AT enotty DOT net)])
AC_PREREQ(2.61)
AC_INIT([fldigi], [2.10L], [w1hkj AT w1hkj DOT com])
AC_INIT([fldigi], [2.10M], [w1hkj AT w1hkj DOT com])
AC_CONFIG_AUX_DIR([build-aux])
# define build, build_cpu, build_vendor, build_os

Wyświetl plik

@ -1050,6 +1050,13 @@ static void cb_cntTimeout(Fl_Spinner* o, void*) {
progdefaults.changed = true;
}
Fl_Counter *cntACQsn=(Fl_Counter *)0;
static void cb_cntACQsn(Fl_Counter* o, void*) {
progdefaults.ACQsn = (int)o->value();
progdefaults.changed = true;
}
Fl_Group *tabMT63=(Fl_Group *)0;
Fl_Check_Button *btnMT63_8bit=(Fl_Check_Button *)0;
@ -2082,8 +2089,7 @@ fect after a restart.");
o->end();
}
{ Fl_Group* o = tabPSK = new Fl_Group(0, 50, 400, 170, "Psk");
o->hide();
{ Fl_Counter* o = cntSearchRange = new Fl_Counter(120, 60, 80, 21, "Search Range");
{ Fl_Counter* o = cntSearchRange = new Fl_Counter(11, 60, 80, 21, "Acq Srch Range");
o->type(1);
o->minimum(10);
o->maximum(500);
@ -2153,9 +2159,20 @@ fect after a restart.");
}
o->end();
}
{ Fl_Counter* o = cntACQsn = new Fl_Counter(220, 60, 80, 21, "Acq s/n (db)");
o->type(1);
o->minimum(3);
o->maximum(20);
o->step(1);
o->value(6);
o->callback((Fl_Callback*)cb_cntACQsn);
o->align(FL_ALIGN_RIGHT);
o->value(progdefaults.ACQsn);
}
o->end();
}
{ Fl_Group* o = tabMT63 = new Fl_Group(0, 50, 400, 170, "MT-63");
o->hide();
{ Fl_Group* o = new Fl_Group(5, 60, 390, 155);
o->box(FL_ENGRAVED_FRAME);
o->align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE);

Wyświetl plik

@ -35,7 +35,7 @@ static const char szBaudRates[] = "300|600|1200|2400|4800|9600|19200|38400|57600
code {} {}
Fl_Window {} {
label {fldigi - config} open
xywh {520 101 400 250} type Double color 45 selection_color 51 align 80 visible
xywh {396 414 400 250} type Double color 45 selection_color 51 align 80 visible
} {
Fl_Tabs tabsConfigure {open
xywh {0 0 405 220} color 47 selection_color 9
@ -1155,14 +1155,14 @@ progdefaults.changed = true;}
}
Fl_Group tabPSK {
label Psk open
xywh {0 50 400 170} hide
xywh {0 50 400 170}
} {
Fl_Counter cntSearchRange {
label {Search Range}
label {Acq Srch Range}
callback {progdefaults.SearchRange = (int)o->value();
wf->redraw_marker();
progdefaults.changed = true;}
xywh {120 60 80 21} type Simple align 8 minimum 10 maximum 500 step 10 value 200
xywh {11 60 80 21} type Simple align 8 minimum 10 maximum 500 step 10 value 200
code0 {o->value(progdefaults.SearchRange);}
}
Fl_Group {} {
@ -1237,10 +1237,17 @@ progdefaults.changed = true;}
code3 {o->value(progdefaults.VIEWERtimeout);}
}
}
Fl_Counter cntACQsn {
label {Acq s/n (db)}
callback {progdefaults.ACQsn = (int)o->value();
progdefaults.changed = true;} selected
xywh {220 60 80 21} type Simple align 8 minimum 3 maximum 20 step 1 value 6
code0 {o->value(progdefaults.ACQsn);}
}
}
Fl_Group tabMT63 {
label {MT-63} open selected
xywh {0 50 400 170}
label {MT-63} open
xywh {0 50 400 170} hide
} {
Fl_Group {} {open
xywh {5 60 390 155} box ENGRAVED_FRAME align 21

Wyświetl plik

@ -165,6 +165,7 @@ extern Fl_Check_Button *btnShowFrequencies;
extern Fl_Spinner *cntChannels;
extern Fl_Spinner *cntStartFrequency;
extern Fl_Spinner *cntTimeout;
extern Fl_Counter *cntACQsn;
extern Fl_Group *tabMT63;
extern Fl_Check_Button *btnMT63_8bit;
extern Fl_Check_Button *btnmt63_interleave;

Wyświetl plik

@ -21,10 +21,11 @@ struct configuration {
double RTTYsweetspot;
double PSKsweetspot;
bool StartAtSweetSpot;
// for PSK mail interface
// for PSK & PSK mail interface
bool PSKmailSweetSpot;
int SearchRange;
int ServerOffset;
double ACQsn;
// RTTY
double rtty_squelch;
int rtty_shift;

Wyświetl plik

@ -36,7 +36,7 @@
#define PskSampleRate (8000)
#define PipeLen (64)
#define SNTHRESHOLD 2.0
#define SNTHRESHOLD 6.0
#define AFCDECAYSLOW 8
//=====================================================================
@ -70,6 +70,7 @@ private:
int dcd;
int dcdbits;
complex quality;
int acquire;
void rx_symbol(complex symbol);
void rx_bit(int bit);

Wyświetl plik

@ -29,6 +29,7 @@ configuration progdefaults = {
true, // bool PSKmailSweetSpot;
200, // int SearchRange;
40, // int ServerOffset;
6.0, // double ACQsn;
// RTTY
25.0, // double rtty_squelch;
3, // int rtty_shift; = 170
@ -204,6 +205,7 @@ enum TAG { \
FONTNBR, FONTSIZE, FONTCOLOR,
STARTATSWEETSPOT, PSKMAILSWEETSPOT,
PSKSEARCHRANGE, PSKSERVEROFFSET,
ACQSN,
CWSWEETSPOT, PSKSWEETSPOT, RTTYSWEETSPOT,
RTTYSQUELCH, RTTYSHIFT, RTTYBAUD,
RTTYBITS, RTTYPARITY, RTTYSTOP, RTTYREVERSE,
@ -315,6 +317,7 @@ void configuration::writeDefaultsXML()
writeXMLint(f, "PSKSERVEROFFSET", ServerOffset);
writeXMLdbl(f, "CWSWEETSPOT", CWsweetspot);
writeXMLdbl(f, "PSKSWEETSPOT", PSKsweetspot);
writeXMLdbl(f, "ACQSN", ACQsn);
writeXMLdbl(f, "RTTYSWEETSPOT", RTTYsweetspot);
writeXMLdbl(f, "RTTYSQUELCH", rtty_squelch);
writeXMLint(f, "RTTYSHIFT", rtty_shift);
@ -516,6 +519,8 @@ bool configuration::readDefaultsXML()
case PSKSERVEROFFSET :
ServerOffset = atoi(xml->getNodeData());
break;
case ACQSN :
ACQsn = atof(xml->getNodeData());
case CWSWEETSPOT :
CWsweetspot = atof(xml->getNodeData());
break;
@ -908,6 +913,7 @@ bool configuration::readDefaultsXML()
else if (!strcmp("PSKMAILSWEETSPOT", nodeName)) tag = PSKMAILSWEETSPOT;
else if (!strcmp("PSKSEARCHRANGE", nodeName)) tag = PSKSEARCHRANGE;
else if (!strcmp("PSKSERVEROFFSET", nodeName)) tag = PSKSERVEROFFSET;
else if (!strcmp("ACQSN", nodeName)) tag = ACQSN;
else if (!strcmp("CWSWEETSPOT", nodeName)) tag = CWSWEETSPOT;
else if (!strcmp("PSKSWEETSPOT", nodeName)) tag = PSKSWEETSPOT;
else if (!strcmp("RTTYSWEETSPOT", nodeName)) tag = RTTYSWEETSPOT;
@ -1230,6 +1236,7 @@ int configuration::openDefaults() {
btnPSKmailSweetSpot->value(PSKmailSweetSpot);
cntSearchRange->value(SearchRange);
cntServerOffset->value(ServerOffset);
cntACQsn->value(ACQsn);
btnCursorBWcolor->color(
fl_rgb_color(cursorLineRGBI.R, cursorLineRGBI.G, cursorLineRGBI.B) );

Wyświetl plik

@ -42,6 +42,7 @@
#include <sys/ioctl.h>
#include <math.h>
#include <ctype.h>
#include <errno.h>
#include <FL/fl_ask.H>

Wyświetl plik

@ -94,11 +94,11 @@ int mt63::rx_process(const double *buf, int len)
unsigned int c;
int i;
if (Interleave != progdefaults.mt63_interleave) {
if (Interleave != progdefaults.mt63_interleave) {
Interleave = progdefaults.mt63_interleave;
restart();
}
if (InpBuff->EnsureSpace(len) == -1) {
fprintf(stderr, "mt63_rxprocess: buffer error\n");
return -1;
@ -115,6 +115,11 @@ int mt63::rx_process(const double *buf, int len)
snr = 99.9;
display_metric(snr);
// static char msg1[15];
// double s2n = 10.0*log10( snr );
// snprintf(msg1, sizeof(msg1), "s/n %2d dB", (int)(floor(s2n)));
// put_Status1(msg1);
if (squelchon && snr < squelch)
return 0;

Wyświetl plik

@ -218,6 +218,8 @@ psk::psk(trx_mode pskmode) : modem()
for (int i = 0; i < 16; i++)
syncbuf[i] = 0.0;
E1 = E2 = E3 = 0.0;
acquire = 0;
init();
}
@ -335,11 +337,12 @@ void psk::findsignal()
} else { // normal signal search algorithm
f1 = (int)(frequency - progdefaults.SearchRange/2);
f2 = (int)(frequency + progdefaults.SearchRange/2);
if (evalpsk->sigpeak(ftest, f1, f2) > SNTHRESHOLD ) {
if (evalpsk->sigpeak(ftest, f1, f2) > pow(10, progdefaults.ACQsn / 10.0) ) {
frequency = ftest;
set_freq(frequency);
freqerr = 0.0;
sigsearch = 0;
acquire = DCDOFF;
}
}
}
@ -359,13 +362,14 @@ void psk::phaseafc()
frequency -= freqerr;
set_freq (frequency);
}
if (acquire) acquire--;
}
void psk::afc()
{
if (!afcon)
return;
if (dcd == true)
if (dcd == true || acquire)
phaseafc();
}
@ -398,11 +402,13 @@ void psk::rx_symbol(complex symbol)
switch (dcdshreg) {
case 0xAAAAAAAA: /* DCD on by preamble */
dcd = true;
acquire = 0;
quality = complex (1.0, 0.0);
break;
case 0: /* DCD off by postamble */
dcd = false;
acquire = 0;
quality = complex (0.0, 0.0);
break;

Wyświetl plik

@ -175,12 +175,13 @@ void viewpsk::findsignal(int ch)
int ftest;
int f1 = (int)(nomfreq[ch] - VSEARCHWIDTH);
int f2 = (int)(nomfreq[ch] + VSEARCHWIDTH);
if (evalpsk->sigpeak(ftest, f1, f2) > VSNTHRESHOLD) {
if (evalpsk->sigpeak(ftest, f1, f2) > pow(10, progdefaults.ACQsn / 10.0) ) {
frequency[ch] = ftest;
sigsearch[ch] = 0;
}
else
else {
frequency[ch] = nomfreq[ch];
}
freqerr[ch] = 0.0;
}