kopia lustrzana https://github.com/jamescoxon/dl-fldigi
Deleted all references to afcIND
rodzic
995d4715ab
commit
069099fcf1
|
@ -144,7 +144,6 @@ fldigi_SOURCES += \
|
|||
filters/viterbi.cxx \
|
||||
globals/globals.cxx \
|
||||
include/htmlstrings.h \
|
||||
include/afcind.h \
|
||||
include/arq_io.h \
|
||||
include/Combo_Box.h \
|
||||
include/Combo_List.h \
|
||||
|
@ -347,7 +346,6 @@ fldigi_SOURCES += \
|
|||
waterfall/digiscope.cxx \
|
||||
waterfall/raster.cxx \
|
||||
waterfall/waterfall.cxx \
|
||||
widgets/afcind.cxx \
|
||||
widgets/FTextView.cxx \
|
||||
widgets/Fl_Text_Display_mod.cxx \
|
||||
widgets/Fl_Text_Editor_mod.cxx \
|
||||
|
|
|
@ -61,7 +61,6 @@ void cw::rx_init()
|
|||
set_scope_mode(Digiscope::SCOPE);
|
||||
put_MODEstatus(mode);
|
||||
usedefaultWPM = false;
|
||||
set_AFCind(0.0);
|
||||
}
|
||||
|
||||
void cw::init()
|
||||
|
|
|
@ -107,7 +107,6 @@ void rtty::rx_init()
|
|||
}
|
||||
bitfilt->reset();
|
||||
poserr = negerr = 0.0;
|
||||
set_AFCrange(shift/10.0);
|
||||
}
|
||||
|
||||
void rtty::init()
|
||||
|
@ -577,8 +576,7 @@ int rtty::rx_process(const double *buf, int len)
|
|||
if (progStatus.afconoff) {
|
||||
if (metric > progStatus.sldrSquelchValue || !progStatus.sqlonoff) {// || sigsearch) {
|
||||
set_freq(frequency - ferr);
|
||||
set_AFCind(freqerr);
|
||||
} else set_AFCind(0.0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -57,7 +57,6 @@
|
|||
#include "waterfall.h"
|
||||
#include "raster.h"
|
||||
#include "progress.h"
|
||||
#include "afcind.h"
|
||||
#include "rigdialog.h"
|
||||
|
||||
#include "main.h"
|
||||
|
@ -205,10 +204,6 @@ Fl_Group *MixerFrame;
|
|||
Fl_Value_Slider *valRcvMixer;
|
||||
Fl_Value_Slider *valXmtMixer;
|
||||
|
||||
// AFC indicator useful during modem debugging
|
||||
// adds confusion factor to normal operations
|
||||
//AFCind *AFCindicator;
|
||||
|
||||
#define FREQWIDTH 172 // FREQWIDTH should be a multiple of 9 + 10
|
||||
#define FREQHEIGHT 30
|
||||
#define BTNWIDTH 30
|
||||
|
@ -2673,11 +2668,6 @@ void create_fl_digi_main() {
|
|||
WARNstatus->labelcolor(FL_RED);
|
||||
WARNstatus->align(FL_ALIGN_CENTER | FL_ALIGN_INSIDE);
|
||||
|
||||
// AFCindicator = new AFCind(
|
||||
// rightof(WARNstatus), Hmenu+Hrcvtxt+Hxmttxt+Hwfall,
|
||||
// 60,
|
||||
// Hstatus, "");
|
||||
|
||||
int sql_width = bwSqlOnOff;
|
||||
#ifdef __APPLE__
|
||||
sql_width -= 15; // leave room for resize handle
|
||||
|
@ -3268,16 +3258,6 @@ void abort_tx()
|
|||
trx_start_modem(active_modem);
|
||||
}
|
||||
|
||||
void set_AFCind(double val)
|
||||
{
|
||||
// REQ (&AFCind::value, AFCindicator, val );
|
||||
}
|
||||
|
||||
void set_AFCrange(double val)
|
||||
{
|
||||
// REQ (&AFCind::range, AFCindicator, val);
|
||||
}
|
||||
|
||||
// Adjust and return fg color to ensure good contrast with bg
|
||||
Fl_Color adjust_color(Fl_Color fg, Fl_Color bg)
|
||||
{
|
||||
|
|
|
@ -82,8 +82,6 @@ void dominoex::rx_init()
|
|||
Mu_datashreg = 1;
|
||||
|
||||
staticburst = false;
|
||||
set_AFCrange(0.1);
|
||||
set_AFCind(0.0);
|
||||
}
|
||||
|
||||
void dominoex::reset_filters()
|
||||
|
@ -503,8 +501,6 @@ void dominoex::synchronize()
|
|||
|
||||
synccounter += (int) floor(1.0 * (syn - symlen) / NUMTONES + 0.5);
|
||||
|
||||
set_AFCind(1.0 * (synccounter - symlen) / symlen);
|
||||
|
||||
update_syncscope();
|
||||
}
|
||||
|
||||
|
|
|
@ -69,7 +69,6 @@ void feld::rx_init()
|
|||
peakhold = 0.0;
|
||||
minhold = 1.0;
|
||||
agc = 0.0;
|
||||
set_AFCind(0.0);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,59 +0,0 @@
|
|||
//
|
||||
// afcind.h
|
||||
//
|
||||
// AFC indicator widget routines.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library 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
|
||||
// Library General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Library General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
||||
// USA.
|
||||
//
|
||||
|
||||
#ifndef _AFCind_H_
|
||||
# define _AFCind_H_
|
||||
|
||||
//
|
||||
// Include necessary headers.
|
||||
//
|
||||
|
||||
#include <FL/Fl_Widget.H>
|
||||
|
||||
//
|
||||
// AFCind class...
|
||||
//
|
||||
|
||||
class AFCind : public Fl_Widget
|
||||
{
|
||||
public:
|
||||
enum PTYPE {HORIZONTAL, VERTICAL};
|
||||
private:
|
||||
double value_, range_;
|
||||
PTYPE direction;
|
||||
|
||||
protected:
|
||||
|
||||
virtual void draw();
|
||||
|
||||
public:
|
||||
|
||||
AFCind(int x, int y, int w, int h, const char *l = 0);
|
||||
|
||||
void type(PTYPE direc) { direction = direc;}
|
||||
|
||||
void range(double v) { range_ = v; redraw(); }
|
||||
|
||||
void value(double v) { value_ = v; redraw(); }
|
||||
};
|
||||
|
||||
#endif // !_AFCind_H_
|
||||
|
|
@ -158,8 +158,6 @@ extern void put_MODEstatus(const char* fmt, ...) format__(printf, 1, 2);
|
|||
extern void put_MODEstatus(trx_mode mode);
|
||||
extern void put_Status1(const char *msg, double timeout = 0.0, status_timeout action = STATUS_CLEAR);
|
||||
extern void put_Status2(const char *msg, double timeout = 0.0, status_timeout action = STATUS_CLEAR);
|
||||
extern void set_AFCind( double val );
|
||||
extern void set_AFCrange(double val);
|
||||
|
||||
extern void show_frequency(long long);
|
||||
extern void show_mode(const string& mode);
|
||||
|
|
|
@ -32,7 +32,6 @@
|
|||
|
||||
#include "mfsk.h"
|
||||
#include "modem.h"
|
||||
#include "afcind.h"
|
||||
|
||||
#include "configuration.h"
|
||||
#include "status.h"
|
||||
|
@ -78,7 +77,6 @@ void mfsk::rx_init()
|
|||
memset(picheader, ' ', PICHEADER - 1);
|
||||
picheader[PICHEADER -1] = 0;
|
||||
put_MODEstatus(mode);
|
||||
set_AFCrange (tonespacing / 10.0);
|
||||
syncfilter->reset();
|
||||
staticburst = false;
|
||||
}
|
||||
|
@ -640,7 +638,6 @@ void mfsk::afc()
|
|||
if ( fabs(f1 - f) < ts) {
|
||||
freqerr = decayavg(freqerr, (f1 - f), 32);
|
||||
set_freq(frequency - freqerr);
|
||||
set_AFCind( freqerr );
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -53,7 +53,6 @@ void mt63::rx_init()
|
|||
set_freq(500.0 + bandwidth / 2.0);
|
||||
InpLevel->Preset(64.0, 0.75);
|
||||
escape = 0;
|
||||
set_AFCind(0.0);
|
||||
}
|
||||
|
||||
double peak = 0.0;
|
||||
|
|
|
@ -135,7 +135,6 @@ void olivia::rx_init()
|
|||
{
|
||||
Rx->Reset();
|
||||
escape = 0;
|
||||
set_AFCind(0.0);
|
||||
}
|
||||
|
||||
int olivia::unescape(int c)
|
||||
|
|
|
@ -85,7 +85,6 @@ void psk::rx_init()
|
|||
put_MODEstatus(mode);
|
||||
resetSN_IMD();
|
||||
imdValid = false;
|
||||
set_AFCrange(1.0);
|
||||
afcmetric = 0.0;
|
||||
}
|
||||
|
||||
|
@ -383,8 +382,7 @@ void psk::phaseafc()
|
|||
freqerr = decayavg( freqerr, error, AFCDECAYSLOW);
|
||||
frequency -= freqerr;
|
||||
set_freq (frequency);
|
||||
set_AFCind(freqerr);
|
||||
} else set_AFCind(0.0);
|
||||
}
|
||||
if (acquire) acquire--;
|
||||
}
|
||||
|
||||
|
|
|
@ -71,8 +71,6 @@ void thor::rx_init()
|
|||
put_sec_char(0);
|
||||
syncfilter->reset();
|
||||
datashreg = 1;
|
||||
set_AFCrange(0.1);
|
||||
set_AFCind(0.0);
|
||||
}
|
||||
|
||||
void thor::reset_filters()
|
||||
|
@ -465,8 +463,6 @@ void thor::synchronize()
|
|||
|
||||
synccounter += (int) floor(1.0 * (syn - symlen) / THORNUMTONES + 0.5);
|
||||
|
||||
set_AFCind(1.0 * (synccounter - symlen) / symlen);
|
||||
|
||||
update_syncscope();
|
||||
|
||||
}
|
||||
|
|
|
@ -57,7 +57,6 @@ void throb::rx_init()
|
|||
shift = 0;
|
||||
lastchar = '\0';
|
||||
put_MODEstatus(mode);
|
||||
set_AFCind(0.0);
|
||||
}
|
||||
|
||||
void throb::init()
|
||||
|
|
|
@ -1,104 +0,0 @@
|
|||
//
|
||||
// afcind.cxx
|
||||
//
|
||||
// AFC indicator widget routines.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library 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
|
||||
// Library General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Library General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
||||
// USA.
|
||||
//
|
||||
//
|
||||
// Include necessary header files...
|
||||
//
|
||||
|
||||
#include <config.h>
|
||||
#include <math.h>
|
||||
|
||||
#include <FL/Fl.H>
|
||||
#include <FL/fl_draw.H>
|
||||
|
||||
#include "afcind.h"
|
||||
|
||||
//
|
||||
// afcind is a center bar indicator widget that shows a center mark and
|
||||
// two colored ratio members that slide to the left (below) or right (above)
|
||||
// the center mark. Used in place of closing eye type of display for AFC.
|
||||
// either horizontal or vertical format
|
||||
//
|
||||
// if direction == VERTICAL the indicator goes from lower to upper
|
||||
// if direction == HORIZONTAL the indicator goes from left to right
|
||||
|
||||
void AFCind::draw()
|
||||
{
|
||||
double dVal;
|
||||
int AFCval; // Size of AFCind bar...
|
||||
int bx, by, bw, bh; // Box areas...
|
||||
int tx, tw; // Temporary X + width
|
||||
int ty, th; // Temporary Y + height
|
||||
|
||||
|
||||
// Get the box borders...
|
||||
bx = Fl::box_dx(box());
|
||||
by = Fl::box_dy(box());
|
||||
bw = Fl::box_dw(box());
|
||||
bh = Fl::box_dh(box());
|
||||
|
||||
tx = x() + bx;
|
||||
tw = w() - bw;
|
||||
ty = y() + by;
|
||||
th = h() - bh;
|
||||
|
||||
dVal = CLAMP( (value_ + range_) / (2.0 * range_), -1.0, 1.0);
|
||||
AFCval = (int)((direction == HORIZONTAL ? tw : th) * dVal);
|
||||
|
||||
// draw the center marker either to the left or above the primary display
|
||||
|
||||
if (direction == HORIZONTAL) {
|
||||
//clear the display && draw the scale
|
||||
|
||||
fl_clip (x(), y(), w(), h());
|
||||
draw_box(box(), x(), y(), w(), h(), FL_BLACK);
|
||||
|
||||
fl_rectf(tx + tw / 2 - 1, ty, 2, 6, 238,238,238);
|
||||
fl_rectf(tx, ty + 7, AFCval - 1, th - 7, 238,232,170);
|
||||
fl_rectf(tx + AFCval + 1, ty + 7, tw - AFCval - 1, th - 7, 124,205,124);
|
||||
|
||||
fl_pop_clip();
|
||||
|
||||
} else {
|
||||
fl_clip (x(), y(), w(), h());
|
||||
draw_box(box(), x(), y(), w(), h(), FL_BLACK);
|
||||
|
||||
fl_rectf(tx, ty + th/2 - 1, 6, 2, 238,238,238);
|
||||
fl_rectf(tx + 7, ty + th - (AFCval - 1), tw - 7, AFCval - 1, 238,232,170);
|
||||
fl_rectf(tx + 7, ty, tw - 7, AFCval - 1, 124,205,124);
|
||||
|
||||
fl_pop_clip();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
AFCind::AFCind(int X, int Y, int W, int H, const char* l)
|
||||
: Fl_Widget(X, Y, W, H, l)
|
||||
{
|
||||
align(FL_ALIGN_INSIDE);
|
||||
box(FL_DOWN_BOX);
|
||||
range(1.0);
|
||||
value(0.0);
|
||||
direction = HORIZONTAL;
|
||||
}
|
||||
|
||||
//
|
||||
// End of "$Id: AFCind.cxx 4288 2005-04-16 00:13:17Z mike $".
|
||||
//
|
|
@ -40,7 +40,6 @@ void anal::rx_init()
|
|||
{
|
||||
phaseacc = 0;
|
||||
put_MODEstatus(mode);
|
||||
set_AFCrange(1.0);
|
||||
}
|
||||
|
||||
void anal::init()
|
||||
|
@ -168,7 +167,6 @@ int anal::rx_process(const double *buf, int len)
|
|||
// reset the display counter & the pipe pointer
|
||||
dspcnt = symbollen;
|
||||
pipeptr = 0;
|
||||
set_AFCind(fout_2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -54,7 +54,6 @@ void wwv::rx_init()
|
|||
zoom = false;
|
||||
set_scope_mode(Digiscope::WWV);
|
||||
put_MODEstatus(mode);
|
||||
set_AFCind(0.0);
|
||||
}
|
||||
|
||||
void wwv::init()
|
||||
|
|
Ładowanie…
Reference in New Issue