From 069099fcf18742f96679eed3f11c3be4dc243249 Mon Sep 17 00:00:00 2001 From: David Freese Date: Sun, 1 Feb 2009 20:19:25 -0600 Subject: [PATCH] Deleted all references to afcIND --- src/Makefile.am | 2 - src/cw_rtty/cw.cxx | 1 - src/cw_rtty/rtty.cxx | 4 +- src/dialogs/fl_digi.cxx | 20 -------- src/dominoex/dominoex.cxx | 4 -- src/feld/feld.cxx | 1 - src/include/afcind.h | 59 --------------------- src/include/fl_digi.h | 2 - src/mfsk/mfsk.cxx | 3 -- src/mt63/mt63.cxx | 1 - src/olivia/olivia.cxx | 1 - src/psk/psk.cxx | 4 +- src/thor/thor.cxx | 4 -- src/throb/throb.cxx | 1 - src/widgets/afcind.cxx | 104 -------------------------------------- src/wwv/analysis.cxx | 2 - src/wwv/wwv.cxx | 1 - 17 files changed, 2 insertions(+), 212 deletions(-) delete mode 100644 src/include/afcind.h delete mode 100644 src/widgets/afcind.cxx diff --git a/src/Makefile.am b/src/Makefile.am index e225baa8..2578cc3d 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -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 \ diff --git a/src/cw_rtty/cw.cxx b/src/cw_rtty/cw.cxx index 6799dd7c..f0d16a1d 100644 --- a/src/cw_rtty/cw.cxx +++ b/src/cw_rtty/cw.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() diff --git a/src/cw_rtty/rtty.cxx b/src/cw_rtty/rtty.cxx index 1942204b..261ed32b 100644 --- a/src/cw_rtty/rtty.cxx +++ b/src/cw_rtty/rtty.cxx @@ -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); + } } } } diff --git a/src/dialogs/fl_digi.cxx b/src/dialogs/fl_digi.cxx index 636533d5..948d92ed 100644 --- a/src/dialogs/fl_digi.cxx +++ b/src/dialogs/fl_digi.cxx @@ -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) { diff --git a/src/dominoex/dominoex.cxx b/src/dominoex/dominoex.cxx index 866e03f8..645d47c6 100644 --- a/src/dominoex/dominoex.cxx +++ b/src/dominoex/dominoex.cxx @@ -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(); } diff --git a/src/feld/feld.cxx b/src/feld/feld.cxx index 5f3c4de9..03dce088 100644 --- a/src/feld/feld.cxx +++ b/src/feld/feld.cxx @@ -69,7 +69,6 @@ void feld::rx_init() peakhold = 0.0; minhold = 1.0; agc = 0.0; - set_AFCind(0.0); return; } diff --git a/src/include/afcind.h b/src/include/afcind.h deleted file mode 100644 index f5c3bb35..00000000 --- a/src/include/afcind.h +++ /dev/null @@ -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 - -// -// 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_ - diff --git a/src/include/fl_digi.h b/src/include/fl_digi.h index 0bfef15c..abfb075e 100644 --- a/src/include/fl_digi.h +++ b/src/include/fl_digi.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); diff --git a/src/mfsk/mfsk.cxx b/src/mfsk/mfsk.cxx index b1cf0842..64db3e10 100644 --- a/src/mfsk/mfsk.cxx +++ b/src/mfsk/mfsk.cxx @@ -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 ); } } diff --git a/src/mt63/mt63.cxx b/src/mt63/mt63.cxx index accfc635..ca38a302 100644 --- a/src/mt63/mt63.cxx +++ b/src/mt63/mt63.cxx @@ -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; diff --git a/src/olivia/olivia.cxx b/src/olivia/olivia.cxx index 32d7f506..9ba79c4d 100644 --- a/src/olivia/olivia.cxx +++ b/src/olivia/olivia.cxx @@ -135,7 +135,6 @@ void olivia::rx_init() { Rx->Reset(); escape = 0; - set_AFCind(0.0); } int olivia::unescape(int c) diff --git a/src/psk/psk.cxx b/src/psk/psk.cxx index 640d4d3e..93e614a7 100644 --- a/src/psk/psk.cxx +++ b/src/psk/psk.cxx @@ -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--; } diff --git a/src/thor/thor.cxx b/src/thor/thor.cxx index 662f0ee2..e1f854ea 100644 --- a/src/thor/thor.cxx +++ b/src/thor/thor.cxx @@ -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(); } diff --git a/src/throb/throb.cxx b/src/throb/throb.cxx index b799e4c9..eec30e81 100644 --- a/src/throb/throb.cxx +++ b/src/throb/throb.cxx @@ -57,7 +57,6 @@ void throb::rx_init() shift = 0; lastchar = '\0'; put_MODEstatus(mode); - set_AFCind(0.0); } void throb::init() diff --git a/src/widgets/afcind.cxx b/src/widgets/afcind.cxx deleted file mode 100644 index 807941fe..00000000 --- a/src/widgets/afcind.cxx +++ /dev/null @@ -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 -#include - -#include -#include - -#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 $". -// diff --git a/src/wwv/analysis.cxx b/src/wwv/analysis.cxx index 16a20f13..1adb0c02 100644 --- a/src/wwv/analysis.cxx +++ b/src/wwv/analysis.cxx @@ -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); } } } diff --git a/src/wwv/wwv.cxx b/src/wwv/wwv.cxx index 5a3ecb38..808e0776 100644 --- a/src/wwv/wwv.cxx +++ b/src/wwv/wwv.cxx @@ -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()