kopia lustrzana https://github.com/jamescoxon/dl-fldigi
Upstream version 2.10C
rodzic
ccd970fe74
commit
66bbde2415
|
@ -4,7 +4,7 @@
|
|||
AC_COPYRIGHT([Copyright (C) 2007 Stelios Bounanos, M0GLD (m0gld AT enotty DOT net)])
|
||||
|
||||
AC_PREREQ(2.61)
|
||||
AC_INIT([fldigi], [2.10B], [w1hkj AT w1hkj DOT com])
|
||||
AC_INIT([fldigi], [2.10C], [w1hkj AT w1hkj DOT com])
|
||||
AC_CONFIG_AUX_DIR([build-aux])
|
||||
|
||||
# define build, build_cpu, build_vendor, build_os
|
||||
|
|
|
@ -106,13 +106,6 @@ btnBlackman->value(0);
|
|||
progdefaults.changed = true;
|
||||
}
|
||||
|
||||
Fl_Counter *cntLowFreqCutoff=(Fl_Counter *)0;
|
||||
|
||||
static void cb_cntLowFreqCutoff(Fl_Counter* o, void*) {
|
||||
progdefaults.LowFreqCutoff=(int)(o->value());
|
||||
progdefaults.changed = true;
|
||||
}
|
||||
|
||||
colorbox *WF_Palette=(colorbox *)0;
|
||||
|
||||
static void cb_WF_Palette(colorbox*, void*) {
|
||||
|
@ -179,6 +172,20 @@ static void cb_btnSavePalette(Fl_Button*, void*) {
|
|||
savePalette();
|
||||
}
|
||||
|
||||
Fl_Counter *cntLowFreqCutoff=(Fl_Counter *)0;
|
||||
|
||||
static void cb_cntLowFreqCutoff(Fl_Counter* o, void*) {
|
||||
progdefaults.LowFreqCutoff=(int)(o->value());
|
||||
progdefaults.changed = true;
|
||||
}
|
||||
|
||||
Fl_Check_Button *btnWFaveraging=(Fl_Check_Button *)0;
|
||||
|
||||
static void cb_btnWFaveraging(Fl_Check_Button* o, void*) {
|
||||
progdefaults.WFaveraging = o->value();
|
||||
progdefaults.changed = true;
|
||||
}
|
||||
|
||||
Fl_Check_Button *btnUseCursorLines=(Fl_Check_Button *)0;
|
||||
|
||||
static void cb_btnUseCursorLines(Fl_Check_Button* o, void*) {
|
||||
|
@ -1169,10 +1176,9 @@ static const char szBaudRates[] = "300|600|1200|2400|4800|9600|19200|38400|57600
|
|||
{ Fl_Group* o = tabWaterfall = new Fl_Group(0, 25, 405, 195, "W-fall");
|
||||
o->color((Fl_Color)51);
|
||||
o->selection_color((Fl_Color)51);
|
||||
o->hide();
|
||||
{ Fl_Tabs* o = new Fl_Tabs(0, 25, 405, 195);
|
||||
{ Fl_Group* o = new Fl_Group(0, 50, 400, 170, "Filters/Colors");
|
||||
{ Fl_Group* o = new Fl_Group(5, 55, 390, 75, "FFT Prefilter");
|
||||
{ Fl_Group* o = new Fl_Group(5, 55, 390, 42, "FFT Prefilter");
|
||||
o->box(FL_ENGRAVED_BOX);
|
||||
o->color((Fl_Color)51);
|
||||
o->align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE);
|
||||
|
@ -1196,16 +1202,6 @@ static const char szBaudRates[] = "300|600|1200|2400|4800|9600|19200|38400|57600
|
|||
o->callback((Fl_Callback*)cb_btnTriangular);
|
||||
if(progdefaults.wfPreFilter==4)o->value(1);else o->value(0);
|
||||
}
|
||||
{ Fl_Counter* o = cntLowFreqCutoff = new Fl_Counter(155, 97, 94, 21, "Low Freq Cutoff");
|
||||
o->type(1);
|
||||
o->minimum(0);
|
||||
o->maximum(500);
|
||||
o->step(50);
|
||||
o->value(300);
|
||||
o->callback((Fl_Callback*)cb_cntLowFreqCutoff);
|
||||
o->align(FL_ALIGN_LEFT);
|
||||
o->value(progdefaults.LowFreqCutoff);
|
||||
}
|
||||
o->end();
|
||||
}
|
||||
{ Fl_Group* o = new Fl_Group(5, 131, 390, 85);
|
||||
|
@ -1257,6 +1253,21 @@ static const char szBaudRates[] = "300|600|1200|2400|4800|9600|19200|38400|57600
|
|||
}
|
||||
o->end();
|
||||
}
|
||||
{ Fl_Counter* o = cntLowFreqCutoff = new Fl_Counter(117, 103, 70, 20, "Low Freq Cutoff");
|
||||
o->type(1);
|
||||
o->minimum(0);
|
||||
o->maximum(500);
|
||||
o->step(50);
|
||||
o->value(300);
|
||||
o->callback((Fl_Callback*)cb_cntLowFreqCutoff);
|
||||
o->align(FL_ALIGN_LEFT);
|
||||
o->value(progdefaults.LowFreqCutoff);
|
||||
}
|
||||
{ Fl_Check_Button* o = btnWFaveraging = new Fl_Check_Button(206, 105, 114, 15, "wf averaging");
|
||||
o->down_box(FL_DOWN_BOX);
|
||||
o->callback((Fl_Callback*)cb_btnWFaveraging);
|
||||
o->value(progdefaults.WFaveraging);
|
||||
}
|
||||
o->end();
|
||||
}
|
||||
{ Fl_Group* o = new Fl_Group(0, 50, 405, 166, "Cursors");
|
||||
|
@ -1679,6 +1690,7 @@ fect after a restart.");
|
|||
{ Fl_Group* o = tabModems = new Fl_Group(0, 25, 401, 195, "Modem");
|
||||
o->color((Fl_Color)51);
|
||||
o->selection_color((Fl_Color)51);
|
||||
o->hide();
|
||||
{ Fl_Tabs* o = tabsModems = new Fl_Tabs(0, 25, 401, 195);
|
||||
o->color((Fl_Color)51);
|
||||
o->selection_color((Fl_Color)10);
|
||||
|
|
|
@ -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 {527 153 400 255} type Double color 45 selection_color 51 align 80 visible
|
||||
xywh {528 602 400 255} type Double color 45 selection_color 51 align 80 visible
|
||||
} {
|
||||
Fl_Tabs tabsConfigure {open
|
||||
xywh {0 0 405 220} color 47 selection_color 9
|
||||
|
@ -90,7 +90,7 @@ progdefaults.changed = true;}
|
|||
}
|
||||
Fl_Group tabWaterfall {
|
||||
label {W-fall} open
|
||||
xywh {0 25 405 195} color 51 selection_color 51 hide
|
||||
xywh {0 25 405 195} color 51 selection_color 51
|
||||
} {
|
||||
Fl_Tabs {} {open
|
||||
xywh {0 25 405 195}
|
||||
|
@ -101,7 +101,7 @@ progdefaults.changed = true;}
|
|||
} {
|
||||
Fl_Group {} {
|
||||
label {FFT Prefilter} open
|
||||
xywh {5 55 390 75} box ENGRAVED_BOX color 51 align 21
|
||||
xywh {5 55 390 42} box ENGRAVED_BOX color 51 align 21
|
||||
} {
|
||||
Fl_Check_Button btnBlackman {
|
||||
label Blackman
|
||||
|
@ -151,13 +151,6 @@ progdefaults.changed = true;}
|
|||
xywh {304 75 90 15} down_box DOWN_BOX
|
||||
code0 {if(progdefaults.wfPreFilter==4)o->value(1);else o->value(0);}
|
||||
}
|
||||
Fl_Counter cntLowFreqCutoff {
|
||||
label {Low Freq Cutoff}
|
||||
callback {progdefaults.LowFreqCutoff=(int)(o->value());
|
||||
progdefaults.changed = true;}
|
||||
xywh {155 97 94 21} type Simple align 4 minimum 0 maximum 500 step 50 value 300
|
||||
code0 {o->value(progdefaults.LowFreqCutoff);}
|
||||
}
|
||||
}
|
||||
Fl_Group {} {open
|
||||
xywh {5 131 390 85} box ENGRAVED_FRAME
|
||||
|
@ -228,6 +221,20 @@ progdefaults.changed = true;}
|
|||
code0 {\#include "colorbox.h"}
|
||||
}
|
||||
}
|
||||
Fl_Counter cntLowFreqCutoff {
|
||||
label {Low Freq Cutoff}
|
||||
callback {progdefaults.LowFreqCutoff=(int)(o->value());
|
||||
progdefaults.changed = true;}
|
||||
xywh {117 103 70 20} type Simple align 4 minimum 0 maximum 500 step 50 value 300
|
||||
code0 {o->value(progdefaults.LowFreqCutoff);}
|
||||
}
|
||||
Fl_Check_Button btnWFaveraging {
|
||||
label {wf averaging}
|
||||
callback {progdefaults.WFaveraging = o->value();
|
||||
progdefaults.changed = true;} selected
|
||||
xywh {206 105 114 15} down_box DOWN_BOX
|
||||
code0 {o->value(progdefaults.WFaveraging);}
|
||||
}
|
||||
}
|
||||
Fl_Group {} {
|
||||
label Cursors open
|
||||
|
@ -831,7 +838,7 @@ This option takes effect after a restart.} xywh {50 155 180 20} down_box DOWN_BO
|
|||
}
|
||||
Fl_Group tabModems {
|
||||
label Modem open
|
||||
xywh {0 25 401 195} color 51 selection_color 51
|
||||
xywh {0 25 401 195} color 51 selection_color 51 hide
|
||||
} {
|
||||
Fl_Tabs tabsModems {open
|
||||
xywh {0 25 401 195} color 51 selection_color 10 align 9
|
||||
|
@ -1158,7 +1165,7 @@ initViewer();}
|
|||
Fl_Spinner cntChannels {
|
||||
label {\# Channels:}
|
||||
callback {progdefaults.VIEWERchannels = (int)(o->value());
|
||||
initViewer();} selected
|
||||
initViewer();}
|
||||
xywh {190 82 50 25} align 8
|
||||
code0 {o->minimum(5);}
|
||||
code1 {o->maximum(30);}
|
||||
|
|
|
@ -27,14 +27,15 @@ extern Fl_Check_Button *btnBlackman;
|
|||
extern Fl_Check_Button *btnHamming;
|
||||
extern Fl_Check_Button *btnHanning;
|
||||
extern Fl_Check_Button *btnTriangular;
|
||||
#include <FL/Fl_Counter.H>
|
||||
extern Fl_Counter *cntLowFreqCutoff;
|
||||
#include "colorbox.h"
|
||||
extern colorbox *WF_Palette;
|
||||
#include <FL/Fl_Button.H>
|
||||
extern Fl_Button *btnColor[9];
|
||||
extern Fl_Button *btnLoadPalette;
|
||||
extern Fl_Button *btnSavePalette;
|
||||
#include <FL/Fl_Counter.H>
|
||||
extern Fl_Counter *cntLowFreqCutoff;
|
||||
extern Fl_Check_Button *btnWFaveraging;
|
||||
extern Fl_Check_Button *btnUseCursorLines;
|
||||
extern Fl_Check_Button *btnUseBWTracks;
|
||||
extern Fl_Check_Button *btnUseCursorCenterLine;
|
||||
|
|
|
@ -85,6 +85,7 @@ struct configuration {
|
|||
uchar blue;
|
||||
bool MultiColorWF;
|
||||
int wfPreFilter;
|
||||
bool WFaveraging;
|
||||
bool UseCursorLines;
|
||||
bool UseCursorCenterLine;
|
||||
bool UseBWTracks;
|
||||
|
|
|
@ -89,6 +89,7 @@ configuration progdefaults = {
|
|||
255, // uchar blue
|
||||
0, // bool MultiColorWF;
|
||||
1, // int wfPreFilter == Blackman
|
||||
false, // bool WFaveraging
|
||||
true, // bool UseCursorLines;
|
||||
true, // bool UseCursorCenterLine;
|
||||
true, // bool UseBWTracks;
|
||||
|
@ -233,7 +234,7 @@ enum TAG { \
|
|||
PALETTE0, PALETTE1, PALETTE2, PALETTE3, PALETTE4,
|
||||
PALETTE5, PALETTE6, PALETTE7, PALETTE8,
|
||||
VIEWERMARQUEE, VIEWERSHOWFREQ, VIEWERSTART,
|
||||
VIEWERCHANNELS, VIEWERSQUELCH, VIEWERTIMEOUT,
|
||||
VIEWERCHANNELS, VIEWERSQUELCH, VIEWERTIMEOUT, WFAVERAGING
|
||||
};
|
||||
// , ALT_TEXT_WIDGETS };
|
||||
|
||||
|
@ -423,6 +424,7 @@ void configuration::writeDefaultsXML()
|
|||
writeXMLint(f, "VIEWERCHANNELS", VIEWERchannels);
|
||||
writeXMLdbl(f, "VIEWERSQUELCH", VIEWERsquelch);
|
||||
writeXMLint(f, "VIEWERTIMEOUT", VIEWERtimeout);
|
||||
writeXMLbool(f,"WFAVERAGEING", WFaveraging);
|
||||
|
||||
f << "</FLDIGI_DEFS>\n";
|
||||
f.close();
|
||||
|
@ -852,6 +854,9 @@ bool configuration::readDefaultsXML()
|
|||
case VIEWERTIMEOUT :
|
||||
VIEWERtimeout = atoi(xml->getNodeData());
|
||||
break;
|
||||
case WFAVERAGING :
|
||||
WFaveraging = atoi(xml->getNodeData());
|
||||
break;
|
||||
// case ALT_TEXT_WIDGETS :
|
||||
// alt_text_widgets = atoi(xml->getNodeData());
|
||||
// break;
|
||||
|
@ -990,6 +995,7 @@ bool configuration::readDefaultsXML()
|
|||
else if (!strcmp("VIEWERCHANNELS", nodeName)) tag = VIEWERCHANNELS;
|
||||
else if (!strcmp("VIEWERSQUELCH", nodeName)) tag = VIEWERSQUELCH;
|
||||
else if (!strcmp("VIEWERTIMEOUT", nodeName)) tag = VIEWERTIMEOUT;
|
||||
else if (!strcmp("WFAVERAGING", nodeName)) tag = WFAVERAGING;
|
||||
// else if (!strcmp("ALT_TEXT_WIDGETS", nodeName)) tag = ALT_TEXT_WIDGETS;
|
||||
else tag = IGNORE;
|
||||
}
|
||||
|
|
|
@ -90,9 +90,15 @@ bool hexout( string s, int retnbr)
|
|||
rigio.ReadBuffer (replybuff, s.size());
|
||||
|
||||
memset (replybuff, 0, 200);
|
||||
|
||||
// wait interval before trying to read response
|
||||
if ((readtimeout = rig.wait) > 0)
|
||||
while (readtimeout--)
|
||||
MilliSleep(1);
|
||||
|
||||
if (retnbr > 0) {
|
||||
num = rigio.ReadBuffer (replybuff, retnbr > 200 ? 200 : retnbr);
|
||||
// debug code
|
||||
// if (num)
|
||||
// printhex(replybuff, num);
|
||||
// else
|
||||
|
|
|
@ -618,33 +618,54 @@ void WFdisp::drawMarker() {
|
|||
step * RGBsize, RGBwidth);
|
||||
}
|
||||
|
||||
|
||||
void WFdisp::update_waterfall() {
|
||||
// transfer the fft history data into the WF image
|
||||
int sig;
|
||||
short int *p1, *p2;
|
||||
RGBI *p3, *p4;
|
||||
p1 = tmp_fft_db + offset;
|
||||
p3 = fft_img;
|
||||
|
||||
for (int row = 0; row < image_height; row++) {
|
||||
p2 = p1;
|
||||
p4 = p3;
|
||||
for (int col = 0; col < disp_width; col++) {
|
||||
if (progdefaults.WFaveraging) {
|
||||
if (step == 4)
|
||||
// sig = MAX( MAX ( MAX ( *p2, *(p2+1) ), *(p2+2) ), *(p2+3) );
|
||||
sig = (*p2+ *(p2+1)+ *(p2+2)+ *(p2+3))/4;
|
||||
for (int col = 0; col < disp_width; col++) {
|
||||
*(p4++) = mag2RGBI[ (*p2+ *(p2+1)+ *(p2+2)+ *(p2+3))/4 ];
|
||||
p2 += step;
|
||||
}
|
||||
else if (step == 2)
|
||||
// sig = MAX( *p2, *(p2 + 1) );
|
||||
sig = (*p2 + *(p2 + 1))/2;
|
||||
for (int col = 0; col < disp_width; col++) {
|
||||
*(p4++) = mag2RGBI[ (*p2 + *(p2+1))/2 ];
|
||||
p2 += step;
|
||||
}
|
||||
else
|
||||
sig = *p2;
|
||||
*p4 = mag2RGBI[ sig ];
|
||||
p2 += step;
|
||||
p4++;
|
||||
for (int col = 0; col < disp_width; col++) {
|
||||
*(p4++) = mag2RGBI[ *p2 ];
|
||||
p2 += step;
|
||||
}
|
||||
} else {
|
||||
if (step == 4)
|
||||
for (int col = 0; col < disp_width; col++) {
|
||||
*(p4++) = mag2RGBI[ MAX( MAX ( MAX ( *p2, *(p2+1) ), *(p2+2) ), *(p2+3) ) ];
|
||||
p2 += step;
|
||||
}
|
||||
else if (step == 2)
|
||||
for (int col = 0; col < disp_width; col++) {
|
||||
*(p4++) = mag2RGBI[ MAX( *p2, *(p2+1) ) ];
|
||||
p2 += step;
|
||||
}
|
||||
else
|
||||
for (int col = 0; col < disp_width; col++) {
|
||||
*(p4++) = mag2RGBI[ *p2 ];
|
||||
p2 += step;
|
||||
}
|
||||
}
|
||||
|
||||
p1 += IMAGE_WIDTH;
|
||||
p3 += disp_width;
|
||||
}
|
||||
|
||||
if (progdefaults.UseBWTracks) {
|
||||
RGBI *pos1 = fft_img + (carrierfreq - offset - bandwidth/2) / step;
|
||||
RGBI *pos2 = fft_img + (carrierfreq - offset + bandwidth/2) / step;
|
||||
|
|
Ładowanie…
Reference in New Issue