mirror of
https://git.code.sf.net/p/fldigi/fldigi
synced 2026-08-13 17:47:54 -04:00
CW update
* change to FIR lowpass filter
* remove character hesitation; cw using flrig dtr/rts keying
* add user configurable 'weight' setting
* correct "retain freq lock" usage
. the logic was being applied in the wrong place in the code
* correct CW wpm sync between various keyline controls
* add CW keyline control using GPIO pin
. only applicable to PI computers
* add code for CW bandwidth control via mousewheel
* add user selectable embedded CW bandwidth controls
* start at sweet spot if so configured
This commit is contained in:
parent
59b2bbd9f0
commit
c81ddb02cf
18 changed files with 2851 additions and 1102 deletions
788
src/cw/cw.cxx
788
src/cw/cw.cxx
File diff suppressed because it is too large
Load diff
|
|
@ -432,6 +432,8 @@ void WK_speed_(int byte)
|
|||
|
||||
void WK_set_wpm()
|
||||
{
|
||||
if (!progStatus.WK_online) return;
|
||||
|
||||
std::string cmd = SET_WPM;
|
||||
cmd += progdefaults.CWspeed;
|
||||
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
|
@ -724,6 +724,16 @@ Fl_Button *opUsageEnter = (Fl_Button *)0;
|
|||
Fl_Group *wf_group = (Fl_Group *)0;
|
||||
Fl_Group *status_group = (Fl_Group *)0;
|
||||
|
||||
Fl_Group *cws_group = (Fl_Group *)0;
|
||||
|
||||
Fl_Check_Button *btncwsrcvTrack = (Fl_Check_Button *)0;
|
||||
Fl_Counter2 *cntcwsrange = (Fl_Counter2 *)0;
|
||||
Fl_Check_Button *btncwsuseSOMdecoding = (Fl_Check_Button *)0;
|
||||
Fl_Check_Button *btncwsmfilt = (Fl_Check_Button *)0;
|
||||
Fl_Counter2 *cntcwsbandwidth = (Fl_Counter2 *)0;
|
||||
Fl_Choice *mnu_cws_fillen = (Fl_Choice *)0;
|
||||
|
||||
|
||||
Fl_Value_Slider2 *mvsquelch = (Fl_Value_Slider2 *)0;
|
||||
Fl_Button *btnClearMViewer = 0;
|
||||
|
||||
|
|
@ -736,6 +746,7 @@ static const int Hqsoframe = 2*pad + 3 * (Hentry + pad);
|
|||
|
||||
int Hstatus = 20;
|
||||
int Hmacros = 20;
|
||||
int Hcws_group = 22;
|
||||
|
||||
#define TB_HEIGHT 20
|
||||
#define MACROBAR_MIN 18
|
||||
|
|
@ -1603,6 +1614,8 @@ void startup_modem(modem* m, int f)
|
|||
|
||||
wf->xmtlock->value(progStatus.tx_lock);
|
||||
wf->xmtlock->do_callback();
|
||||
|
||||
// UI_select();
|
||||
}
|
||||
|
||||
void cb_mnuOpenMacro(Fl_Menu_*, void*) {
|
||||
|
|
@ -2110,6 +2123,8 @@ void init_modem(trx_mode mode, int freq)
|
|||
clear_StatusMessages();
|
||||
progStatus.lastmode = mode;
|
||||
|
||||
UI_select();
|
||||
|
||||
if (wf->xmtlock->value() == 1 && !mailserver) {
|
||||
if(!progdefaults.retain_freq_lock) {
|
||||
wf->xmtlock->value(0);
|
||||
|
|
@ -4907,6 +4922,9 @@ void UI_position_macros(int x, int y1, int w, int HTh)
|
|||
wf_group->position(x, y1);
|
||||
y1 += wf_group->h();
|
||||
status_group->position(x, y1);
|
||||
y1 += status_group->h();
|
||||
cws_group->position(x, y1);
|
||||
y1 += cws_group->h();
|
||||
} else {
|
||||
int htbar = 4 * TB_HEIGHT;
|
||||
|
||||
|
|
@ -4930,6 +4948,9 @@ void UI_position_macros(int x, int y1, int w, int HTh)
|
|||
wf_group->position(x, y1);
|
||||
y1 += wf_group->h();
|
||||
status_group->position(x, y1);
|
||||
y1 += status_group->h();
|
||||
cws_group->position(x, y1);
|
||||
y1 += cws_group->h();
|
||||
}
|
||||
fl_digi_main->init_sizes();
|
||||
return;
|
||||
|
|
@ -4957,6 +4978,9 @@ void UI_position_macros(int x, int y1, int w, int HTh)
|
|||
wf_group->position(x, y1);
|
||||
y1 += wf_group->h();
|
||||
status_group->position(x, y1);
|
||||
y1 += status_group->h();
|
||||
cws_group->position(x, y1);
|
||||
y1 += cws_group->h();
|
||||
break;
|
||||
default:
|
||||
case 1:
|
||||
|
|
@ -4978,6 +5002,9 @@ void UI_position_macros(int x, int y1, int w, int HTh)
|
|||
wf_group->position(x, y1);
|
||||
y1 += wf_group->h();
|
||||
status_group->position(x, y1);
|
||||
y1 += status_group->h();
|
||||
cws_group->position(x, y1);
|
||||
y1 += cws_group->h();
|
||||
break;
|
||||
case 2:
|
||||
resize_macroframe_2(x,y1,w,mh);
|
||||
|
|
@ -4999,6 +5026,9 @@ void UI_position_macros(int x, int y1, int w, int HTh)
|
|||
btnAltMacros1->activate();
|
||||
y1 += mh;
|
||||
status_group->position(x, y1);
|
||||
y1 += status_group->h();
|
||||
cws_group->position(x, y1);
|
||||
y1 += cws_group->h();
|
||||
break;
|
||||
case 3:
|
||||
resize_macroframe_1(x, y1, w, mh);
|
||||
|
|
@ -5022,6 +5052,9 @@ void UI_position_macros(int x, int y1, int w, int HTh)
|
|||
wf_group->position(x, y1);
|
||||
y1 += wf_group->h();
|
||||
status_group->position(x, y1);
|
||||
y1 += status_group->h();
|
||||
cws_group->position(x, y1);
|
||||
y1 += cws_group->h();
|
||||
break;
|
||||
case 4:
|
||||
resize_macroframe_2(x, y1, w, mh);
|
||||
|
|
@ -5045,6 +5078,9 @@ void UI_position_macros(int x, int y1, int w, int HTh)
|
|||
wf_group->position(x, y1);
|
||||
y1 += wf_group->h();
|
||||
status_group->position(x, y1);
|
||||
y1 += status_group->h();
|
||||
cws_group->position(x, y1);
|
||||
y1 += cws_group->h();
|
||||
break;
|
||||
case 5:
|
||||
HTh -= 2*mh;
|
||||
|
|
@ -5067,6 +5103,9 @@ void UI_position_macros(int x, int y1, int w, int HTh)
|
|||
wf_group->position(x, y1);
|
||||
y1 += wf_group->h();
|
||||
status_group->position(x, y1);
|
||||
y1 += status_group->h();
|
||||
cws_group->position(x, y1);
|
||||
y1 += cws_group->h();
|
||||
break;
|
||||
case 6:
|
||||
HTh -= 2*mh;
|
||||
|
|
@ -5088,6 +5127,9 @@ void UI_position_macros(int x, int y1, int w, int HTh)
|
|||
wf_group->position(x, y1);
|
||||
y1 += wf_group->h();
|
||||
status_group->position(x, y1);
|
||||
y1 += status_group->h();
|
||||
cws_group->position(x, y1);
|
||||
y1 += cws_group->h();
|
||||
break;
|
||||
case 7:
|
||||
HTh -= 2*mh;
|
||||
|
|
@ -5109,6 +5151,9 @@ void UI_position_macros(int x, int y1, int w, int HTh)
|
|||
macroFrame2->show();
|
||||
y1 += mh;
|
||||
status_group->position(x, y1);
|
||||
y1 += status_group->h();
|
||||
cws_group->position(x, y1);
|
||||
y1 += cws_group->h();
|
||||
break;
|
||||
case 8:
|
||||
HTh -= 2*mh;
|
||||
|
|
@ -5129,6 +5174,9 @@ void UI_position_macros(int x, int y1, int w, int HTh)
|
|||
btnAltMacros1->deactivate();
|
||||
y1 += mh;
|
||||
status_group->position(x, y1);
|
||||
y1 += status_group->h();
|
||||
cws_group->position(x, y1);
|
||||
y1 += cws_group->h();
|
||||
break;
|
||||
case 9:
|
||||
HTh -= 2*mh;
|
||||
|
|
@ -5151,6 +5199,9 @@ void UI_position_macros(int x, int y1, int w, int HTh)
|
|||
btnAltMacros2->activate();
|
||||
y1 += mh;
|
||||
status_group->position(x, y1);
|
||||
y1 += status_group->h();
|
||||
cws_group->position(x, y1);
|
||||
y1 += cws_group->h();
|
||||
break;
|
||||
case 10:
|
||||
HTh -= 2*mh;
|
||||
|
|
@ -5173,6 +5224,9 @@ void UI_position_macros(int x, int y1, int w, int HTh)
|
|||
btnAltMacros1->deactivate();
|
||||
y1 += mh;
|
||||
status_group->position(x, y1);
|
||||
y1 += status_group->h();
|
||||
cws_group->position(x, y1);
|
||||
y1 += cws_group->h();
|
||||
break;
|
||||
case 11:
|
||||
resize_macroframe_2(x, y1, w, mh);
|
||||
|
|
@ -5195,6 +5249,9 @@ void UI_position_macros(int x, int y1, int w, int HTh)
|
|||
wf_group->position(x, y1);
|
||||
y1 += wf_group->h();
|
||||
status_group->position(x, y1);
|
||||
y1 += status_group->h();
|
||||
cws_group->position(x, y1);
|
||||
y1 += cws_group->h();
|
||||
break;
|
||||
case 12:
|
||||
resize_macroframe_1(x, y1, w, mh);
|
||||
|
|
@ -5217,15 +5274,20 @@ void UI_position_macros(int x, int y1, int w, int HTh)
|
|||
wf_group->position(x, y1);
|
||||
y1 += wf_group->h();
|
||||
status_group->position(x, y1);
|
||||
y1 += status_group->h();
|
||||
cws_group->position(x, y1);
|
||||
y1 += cws_group->h();
|
||||
break;
|
||||
}
|
||||
fl_digi_main->init_sizes();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
bool UI_first = true;
|
||||
void UI_select()
|
||||
{
|
||||
|
||||
if (bWF_only) {
|
||||
int Y = cntTxLevel->y();
|
||||
int psm_width = progdefaults.show_psm_btn ? bwSqlOnOff : 0;
|
||||
|
|
@ -5263,11 +5325,6 @@ void UI_select()
|
|||
return;
|
||||
}
|
||||
|
||||
int x = 0;
|
||||
int y1 = Hmenu;
|
||||
int w = fl_digi_main->w();
|
||||
int HTh = fl_digi_main->h() - y1;
|
||||
|
||||
if (cnt_macro_height) {
|
||||
cnt_macro_height->minimum(MACROBAR_MIN);
|
||||
cnt_macro_height->maximum(MACROBAR_MAX);
|
||||
|
|
@ -5277,8 +5334,14 @@ void UI_select()
|
|||
cnt_macro_height->value(progdefaults.macro_height);
|
||||
}
|
||||
|
||||
HTh -= wf_group->h();
|
||||
HTh -= status_group->h();
|
||||
int x = 0;
|
||||
int y1 = Hmenu;
|
||||
int w = fl_digi_main->w();
|
||||
|
||||
int HTh = fl_digi_main->h() - mnu->h() - wf_group->h() - status_group->h();
|
||||
|
||||
if (progStatus.lastmode == MODE_CW && progdefaults.show_CW_controls)
|
||||
HTh -= cws_group->h();
|
||||
|
||||
if (progStatus.NO_RIGLOG && !restore_minimize) {
|
||||
TopFrame1->hide();
|
||||
|
|
@ -5854,6 +5917,21 @@ UI_return:
|
|||
fl_digi_main->redraw();
|
||||
|
||||
Fl::flush();
|
||||
|
||||
// developer usage
|
||||
/*
|
||||
std::cout << "===================== UI_select =======================" << std::endl;
|
||||
std::cout << "Main ............ " << fl_digi_main->y() << ", " << fl_digi_main->h() << std::endl;
|
||||
std::cout << "Menu ............ " << mnuFrame->y() << ", " << mnuFrame->h() << std::endl;
|
||||
std::cout << "Qsoframe ........ " << TopFrame1->y() << ", " << TopFrame1->h() << std::endl;
|
||||
std::cout << "Center group .... " << center_group->y() << ", " << center_group->h() << std::endl;
|
||||
std::cout << "Macro frame ..... " << macroFrame1->y() << ", " << macroFrame1->h() << std::endl;
|
||||
std::cout << "Wfall ........... " << wf_group->y() << ", " << wf_group->h() << std::endl;
|
||||
std::cout << "Status ......... " << status_group->y() << ", " << status_group->h() << std::endl;
|
||||
std::cout << "Cws ............. " << cws_group->y() << ", " << cws_group->h() << std::endl;
|
||||
std::cout << "==========================================================" << std::endl;
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -6922,6 +7000,9 @@ void setwfrange() {
|
|||
|
||||
void sync_cw_parameters()
|
||||
{
|
||||
WK_set_wpm();
|
||||
flrig_set_wpm();
|
||||
|
||||
active_modem->sync_parameters();
|
||||
active_modem->update_Status();
|
||||
}
|
||||
|
|
@ -6940,14 +7021,13 @@ void cb_cntCW_WPM(Fl_Widget * w, void *v)
|
|||
|
||||
progdefaults.CWspeed = (int)cnt->value();
|
||||
LOG_INFO("%f WPM", progdefaults.CWspeed);
|
||||
|
||||
sldrCWxmtWPM->value(progdefaults.CWspeed);
|
||||
cntr_nanoCW_WPM->value(progdefaults.CWspeed);
|
||||
|
||||
progdefaults.changed = true;
|
||||
sync_cw_parameters();
|
||||
|
||||
if (progStatus.WK_online) WK_set_wpm();
|
||||
flrig_set_wpm();
|
||||
sync_cw_parameters();
|
||||
|
||||
restoreFocus(25);
|
||||
}
|
||||
|
|
@ -8195,7 +8275,7 @@ void create_fl_digi_main_WF_only() {
|
|||
IMAGE_WIDTH = 4000;
|
||||
Hwfall = progdefaults.wfheight;
|
||||
Wwfall = W - 2 * DEFAULT_SW - 2 * pad;
|
||||
WF_only_height = Hmenu + Hwfall + Hstatus + 4 * pad;
|
||||
WF_only_height = Hmenu + Hwfall + Hstatus + Hcws_group + 4 * pad;
|
||||
|
||||
fl_digi_main = new Fl_Double_Window(W, WF_only_height);
|
||||
|
||||
|
|
@ -8393,6 +8473,15 @@ void create_fl_digi_main_WF_only() {
|
|||
|
||||
status_group->end();
|
||||
|
||||
Y += status_group->h();
|
||||
|
||||
cws_group = new Fl_Group(0, Y, W, Hcws_group, "CWS GROUP");
|
||||
cws_group->box(FL_DOWN_BOX);
|
||||
cws_group->align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE);
|
||||
cws_group->end();
|
||||
|
||||
Y += cws_group->h();
|
||||
|
||||
Fl::add_handler(wo_default_handler);
|
||||
|
||||
fl_digi_main->end();
|
||||
|
|
@ -11395,3 +11484,48 @@ void change_menu_fonts( Fl_Font font, int size)
|
|||
|
||||
}
|
||||
|
||||
// cwsettings support code
|
||||
|
||||
void cb_btncwsrcvTrack(Fl_Check_Button* o, void*) {
|
||||
progdefaults.CWtrack = o->value();
|
||||
btnCWrcvTrack->value(o->value());
|
||||
progdefaults.changed = true;
|
||||
}
|
||||
|
||||
void cb_cntcwsrange(Fl_Counter2* o, void*) {
|
||||
progdefaults.CWrange = (int)o->value();
|
||||
cntCWrange->value(o->value());
|
||||
progdefaults.changed = true;
|
||||
}
|
||||
|
||||
void cb_btncwsuseSOMdecoding(Fl_Check_Button* o, void*) {
|
||||
progdefaults.CWuseSOMdecoding = o->value();
|
||||
btnCWuseSOMdecoding->value(o->value());
|
||||
|
||||
progdefaults.changed = true;
|
||||
}
|
||||
|
||||
void cb_btncwsmfilt(Fl_Check_Button* o, void*) {
|
||||
progdefaults.CWmfilt = o->value();
|
||||
btnCWmfilt->value(o->value());
|
||||
if (active_modem == cw_modem)
|
||||
active_modem->reset_rx_filter();
|
||||
progdefaults.changed = true;
|
||||
}
|
||||
|
||||
void cb_cntcwsbandwidth(Fl_Counter2* o, void*) {
|
||||
progdefaults.CWbandwidth = (int)o->value();
|
||||
cntCWbandwidth->value(o->value());
|
||||
if (active_modem == cw_modem)
|
||||
active_modem->reset_rx_filter();
|
||||
progdefaults.changed = true;
|
||||
}
|
||||
|
||||
void cb_mnu_cws_fillen(Fl_Choice* o, void*) {
|
||||
progdefaults.CW_fillen = o->value();
|
||||
mnu_CW_fillen->value(o->value());
|
||||
if (active_modem == cw_modem)
|
||||
active_modem->reset_rx_filter();
|
||||
progdefaults.changed = true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -28,7 +28,8 @@ void create_fl_digi_main_primary() {
|
|||
Hmenu +
|
||||
Hqsoframe +
|
||||
Hwfall +
|
||||
Hstatus;
|
||||
Hstatus +
|
||||
Hcws_group;
|
||||
int hmacros = TB_HEIGHT * 4;
|
||||
|
||||
fixed_height += hmacros;
|
||||
|
|
@ -49,17 +50,6 @@ void create_fl_digi_main_primary() {
|
|||
|
||||
main_hmin = Htext + fixed_height;
|
||||
|
||||
// developer usage
|
||||
//cout << "=============================================================" << endl;
|
||||
//cout << "min main_height ..... " << main_hmin << endl;
|
||||
//cout << " = Hmenu ............ " << Hmenu << endl;
|
||||
//cout << " + Hqsoframe ........ " << Hqsoframe << endl;
|
||||
//cout << " + Hwfall ........... " << Hwfall << endl;
|
||||
//cout << " + Hstatus ......... " << Hstatus << endl;
|
||||
//cout << " + Hmacros .......... " << hmacros << endl;
|
||||
//cout << " + text height ...... " << Htext << endl;
|
||||
//cout << "=============================================================" << endl;
|
||||
|
||||
if (progStatus.mainH < main_hmin) {
|
||||
progStatus.mainH = main_hmin;
|
||||
}
|
||||
|
|
@ -150,6 +140,7 @@ void create_fl_digi_main_primary() {
|
|||
|
||||
Y += mnuFrame->h();
|
||||
}
|
||||
|
||||
TopFrame1 = new Fl_Group(
|
||||
0, Y,
|
||||
fl_digi_main->w(), Hqsoframe);
|
||||
|
|
@ -767,7 +758,7 @@ void create_fl_digi_main_primary() {
|
|||
}
|
||||
gCWSS = new Fl_Group (
|
||||
Logging_frame_1->x(), y3, wf1, Hentry + pad);
|
||||
{ // CW Sweepstakes - LOG_CWSS
|
||||
{ // CW Sweepstakes - LOG_cwsS
|
||||
outSerNo3 = new Fl_Input2(
|
||||
inpCall1->x(), y3, 40, Hentry,
|
||||
"S#");
|
||||
|
|
@ -1669,7 +1660,7 @@ Logging_frame->resizable(NFtabs);
|
|||
log_cqww_rtty_frame->resizable(lcq_box);
|
||||
// end LOG_CQWW_RTTY - partial
|
||||
|
||||
// LOG CWSS - partial
|
||||
// LOG cwsS - partial
|
||||
log_cqss_frame = new Fl_Group(
|
||||
TopFrame3b->x(), TopFrame3b->y(),
|
||||
TopFrame3b->w(), Hentry,"");
|
||||
|
|
@ -1715,7 +1706,7 @@ Logging_frame->resizable(NFtabs);
|
|||
log_cqss_frame->end();
|
||||
log_cqss_frame->hide();
|
||||
log_cqss_frame->resizable(lss_box);
|
||||
// end LOG CWSS - partial
|
||||
// end LOG cwsS - partial
|
||||
|
||||
// LOG_CQWPX - partial
|
||||
log_cqwpx_frame = new Fl_Group(
|
||||
|
|
@ -2371,7 +2362,7 @@ Logging_frame->resizable(NFtabs);
|
|||
macroFrame2->resizable(mf_group2);
|
||||
macroFrame2->end();
|
||||
|
||||
Y += Hmacros;
|
||||
Y += macroFrame2->h(); //Hmacros;
|
||||
}
|
||||
{ // Center group Rx/Tx/Raster displays
|
||||
center_group = new Fl_Group(0, Y, W, Htext);
|
||||
|
|
@ -3017,8 +3008,92 @@ Logging_frame->resizable(NFtabs);
|
|||
status_group->end();
|
||||
status_group->resizable(VuMeter);
|
||||
|
||||
Y += status_group->h();
|
||||
}
|
||||
|
||||
{ // CW settings group
|
||||
|
||||
Y += status_group->h();
|
||||
|
||||
cws_group = new Fl_Group(0, Y, W, Hcws_group, "");
|
||||
cws_group->box(FL_DOWN_BOX);
|
||||
cws_group->align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE);
|
||||
|
||||
cntcwsrange = new Fl_Counter2(5, cws_group->y() + 1, 80, 20);
|
||||
cntcwsrange->tooltip(gettext("Range +/- wpm"));
|
||||
cntcwsrange->type(1);
|
||||
cntcwsrange->box(FL_UP_BOX);
|
||||
cntcwsrange->color(FL_BACKGROUND_COLOR);
|
||||
cntcwsrange->selection_color(FL_INACTIVE_COLOR);
|
||||
cntcwsrange->labeltype(FL_NORMAL_LABEL);
|
||||
cntcwsrange->labelfont(0);
|
||||
cntcwsrange->labelsize(14);
|
||||
cntcwsrange->labelcolor(FL_FOREGROUND_COLOR);
|
||||
cntcwsrange->minimum(5);
|
||||
cntcwsrange->maximum(25);
|
||||
cntcwsrange->step(1);
|
||||
cntcwsrange->value(10);
|
||||
cntcwsrange->callback((Fl_Callback*)cb_cntcwsrange);
|
||||
cntcwsrange->align(Fl_Align(FL_ALIGN_TOP));
|
||||
cntcwsrange->when(FL_WHEN_CHANGED);
|
||||
cntcwsrange->value(progdefaults.CWrange);
|
||||
cntcwsrange->labelsize(FL_NORMAL_SIZE);
|
||||
|
||||
btncwsrcvTrack = new Fl_Check_Button(90, cws_group->y() + 1, 20, 20, gettext("Track WPM"));
|
||||
btncwsrcvTrack->tooltip(gettext("Automatic Rx speed tracking"));
|
||||
btncwsrcvTrack->down_box(FL_DOWN_BOX);
|
||||
btncwsrcvTrack->value(1);
|
||||
btncwsrcvTrack->callback((Fl_Callback*)cb_btncwsrcvTrack);
|
||||
btncwsrcvTrack->align(Fl_Align(FL_ALIGN_RIGHT));
|
||||
btncwsrcvTrack->value(progdefaults.CWtrack);
|
||||
|
||||
btncwsuseSOMdecoding = new Fl_Check_Button(216, cws_group->y() + 1, 120, 20, gettext("SOM decode"));
|
||||
btncwsuseSOMdecoding->tooltip(gettext("Self Organizing Map Decoder"));
|
||||
btncwsuseSOMdecoding->down_box(FL_DOWN_BOX);
|
||||
btncwsuseSOMdecoding->value(1);
|
||||
btncwsuseSOMdecoding->callback((Fl_Callback*)cb_btncwsuseSOMdecoding);
|
||||
btncwsuseSOMdecoding->value(progdefaults.CWuseSOMdecoding);
|
||||
|
||||
btncwsmfilt = new Fl_Check_Button(345, cws_group->y() + 1, 120, 20, gettext("Matched Filter"));
|
||||
btncwsmfilt->tooltip(gettext("Matched Filter bandwidth"));
|
||||
btncwsmfilt->down_box(FL_DOWN_BOX);
|
||||
btncwsmfilt->value(1);
|
||||
btncwsmfilt->callback((Fl_Callback*)cb_btncwsmfilt);
|
||||
btncwsmfilt->value(progdefaults.CWmfilt);
|
||||
|
||||
cntcwsbandwidth = new Fl_Counter2(470, cws_group->y() + 1, 120, 20);
|
||||
cntcwsbandwidth->tooltip(gettext("Filter bandwidth"));
|
||||
cntcwsbandwidth->box(FL_UP_BOX);
|
||||
cntcwsbandwidth->color(FL_BACKGROUND_COLOR);
|
||||
cntcwsbandwidth->selection_color(FL_INACTIVE_COLOR);
|
||||
cntcwsbandwidth->labeltype(FL_NORMAL_LABEL);
|
||||
cntcwsbandwidth->labelfont(0);
|
||||
cntcwsbandwidth->labelsize(14);
|
||||
cntcwsbandwidth->labelcolor(FL_FOREGROUND_COLOR);
|
||||
cntcwsbandwidth->minimum(10);
|
||||
cntcwsbandwidth->maximum(800);
|
||||
cntcwsbandwidth->step(5);
|
||||
cntcwsbandwidth->value(200);
|
||||
cntcwsbandwidth->callback((Fl_Callback*)cb_cntcwsbandwidth);
|
||||
cntcwsbandwidth->align(Fl_Align(FL_ALIGN_TOP));
|
||||
cntcwsbandwidth->when(FL_WHEN_CHANGED);
|
||||
cntcwsbandwidth->value(progdefaults.CWbandwidth);
|
||||
cntcwsbandwidth->labelsize(FL_NORMAL_SIZE);
|
||||
cntcwsbandwidth->lstep(50);
|
||||
|
||||
mnu_cws_fillen = new Fl_Choice(600, cws_group->y() + 1, 72, 20, gettext("Fil\' Len\'"));
|
||||
mnu_cws_fillen->tooltip(gettext("Filter length in samples"));
|
||||
mnu_cws_fillen->down_box(FL_BORDER_BOX);
|
||||
mnu_cws_fillen->callback((Fl_Callback*)cb_mnu_cws_fillen);
|
||||
mnu_cws_fillen->align(Fl_Align(FL_ALIGN_RIGHT));
|
||||
mnu_cws_fillen->add("128|256|512|1024");
|
||||
mnu_cws_fillen->value(progdefaults.CW_fillen);
|
||||
|
||||
cws_group->end();
|
||||
// cws_group->hide();
|
||||
// cws_group->resize(0, Y, W, 0);
|
||||
Y += cws_group->h();
|
||||
}
|
||||
|
||||
{ // adjust callbacks
|
||||
showMacroSet();
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// generated by Fast Light User Interface Designer (fluid) version 1.0310
|
||||
// generated by Fast Light User Interface Designer (fluid) version 1.0403
|
||||
|
||||
#include "arqdialogs.h"
|
||||
#include <config.h>
|
||||
|
|
@ -122,7 +122,7 @@ static void cb_btnSendTalk(Fl_Button*, void*) {
|
|||
Fl_Double_Window* arq_dialog() {
|
||||
Fl_Double_Window* w;
|
||||
{ Fl_Double_Window* o = new Fl_Double_Window(515, 415, "flarq");
|
||||
w = o; if (w) {/* empty */}
|
||||
w = o; (void)w;
|
||||
o->color(FL_LIGHT1);
|
||||
o->callback((Fl_Callback*)cb_flarq);
|
||||
{ mnu = new Fl_Menu_Bar(0, 0, 516, 22);
|
||||
|
|
@ -309,49 +309,49 @@ Fl_Spinner2 *spnRetries=(Fl_Spinner2 *)0;
|
|||
|
||||
static void cb_spnRetries(Fl_Spinner2* o, void*) {
|
||||
iretries = (int)o->value();
|
||||
cbSetConfig();
|
||||
cbSetConfig();
|
||||
}
|
||||
|
||||
Fl_Spinner2 *spnWaitTime=(Fl_Spinner2 *)0;
|
||||
|
||||
static void cb_spnWaitTime(Fl_Spinner2* o, void*) {
|
||||
iwaittime = (int)(1000 * o->value());
|
||||
cbSetConfig();
|
||||
cbSetConfig();
|
||||
}
|
||||
|
||||
Fl_Spinner2 *spnTimeout=(Fl_Spinner2 *)0;
|
||||
|
||||
static void cb_spnTimeout(Fl_Spinner2* o, void*) {
|
||||
itimeout = (int)(o->value() * 1000.0);
|
||||
cbSetConfig();
|
||||
cbSetConfig();
|
||||
}
|
||||
|
||||
Fl_Spinner2 *spnTxDelay=(Fl_Spinner2 *)0;
|
||||
|
||||
static void cb_spnTxDelay(Fl_Spinner2* o, void*) {
|
||||
txdelay = (int)o->value();
|
||||
cbSetConfig();
|
||||
cbSetConfig();
|
||||
}
|
||||
|
||||
Fl_Spinner2 *spnBcnInterval=(Fl_Spinner2 *)0;
|
||||
|
||||
static void cb_spnBcnInterval(Fl_Spinner2* o, void*) {
|
||||
bcnInterval = (int)o->value();
|
||||
cbSetConfig();
|
||||
cbSetConfig();
|
||||
}
|
||||
|
||||
Fl_Spinner2 *spnIDtimer=(Fl_Spinner2 *)0;
|
||||
|
||||
static void cb_spnIDtimer(Fl_Spinner2* o, void*) {
|
||||
idtimer = (int)(o->value());
|
||||
cb_idtimer();
|
||||
cb_idtimer();
|
||||
}
|
||||
|
||||
Fl_ComboBox *choiceBlockSize=(Fl_ComboBox *)0;
|
||||
|
||||
static void cb_choiceBlockSize(Fl_ComboBox* o, void*) {
|
||||
exponent = (int)o->index() + 4;
|
||||
cbSetConfig();
|
||||
cbSetConfig();
|
||||
}
|
||||
|
||||
Fl_Button *btnOK=(Fl_Button *)0;
|
||||
|
|
@ -364,13 +364,13 @@ Fl_Check_Button *btn_restart_beacon=(Fl_Check_Button *)0;
|
|||
|
||||
static void cb_btn_restart_beacon(Fl_Check_Button* o, void*) {
|
||||
restart_beacon = (int)(o->value());
|
||||
cbSetConfig();
|
||||
cbSetConfig();
|
||||
}
|
||||
|
||||
Fl_Double_Window* arq_configure() {
|
||||
Fl_Double_Window* w;
|
||||
{ Fl_Double_Window* o = new Fl_Double_Window(480, 190, "Configure flarq");
|
||||
w = o; if (w) {/* empty */}
|
||||
w = o; (void)w;
|
||||
{ Fl_Input2* o = txtMyCall = new Fl_Input2(98, 13, 150, 22, "My Call:");
|
||||
txtMyCall->box(FL_DOWN_BOX);
|
||||
txtMyCall->color(FL_BACKGROUND2_COLOR);
|
||||
|
|
@ -549,7 +549,7 @@ static void cb_send_OK(Fl_Return_Button*, void*) {
|
|||
Fl_Double_Window* arq_SendSelect() {
|
||||
Fl_Double_Window* w;
|
||||
{ Fl_Double_Window* o = new Fl_Double_Window(500, 170, "Select Email");
|
||||
w = o; if (w) {/* empty */}
|
||||
w = o; (void)w;
|
||||
{ tblOutgoing = new Table(0, 3, 500, 140);
|
||||
tblOutgoing->box(FL_DOWN_BOX);
|
||||
tblOutgoing->color(FL_BACKGROUND2_COLOR);
|
||||
|
|
@ -568,8 +568,8 @@ Fl_Double_Window* arq_SendSelect() {
|
|||
send_OK->callback((Fl_Callback*)cb_send_OK);
|
||||
} // Fl_Return_Button* send_OK
|
||||
o->set_modal();
|
||||
o->end();
|
||||
o->resizable(o);
|
||||
o->end();
|
||||
} // Fl_Double_Window* o
|
||||
return w;
|
||||
}
|
||||
|
|
@ -615,7 +615,7 @@ static void cb_btnSaveComposedMail(Fl_Button*, void*) {
|
|||
Fl_Double_Window* arq_composer() {
|
||||
Fl_Double_Window* w;
|
||||
{ Fl_Double_Window* o = new Fl_Double_Window(515, 300, "Flarq Mail Composer");
|
||||
w = o; if (w) {/* empty */}
|
||||
w = o; (void)w;
|
||||
{ inpMailFrom = new Fl_Input2(47, 5, 460, 24, "From");
|
||||
inpMailFrom->box(FL_DOWN_BOX);
|
||||
inpMailFrom->color(FL_BACKGROUND2_COLOR);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// generated by Fast Light User Interface Designer (fluid) version 1.0310
|
||||
// generated by Fast Light User Interface Designer (fluid) version 1.0403
|
||||
|
||||
#ifndef arqdialogs_h
|
||||
#define arqdialogs_h
|
||||
|
|
|
|||
|
|
@ -322,19 +322,19 @@ extern Fl_Check_Button *btn_softRTTY;
|
|||
extern Fl_Check_Button *btn_softTHOR;
|
||||
extern Fl_Check_Button *btn_softDOMINOEX;
|
||||
extern Fl_Check_Button *btnCWuseSOMdecoding;
|
||||
extern Fl_Check_Button *btnCWrcvTrack;
|
||||
extern Fl_Value_Slider2 *sldrCWbandwidth;
|
||||
extern Fl_Check_Button *btnCWmfilt;
|
||||
#include <FL/Fl_Value_Output.H>
|
||||
extern Fl_Value_Output *valCWrcvWPM;
|
||||
extern Fl_Progress *prgsCWrcvWPM;
|
||||
extern Fl_Counter2 *cntLower;
|
||||
extern Fl_Counter2 *cntUpper;
|
||||
extern Fl_Check_Button *btnCWrcvTrack;
|
||||
extern Fl_Counter2 *cntCWrange;
|
||||
#include <FL/Fl_Choice.H>
|
||||
extern Fl_Choice *mnu_cwrx_attack;
|
||||
extern Fl_Choice *mnu_cwrx_decay;
|
||||
extern Fl_Button *btn_cw_tracking_defaults;
|
||||
extern Fl_Check_Button *btnCWmfilt;
|
||||
extern Fl_Counter2 *cntCWbandwidth;
|
||||
extern Fl_Choice *mnu_CW_fillen;
|
||||
extern Fl_Check_Button *btn_show_embedded_CW_controls;
|
||||
extern Fl_Value_Slider2 *sldrCWxmtWPM;
|
||||
extern Fl_Counter2 *cntCWdefWPM;
|
||||
extern Fl_Counter *cntCWlowerlimit;
|
||||
|
|
@ -346,6 +346,7 @@ extern Fl_Check_Button *btnCWusewordsworth;
|
|||
extern Fl_Counter2 *cntCWdash2dot;
|
||||
extern Fl_Counter2 *cntCWrisetime;
|
||||
extern Fl_ListBox *i_listboxQSKshape;
|
||||
extern Fl_Counter2 *cntWeight;
|
||||
extern Fl_Check_Button *btnQSK;
|
||||
extern Fl_Counter2 *cntQSKfrequency;
|
||||
extern Fl_Counter2 *cntPreTiming;
|
||||
|
|
@ -869,9 +870,12 @@ extern Fl_Check_Button *chkRigCatVSP;
|
|||
extern Fl_Value_Input2 *cntRigCatInitDelay;
|
||||
extern Fl_Group *grpRigGPIO;
|
||||
extern Fl_Check_Button *btn_gpio_ptt2;
|
||||
extern Fl_Check_Button *btn_gpio_CW;
|
||||
extern Fl_Button *btnInitHWPTT2;
|
||||
extern Fl_Check_Button *btn_enable_gpio[17];
|
||||
extern Fl_Check_Button *btn_gpio_on[17];
|
||||
extern Fl_Check_Button *btn_gpio_cw_on[17];
|
||||
extern Fl_Check_Button *btn_enable_gpio_cw[17];
|
||||
extern Fl_Counter *cnt_gpio_pulse_width;
|
||||
extern Fl_Group *grpRigHamlib;
|
||||
extern Fl_Check_Button *chkUSEHAMLIB;
|
||||
|
|
|
|||
|
|
@ -564,6 +564,9 @@
|
|||
ELEM_(int, CWbandwidth, "CWBANDWIDTH", \
|
||||
"Filter bandwidth (Hz)", \
|
||||
150) \
|
||||
ELEM_(int, CW_fillen, "CWFILLEN", \
|
||||
"CW FIR receive filter length in samples; 0=128, 1=256, 2=512, 3=1024", \
|
||||
2) \
|
||||
ELEM_(double, CWlower, "CWLOWER", \
|
||||
"Detector hysterisis, lower threshold", \
|
||||
0.4) \
|
||||
|
|
@ -602,6 +605,12 @@
|
|||
ELEM_(double, CWdash2dot, "CWDASH2DOT", \
|
||||
"Dash to dot ratio", \
|
||||
3.0) \
|
||||
ELEM_(double, CWweight, "CWWEIGHT", \
|
||||
"Add 'weight' to CW elements", \
|
||||
0.0) \
|
||||
ELEM_(bool, show_CW_controls, "SHOWCWCONTROLS", \
|
||||
"Show additional control bar for CW, at bottom of main dialog", \
|
||||
true) \
|
||||
ELEM_(bool, QSK, "QSK", \
|
||||
"Generate QSK signal on right audio channel", \
|
||||
false) \
|
||||
|
|
@ -1504,6 +1513,7 @@
|
|||
"Use parallel port PTT", \
|
||||
false) \
|
||||
/* GPIO parameters */ \
|
||||
/* PTT parameters */ \
|
||||
ELEM_(bool, gpio_ptt, "USE_GPIO_PTT", \
|
||||
"use GPIO for ptt (pi3/4)", \
|
||||
false) \
|
||||
|
|
@ -1518,6 +1528,18 @@
|
|||
ELEM_(int, gpio_pulse_width, "GPIO_PULSE_WIDTH", \
|
||||
"GPIO pulse width setting for PiHpSDR PTT", \
|
||||
0) \
|
||||
/* CW parameters */ \
|
||||
ELEM_(bool, gpio_cw, "USE_GPIO_CW", \
|
||||
"CW signal on GPIO pin", \
|
||||
false) \
|
||||
ELEM_(long, enable_gpio_cw, "ENABLE_GPIO_CW", \
|
||||
"GPIO enable cw on\n" \
|
||||
"bits 0 - 16; bit 0 : gpio pin N", \
|
||||
0) \
|
||||
ELEM_(long, gpio_cw_on, "GPIO_CW_STATE", \
|
||||
"GPIO CW State\n" \
|
||||
"bits 0 - 16; bit 0 : PTT ON state on pin N", \
|
||||
0) \
|
||||
/* cmedia parameters */ \
|
||||
ELEM_(std::string, cmedia_device, "CMEDIA_DEVICE", \
|
||||
"DRA-xx device name", \
|
||||
|
|
|
|||
|
|
@ -44,10 +44,6 @@
|
|||
|
||||
#define MAX_MORSE_ELEMENTS 6 // maximum of 6 elements in a Morse character 256
|
||||
|
||||
// CW function return status codes.
|
||||
#define CW_SUCCESS 0
|
||||
#define CW_ERROR -1
|
||||
|
||||
#define ASC_NUL '\0' // End of string
|
||||
#define ASC_SPACE ' ' // ASCII space char
|
||||
|
||||
|
|
@ -110,7 +106,7 @@ protected:
|
|||
double upper_threshold;
|
||||
double lower_threshold;
|
||||
|
||||
fftfilt *cw_FFT_filter; // sinc / matched filter
|
||||
C_FIR_filter *cw_filter; // decimate in time Finite Impulse Response (FIR) filters
|
||||
|
||||
Cmovavg *bitfilter;
|
||||
Cmovavg *trackingfilter;
|
||||
|
|
@ -182,7 +178,7 @@ protected:
|
|||
void update_Status();
|
||||
void sync_parameters();
|
||||
void reset_rx_filter();
|
||||
int handle_event(int cw_event, std::string &sc);
|
||||
void handle_event(int cw_event, std::string &sc);
|
||||
inline int usec_diff(unsigned int earlier, unsigned int later);
|
||||
void send_symbol(int symbol, int len, int state);
|
||||
void send_ch(int c);
|
||||
|
|
@ -223,6 +219,7 @@ protected:
|
|||
void flush_audio();
|
||||
|
||||
void send_CW(int);
|
||||
void send_gpio_CW(int c);
|
||||
|
||||
view_cw viewcw;
|
||||
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@
|
|||
#include <FL/Fl_Browser.H>
|
||||
#include <FL/Fl_Pack.H>
|
||||
#include <FL/Fl_Menu_Bar.H>
|
||||
#include <FL/Fl_Choice.H>
|
||||
#include <string>
|
||||
|
||||
#include "combo.h"
|
||||
|
|
@ -70,6 +71,7 @@ extern Fl_Double_Window *notify_window;
|
|||
extern Fl_Double_Window *dxcc_window;
|
||||
extern Fl_Double_Window *dxcluster_viewer;
|
||||
extern Fl_Double_Window *rxaudio_dialog;
|
||||
extern Fl_Double_Window *cwsettings;
|
||||
|
||||
extern Fl_Menu_Item menu_[];
|
||||
extern int main_menu_size;
|
||||
|
|
@ -771,6 +773,21 @@ extern Fl_Input2 *inpSQSO_category;
|
|||
extern Fl_Input2 *inpSQSO_category1;
|
||||
extern Fl_Input2 *inpSQSO_category2;
|
||||
|
||||
// cwsettings
|
||||
extern Fl_Check_Button *btncwsrcvTrack;
|
||||
extern Fl_Counter2 *cntcwsrange;
|
||||
extern Fl_Check_Button *btncwsuseSOMdecoding;
|
||||
extern Fl_Check_Button *btncwsmfilt;
|
||||
extern Fl_Counter2 *cntcwsbandwidth;
|
||||
extern Fl_Choice *mnu_cws_fillen;
|
||||
|
||||
extern void cb_btncwsrcvTrack(Fl_Check_Button*, void*);
|
||||
extern void cb_cntcwsrange(Fl_Counter2*, void*);
|
||||
extern void cb_btncwsuseSOMdecoding(Fl_Check_Button*, void*);
|
||||
extern void cb_btncwsmfilt(Fl_Check_Button*, void*);
|
||||
extern void cb_cntcwsbandwidth(Fl_Counter2*, void*);
|
||||
extern void cb_mnu_cws_fillen(Fl_Choice*, void*);
|
||||
|
||||
extern Fl_Double_Window *nano_calibration_dialog();;
|
||||
|
||||
// TOD clock
|
||||
|
|
|
|||
|
|
@ -605,7 +605,7 @@ int configuration::setDefaults()
|
|||
|
||||
sldrCWxmtWPM->value(CWspeed);
|
||||
cntCWdefWPM->value(defCWspeed);
|
||||
sldrCWbandwidth->value(CWbandwidth);
|
||||
cntCWbandwidth->value(CWbandwidth);
|
||||
btnCWrcvTrack->value(CWtrack);
|
||||
cntCWrange->value(CWrange);
|
||||
cntCWlowerlimit->value(CWlowerlimit);
|
||||
|
|
|
|||
|
|
@ -856,16 +856,16 @@ public:
|
|||
|
||||
// =============================================================================
|
||||
|
||||
static Fl_Valuator* get_bw_val(void)
|
||||
static int get_bw_val(void)
|
||||
{
|
||||
if (!(active_modem->get_cap() & modem::CAP_BW))
|
||||
return 0;
|
||||
|
||||
trx_mode m = active_modem->get_mode();
|
||||
if (m >= MODE_HELL_FIRST && m <= MODE_HELL_LAST)
|
||||
return sldrHellBW;
|
||||
return sldrHellBW->value();
|
||||
else if (m == MODE_CW)
|
||||
return sldrCWbandwidth;
|
||||
return progdefaults.CWbandwidth;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -879,14 +879,11 @@ public:
|
|||
}
|
||||
void execute(const xmlrpc_c::paramList& params, xmlrpc_c::value* retval)
|
||||
{
|
||||
Fl_Valuator* val = get_bw_val();
|
||||
int val = get_bw_val();
|
||||
LOG_INFO("[%s] modem.get_bw: %d",
|
||||
XmlRpc::client_id.c_str(),
|
||||
int(get_bw_val()->value()));
|
||||
if (val)
|
||||
*retval = xmlrpc_c::value_int((int)get_bw_val()->value());
|
||||
else
|
||||
*retval = xmlrpc_c::value_int(0);
|
||||
val);
|
||||
*retval = val;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -901,7 +898,8 @@ public:
|
|||
void execute(const xmlrpc_c::paramList& params, xmlrpc_c::value* retval)
|
||||
{
|
||||
XMLRPC_LOCK;
|
||||
Fl_Valuator* val = get_bw_val();
|
||||
/*
|
||||
int val = get_bw_val();
|
||||
if (val) {
|
||||
int v = (int)(val->value());
|
||||
LOG_INFO("[%s] modem.set_bw: %d",
|
||||
|
|
@ -911,6 +909,7 @@ public:
|
|||
*retval = xmlrpc_c::value_int(v);
|
||||
} else
|
||||
*retval = xmlrpc_c::value_int(0);
|
||||
*/
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -925,6 +924,7 @@ public:
|
|||
void execute(const xmlrpc_c::paramList& params, xmlrpc_c::value* retval)
|
||||
{
|
||||
XMLRPC_LOCK;
|
||||
/*
|
||||
Fl_Valuator* val = get_bw_val();
|
||||
if (val) {
|
||||
int v = (int)(val->value() + params.getInt(0));
|
||||
|
|
@ -935,6 +935,7 @@ public:
|
|||
*retval = xmlrpc_c::value_int(v);
|
||||
} else
|
||||
*retval = xmlrpc_c::value_int(0);
|
||||
*/
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -228,7 +228,7 @@ void updateWPM(void *)
|
|||
|
||||
void flrig_get_wpm()
|
||||
{
|
||||
if (!connected_to_flrig) {
|
||||
if (!connected_to_flrig || !progdefaults.use_FLRIGkeying) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
|
|
|
|||
|
|
@ -350,14 +350,10 @@ double modem::get_txfreq(void) const
|
|||
|
||||
double modem::get_txfreq_woffset(void) const
|
||||
{
|
||||
if (mailserver && progdefaults.PSKmailSweetSpot)
|
||||
return (progdefaults.PSKsweetspot - progdefaults.TxOffset);
|
||||
if (get_mode() == MODE_FSQ) return (1500 - progdefaults.TxOffset);
|
||||
|
||||
if (test_signal_window && test_signal_window->visible() && btnOffsetOn->value())
|
||||
return tx_frequency + ctrl_freq_offset->value();
|
||||
|
||||
return (tx_frequency - progdefaults.TxOffset);
|
||||
double temp = tx_frequency;
|
||||
if (mailserver && progdefaults.PSKmailSweetSpot) temp = progdefaults.PSKsweetspot;
|
||||
if (get_mode() == MODE_FSQ) temp = 1500;
|
||||
return (temp - progdefaults.TxOffset);
|
||||
}
|
||||
|
||||
void modem::set_bandwidth(double bw)
|
||||
|
|
|
|||
|
|
@ -697,10 +697,10 @@ static int new_freq;
|
|||
|
||||
void trx_start_modem_loop()
|
||||
{
|
||||
double save_freq = active_modem->frequency;
|
||||
// double save_freq = active_modem->frequency;
|
||||
if (new_modem == active_modem) {
|
||||
if (new_freq) active_modem->set_freq(new_freq);
|
||||
if (progdefaults.retain_freq_lock) active_modem->tx_frequency = save_freq;
|
||||
// if (progdefaults.retain_freq_lock) active_modem->tx_frequency = save_freq;
|
||||
active_modem->restart();
|
||||
trx_state = STATE_RX;
|
||||
if (progdefaults.show_psm_btn &&
|
||||
|
|
@ -715,7 +715,7 @@ void trx_start_modem_loop()
|
|||
new_modem->init();
|
||||
active_modem = new_modem;
|
||||
if (new_freq) active_modem->set_freq(new_freq);
|
||||
if (progdefaults.retain_freq_lock) active_modem->tx_frequency = save_freq;
|
||||
// if (progdefaults.retain_freq_lock) active_modem->tx_frequency = save_freq;
|
||||
trx_state = STATE_RX;
|
||||
REQ(update_displays);
|
||||
|
||||
|
|
|
|||
|
|
@ -2525,75 +2525,75 @@ int WFdisp::handle(int event)
|
|||
|
||||
void waterfall::handle_mouse_wheel(int what, int d)
|
||||
{
|
||||
if (d == 0)
|
||||
if (what == WF_NOP)
|
||||
return;
|
||||
|
||||
Fl_Valuator *val = 0;
|
||||
const char* msg_fmt = 0, *msg_label = 0;
|
||||
int val;
|
||||
char msg[200];
|
||||
|
||||
switch (what) {
|
||||
case WF_NOP:
|
||||
return;
|
||||
case WF_AFC_BW:
|
||||
{
|
||||
if (what == WF_AFC_BW) {
|
||||
if (active_modem) {
|
||||
trx_mode m = active_modem->get_mode();
|
||||
if (m >= MODE_PSK_FIRST && m <= MODE_PSK_LAST) {
|
||||
val = mailserver ? cntServerOffset : cntSearchRange;
|
||||
msg_label = "Srch Rng";
|
||||
snprintf(msg, sizeof(msg), "Srch Rng: %3.0f Hz",
|
||||
mailserver ? cntServerOffset->value() : cntSearchRange->value());
|
||||
}
|
||||
else if (m >= MODE_HELL_FIRST && m <= MODE_HELL_LAST) {
|
||||
val = sldrHellBW;
|
||||
msg_label = "BW";
|
||||
snprintf(msg, sizeof(msg), "BW: %3.0f Hz", sldrHellBW->value());
|
||||
}
|
||||
else if (m == MODE_CW) {
|
||||
val = sldrCWbandwidth;
|
||||
msg_label = "BW";
|
||||
if (d > 0) progdefaults.CWbandwidth += 10;
|
||||
if (d < 0) progdefaults.CWbandwidth -= 10;
|
||||
if (progdefaults.CWbandwidth < 10) progdefaults.CWbandwidth = 10;
|
||||
if (progdefaults.CWbandwidth > 800) progdefaults.CWbandwidth = 800;
|
||||
snprintf(msg, sizeof(msg), "BW: %d Hz", progdefaults.CWbandwidth);
|
||||
}
|
||||
else
|
||||
return;
|
||||
msg_fmt = "%s: %2.0f Hz";
|
||||
put_status(msg, 5.0);
|
||||
}
|
||||
break;
|
||||
return;
|
||||
}
|
||||
case WF_SIGNAL_SEARCH:
|
||||
|
||||
if (what == WF_SIGNAL_SEARCH) {
|
||||
if (d > 0) {
|
||||
if (active_modem) active_modem->searchDown();
|
||||
} else {
|
||||
if (active_modem) active_modem->searchUp();
|
||||
}
|
||||
return;\
|
||||
}
|
||||
|
||||
if (what == WF_SQUELCH) {
|
||||
val = sldrSquelch->value();
|
||||
if (d > 0 ) val++;
|
||||
else val--;
|
||||
if (val < 0) val = 0;
|
||||
if (val > 100) val = 100;
|
||||
snprintf(msg, sizeof(msg), "Squelch: %d", val);
|
||||
put_status(msg, 5.0);
|
||||
sldrSquelch->value(val);
|
||||
return;
|
||||
case WF_SQUELCH:
|
||||
val = sldrSquelch;
|
||||
d = -d;
|
||||
msg_fmt = "%s = %2.0f %%";
|
||||
msg_label = "Squelch";
|
||||
break;
|
||||
case WF_CARRIER:
|
||||
val = wfcarrier;
|
||||
break;
|
||||
case WF_MODEM:
|
||||
}
|
||||
|
||||
if (what == WF_CARRIER) {
|
||||
val = wfcarrier->value();
|
||||
if (d > 0) val++;
|
||||
else val--;
|
||||
carrier(val);
|
||||
return;
|
||||
}
|
||||
|
||||
if (what == WF_MODEM) {
|
||||
init_modem(d > 0 ? MODE_NEXT : MODE_PREV);
|
||||
return;
|
||||
case WF_SCROLL:
|
||||
}
|
||||
|
||||
if (what == WF_SCROLL) {
|
||||
(d > 0 ? right : left)->do_callback();
|
||||
return;
|
||||
}
|
||||
|
||||
val->value(val->clamp(val->increment(val->value(), -d)));
|
||||
bool changed_save = progdefaults.changed;
|
||||
val->do_callback();
|
||||
progdefaults.changed = changed_save;
|
||||
if (val == cntServerOffset || val == cntSearchRange) {
|
||||
if (active_modem) active_modem->set_sigsearch(SIGSEARCH);
|
||||
} else if (val == sldrSquelch) { // sldrSquelch gives focus to TransmitText
|
||||
take_focus();
|
||||
}
|
||||
if (msg_fmt) {
|
||||
char msg[60];
|
||||
snprintf(msg, sizeof(msg), msg_fmt, msg_label, val->value());
|
||||
put_status(msg, 2.0);
|
||||
}
|
||||
}
|
||||
|
||||
const char* waterfall::wf_wheel_action[] = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue