add BW_RTTY_AUTO and fix rtty bandwidth setting

pull/2/head
Daniel Richman 2012-09-03 15:37:03 +01:00
rodzic eeacc69ec0
commit cb241eed8a
5 zmienionych plików z 36 dodań i 6 usunięć

Wyświetl plik

@ -25,6 +25,7 @@
#include <config.h>
#include <iostream>
#include <algorithm>
using namespace std;
#include "view_rtty.h"
@ -185,10 +186,13 @@ void rtty::restart()
symbollen = (int) (samplerate / rtty_baud + 0.5);
set_bandwidth(shift);
if (progdefaults.RTTY_BW < rtty_baud)
progdefaults.RTTY_BW = rtty_baud;
if (progdefaults.RTTY_BW_AUTO)
{
progdefaults.RTTY_BW = max(rtty_baud, 68.0);
sldrRTTYbandwidth->value(progdefaults.RTTY_BW);
}
rtty_BW = progdefaults.RTTY_BW;
sldrRTTYbandwidth->value(rtty_BW);
wf->redraw_marker();

Wyświetl plik

@ -1890,6 +1890,16 @@ Fl_Value_Slider2 *sldrRTTYbandwidth=(Fl_Value_Slider2 *)0;
static void cb_sldrRTTYbandwidth(Fl_Value_Slider2* o, void*) {
progdefaults.RTTY_BW = o->value();
progdefaults.RTTY_BW_AUTO = false;
progdefaults.changed = true;
}
Fl_Button *RTTYbandwidthAuto=(Fl_Button *)0;
static void cb_RTTYbandwidthAuto(Fl_Button*, void*) {
progdefaults.RTTY_BW_AUTO = true;
resetRTTY();
progdefaults.changed = true;
}
Fl_Counter2 *selCustomShift=(Fl_Counter2 *)0;
@ -6089,7 +6099,7 @@ an merging"));
o->value(progdefaults.Xagc);
o->hide();
} // Fl_Check_Button* chkXagc
{ Fl_Value_Slider2* o = sldrRTTYbandwidth = new Fl_Value_Slider2(100, 325, 300, 20, _("Receive filter bandwidth"));
{ Fl_Value_Slider2* o = sldrRTTYbandwidth = new Fl_Value_Slider2(85, 325, 300, 20, _("Receive filter bandwidth"));
sldrRTTYbandwidth->tooltip(_("Adjust the DSP bandwidth"));
sldrRTTYbandwidth->type(1);
sldrRTTYbandwidth->box(FL_DOWN_BOX);
@ -6110,6 +6120,9 @@ an merging"));
o->value(progdefaults.RTTY_BW);
o->labelsize(FL_NORMAL_SIZE); o->textsize(FL_NORMAL_SIZE);
} // Fl_Value_Slider2* sldrRTTYbandwidth
{ RTTYbandwidthAuto = new Fl_Button(390, 325, 65, 20, _("Auto"));
RTTYbandwidthAuto->callback((Fl_Callback*)cb_RTTYbandwidthAuto);
} // Fl_Button* RTTYbandwidthAuto
{ Fl_Counter2* o = selCustomShift = new Fl_Counter2(36, 103, 100, 20, _("Custom shift"));
selCustomShift->tooltip(_("Input carrier shift"));
selCustomShift->box(FL_UP_BOX);

Wyświetl plik

@ -2458,12 +2458,21 @@ progdefaults.changed = true;}
}
Fl_Value_Slider sldrRTTYbandwidth {
label {Receive filter bandwidth}
callback {progdefaults.RTTY_BW = o->value();}
tooltip {Adjust the DSP bandwidth} xywh {100 325 300 20} type Horizontal align 5 minimum 5 maximum 1000 step 1 value 25 textsize 14
callback {progdefaults.RTTY_BW = o->value();
progdefaults.RTTY_BW_AUTO = false;
progdefaults.changed = true;}
tooltip {Adjust the DSP bandwidth} xywh {85 325 300 20} type Horizontal align 5 minimum 5 maximum 1000 step 1 value 25 textsize 14
code0 {o->value(progdefaults.RTTY_BW);}
code1 {o->labelsize(FL_NORMAL_SIZE); o->textsize(FL_NORMAL_SIZE);}
class Fl_Value_Slider2
}
Fl_Button RTTYbandwidthAuto {
label Auto
callback {progdefaults.RTTY_BW_AUTO = true;
resetRTTY();
progdefaults.changed = true;}
xywh {390 325 65 20}
}
Fl_Counter selCustomShift {
label {Custom shift}
callback {progdefaults.rtty_custom_shift = o->value();

Wyświetl plik

@ -255,6 +255,7 @@ extern Fl_Check_Button *chkPseudoFSK;
extern Fl_Choice *mnuRTTYAFCSpeed;
extern Fl_Check_Button *chkXagc;
extern Fl_Value_Slider2 *sldrRTTYbandwidth;
extern Fl_Button *RTTYbandwidthAuto;
extern Fl_Counter2 *selCustomShift;
extern Fl_Group *tabTHOR;
extern Fl_Input2 *txtTHORSecondary;

Wyświetl plik

@ -256,6 +256,9 @@
ELEM_(double, RTTY_BW, "RTTYBW", \
"Receive filter bandwidth (Hz)", \
68.0) \
ELEM_(bool, RTTY_BW_AUTO, "RTTYBW", \
"Was RTTY_BW set automatically?", \
true) \
ELEM_(int, rtty_baud, "RTTYBAUD", \
"Carrier baud rate. Values are as follows:\n" \
" 1: 45; 1: 45.45; 2: 50; 3: 56; 4: 75; 5: 100; 6: 110; 7: 150; \n" \