Upstream version 3.04AN

pull/2/head
Stelios Bounanos 2008-10-16 11:11:28 +01:00
rodzic 4709ddb4c3
commit 096e1eb1b5
11 zmienionych plików z 148 dodań i 79 usunięć

Wyświetl plik

@ -60,6 +60,9 @@ Change Log:
<RX><TIMER>20
will generate 5 seconds of idle, the text, and repeat after 20 sec's.
23) Added new configuration options to set the waterfall width and height
These and the docked digiscope configuration option require a program
restart to take effect.
3.03
1) Changes to socket server to correct shutdown process

Wyświetl plik

@ -9,7 +9,7 @@ dnl major and minor must be integers; patch may
dnl contain other characters or be empty
m4_define(FLDIGI_MAJOR, [3])
m4_define(FLDIGI_MINOR, [0])
m4_define(FLDIGI_PATCH, [4AM])
m4_define(FLDIGI_PATCH, [4AN])
AC_INIT([fldigi], FLDIGI_MAJOR.FLDIGI_MINOR[FLDIGI_PATCH], [w1hkj AT w1hkj DOT com])

Wyświetl plik

@ -889,6 +889,29 @@ static void cb_btnDisplayMacroFilename(Fl_Check_Button* o, void*) {
progdefaults.changed = true;
}
Fl_Group *tabMainWindow=(Fl_Group *)0;
Fl_Counter *cntrWfwidth=(Fl_Counter *)0;
static void cb_cntrWfwidth(Fl_Counter* o, void*) {
progdefaults.wfwidth = (int)(o->value());
progdefaults.changed = true;
}
Fl_Counter *cntrWfheight=(Fl_Counter *)0;
static void cb_cntrWfheight(Fl_Counter* o, void*) {
progdefaults.wfheight = (int)o->value();
progdefaults.changed = true;
}
Fl_Check_Button *btnDockedScope=(Fl_Check_Button *)0;
static void cb_btnDockedScope(Fl_Check_Button* o, void*) {
progdefaults.docked_scope = o->value();
progdefaults.changed = true;
}
Fl_Group *tabRSid=(Fl_Group *)0;
Fl_Check_Button *chkTransmitRSid=(Fl_Check_Button *)0;
@ -935,15 +958,6 @@ static void cb_btnStartAtSweetSpot(Fl_Check_Button* o, void*) {
progdefaults.changed = true;
}
Fl_Group *tabMainWindow=(Fl_Group *)0;
Fl_Check_Button *btnDockedScope=(Fl_Check_Button *)0;
static void cb_btnDockedScope(Fl_Check_Button* o, void*) {
progdefaults.docked_scope = o->value();
progdefaults.changed = true;
}
Fl_Group *tabModems=(Fl_Group *)0;
Fl_Tabs *tabsModems=(Fl_Tabs *)0;
@ -2213,6 +2227,43 @@ l with your sound hardware.");
} // Fl_Group* o
tabMacros->end();
} // Fl_Group* tabMacros
{ tabMainWindow = new Fl_Group(0, 50, 400, 170, "Main window");
tabMainWindow->hide();
{ Fl_Group* o = new Fl_Group(5, 60, 390, 125, "Changes take effect on startup");
o->box(FL_ENGRAVED_FRAME);
o->align(FL_ALIGN_TOP|FL_ALIGN_INSIDE);
{ Fl_Counter* o = cntrWfwidth = new Fl_Counter(30, 92, 95, 21, "Waterfall width in Hz");
cntrWfwidth->tooltip("Wider ==> higher cpu usage");
cntrWfwidth->type(1);
cntrWfwidth->minimum(2400);
cntrWfwidth->maximum(4000);
cntrWfwidth->step(100);
cntrWfwidth->value(3000);
cntrWfwidth->callback((Fl_Callback*)cb_cntrWfwidth);
cntrWfwidth->align(FL_ALIGN_RIGHT);
o->value(progdefaults.wfwidth);
} // Fl_Counter* cntrWfwidth
{ Fl_Counter* o = cntrWfheight = new Fl_Counter(30, 121, 95, 21, "Waterfall height in pixels");
cntrWfheight->tooltip("Taller ==> higher cpu usage");
cntrWfheight->type(1);
cntrWfheight->minimum(100);
cntrWfheight->maximum(160);
cntrWfheight->step(5);
cntrWfheight->value(120);
cntrWfheight->callback((Fl_Callback*)cb_cntrWfheight);
cntrWfheight->align(FL_ALIGN_RIGHT);
o->value(progdefaults.wfheight);
} // Fl_Counter* cntrWfheight
{ btnDockedScope = new Fl_Check_Button(30, 150, 125, 20, "Docked scope");
btnDockedScope->tooltip("Restart fldigi for this option to take effect");
btnDockedScope->down_box(FL_DOWN_BOX);
btnDockedScope->callback((Fl_Callback*)cb_btnDockedScope);
btnDockedScope->value(progdefaults.docked_scope);
} // Fl_Check_Button* btnDockedScope
o->end();
} // Fl_Group* o
tabMainWindow->end();
} // Fl_Group* tabMainWindow
{ tabRSid = new Fl_Group(0, 50, 400, 170, "RSid");
tabRSid->hide();
{ Fl_Group* o = new Fl_Group(5, 65, 390, 45);
@ -2272,20 +2323,6 @@ l with your sound hardware.");
} // Fl_Group* o
tabSweetSpot->end();
} // Fl_Group* tabSweetSpot
{ tabMainWindow = new Fl_Group(0, 50, 400, 170, "Main window");
tabMainWindow->hide();
{ Fl_Group* o = new Fl_Group(5, 60, 390, 75);
o->box(FL_ENGRAVED_FRAME);
{ btnDockedScope = new Fl_Check_Button(30, 84, 125, 20, "Docked scope");
btnDockedScope->tooltip("Restart fldigi for this option to take effect");
btnDockedScope->down_box(FL_DOWN_BOX);
btnDockedScope->callback((Fl_Callback*)cb_btnDockedScope);
btnDockedScope->value(progdefaults.docked_scope);
} // Fl_Check_Button* btnDockedScope
o->end();
} // Fl_Group* o
tabMainWindow->end();
} // Fl_Group* tabMainWindow
tabsMisc->end();
} // Fl_Tabs* tabsMisc
tabMisc->end();

Wyświetl plik

@ -48,7 +48,7 @@ static const char szBaudRates[] = "300|600|1200|2400|4800|9600|19200|38400|57600
} {
Fl_Group tabOperator {
label Oper
callback {progdefaults.changed = true;} open selected
callback {progdefaults.changed = true;} open
xywh {0 25 400 195} color 51 selection_color 51 when 1
} {
Fl_Input inpMyCallsign {
@ -1078,6 +1078,37 @@ progdefaults.changed = true;}
}
}
}
Fl_Group tabMainWindow {
label {Main window} open
xywh {0 50 400 170} hide
} {
Fl_Group {} {
label {Changes take effect on startup} open
xywh {5 60 390 125} box ENGRAVED_FRAME align 17
} {
Fl_Counter cntrWfwidth {
label {Waterfall width in Hz}
callback {progdefaults.wfwidth = (int)(o->value());
progdefaults.changed = true;}
tooltip {Wider ==> higher cpu usage} xywh {30 92 95 21} type Simple align 8 minimum 2400 maximum 4000 step 100 value 3000
code0 {o->value(progdefaults.wfwidth);}
}
Fl_Counter cntrWfheight {
label {Waterfall height in pixels}
callback {progdefaults.wfheight = (int)o->value();
progdefaults.changed = true;} selected
tooltip {Taller ==> higher cpu usage} xywh {30 121 95 21} type Simple align 8 minimum 100 maximum 160 step 5 value 120
code0 {o->value(progdefaults.wfheight);}
}
Fl_Check_Button btnDockedScope {
label {Docked scope}
callback {progdefaults.docked_scope = o->value();
progdefaults.changed = true;}
tooltip {Restart fldigi for this option to take effect} xywh {30 150 125 20} down_box DOWN_BOX
code0 {btnDockedScope->value(progdefaults.docked_scope);}
}
}
}
Fl_Group tabRSid {
label RSid open
xywh {0 50 400 170} hide
@ -1138,22 +1169,6 @@ progdefaults.changed = true;}
}
}
}
Fl_Group tabMainWindow {
label {Main window} open
xywh {0 50 400 170} hide
} {
Fl_Group {} {open
xywh {5 60 390 75} box ENGRAVED_FRAME
} {
Fl_Check_Button btnDockedScope {
label {Docked scope}
callback {progdefaults.docked_scope = o->value();
progdefaults.changed = true;}
tooltip {Restart fldigi for this option to take effect} xywh {30 84 125 20} down_box DOWN_BOX
code0 {btnDockedScope->value(progdefaults.docked_scope);}
}
}
}
}
}
Fl_Group tabModems {

Wyświetl plik

@ -177,10 +177,11 @@ Fl_RGB_Image *feld_image = 0;
Pixmap fldigi_icon_pixmap;
#endif
int IMAGE_WIDTH = DEFAULT_IMAGE_WIDTH;
int Hwfall = DEFAULT_HWFALL;
int HNOM = DEFAULT_HNOM;
int WNOM = DEFAULT_WNOM;
int IMAGE_WIDTH;
int Hwfall;
int HNOM;
int WNOM;
int Wwfall;
bool clean_exit(void);
@ -1669,6 +1670,12 @@ void create_fl_digi_main() {
int pad = wSpace, Y = 0;
IMAGE_WIDTH = progdefaults.wfwidth;
Hwfall = progdefaults.wfheight;
Wwfall = DEFAULT_HNOM + 2 * BEZEL;
WNOM = Wwfall + 2 * DEFAULT_SW;
HNOM = DEFAULT_HNOM;
if (progdefaults.docked_scope)
WNOM -= 2*DEFAULT_SW;

Wyświetl plik

@ -176,7 +176,9 @@ If you will control the rig via a serial port, select the COM port you will use,
If in doubt, check both RTS and DTR. You MUST then press the <B>Initialize</B> button. \
<LI>If you plan to use CAT control of the rig via the COM port, check 'use rigCAT'. If in addition you wish to use \
PTT control via CAT, also then check 'rigCAT PTT'. You MUST then press the <B>Initialize</B> button. \
<LI>Use the menu <B>Configure/Defaults/Misc</B> item to set whether you wish to transmit RSID data at the start of each \
<LI>Use the menu <B>Configure/Defaults/Misc - Main Window tab</B> item to set the aspect ratio of the waterfall display and whether or not you want \
to dock a second digiscope to the main window.\
<LI>Use the menu <B>Configure/Defaults/Misc - RSID tab</B> item to set whether you wish to transmit RSID data at the start of each \
over (this is for the benefit of others, this setting does not affect RSID reception), and whether you have a slow computer (under 1000MHz) \
or not. The receiver decoding strategy uses less processor power in 'Slow cpu' mode. If you plan to regularly \
use the RSID feature on receive, you must leave the 'Start New Modem at Sweet Spot' item unchecked. \
@ -324,7 +326,7 @@ is a rather cool tool that allows you to monitor several PSK31 signals all at th
<A HREF=\"http://www.w1hkj.com/Fldigi.html\">Home Page</A>, and various information about the program.</DD> \
</DL>\
The two non-menu functions are:\
<DL><DT><B>RSID ?</B></DT>\
<DL><DT><B>RSID</B></DT>\
<DD>This button turns on the receive RSID (automatic mode detection and tuning) feature. When in use, the button turns yellow and no text reception is possible until \
a signal is identified, or the feature is turned off again. If you plan to use the RSID feature on receive, \
you must leave the 'Start New Modem at Sweet Spot' item in the Menu Configure/Defaults/Mics tab unchecked.</DD>\

Wyświetl plik

@ -127,6 +127,10 @@ extern Fl_Check_Button *chkSlowCpu;
extern Fl_Group *tabMacros;
extern Fl_Check_Button *btnUseLastMacro;
extern Fl_Check_Button *btnDisplayMacroFilename;
extern Fl_Group *tabMainWindow;
extern Fl_Counter *cntrWfwidth;
extern Fl_Counter *cntrWfheight;
extern Fl_Check_Button *btnDockedScope;
extern Fl_Group *tabRSid;
extern Fl_Check_Button *chkTransmitRSid;
extern Fl_Check_Button *chkRSidWideSearch;
@ -135,8 +139,6 @@ extern Fl_Value_Input *valCWsweetspot;
extern Fl_Value_Input *valRTTYsweetspot;
extern Fl_Value_Input *valPSKsweetspot;
extern Fl_Check_Button *btnStartAtSweetSpot;
extern Fl_Group *tabMainWindow;
extern Fl_Check_Button *btnDockedScope;
extern Fl_Group *tabModems;
extern Fl_Tabs *tabsModems;
extern Fl_Group *tabCW;

Wyświetl plik

@ -147,6 +147,8 @@
ELEM_(bool, ID_SMALL, "IDSMALL", true) \
ELEM_(bool, macrotextid, "", false) \
ELEM_(bool, docked_scope, "DOCKEDSCOPE", false) \
ELEM_(int, wfwidth, "WFWIDTH", 3000) \
ELEM_(int, wfheight, "WFHEIGHT", 125) \
/* QRZ */ \
ELEM_(int, QRZ, "QRZTYPE", 0) /* Not available */ \
ELEM_(std::string, QRZpathname, "QRZPATHNAME", "") \

Wyświetl plik

@ -75,7 +75,7 @@
//#define DEFAULT_HWFALL 144
#define DEFAULT_HWFALL 124
#define DEFAULT_HNOM 500
#define Wwfall (DEFAULT_HNOM + 2 * BEZEL)
//#define Wwfall (DEFAULT_HNOM + 2 * BEZEL)
#define DEFAULT_WNOM (Wwfall + 2* DEFAULT_SW)
//#define EMC_HWFALL 144
@ -86,6 +86,7 @@ extern int IMAGE_WIDTH;
extern int Hwfall;
extern int HNOM;
extern int WNOM;
extern int Wwfall;
#define Hmenu 22
#define Hqsoframe 48

Wyświetl plik

@ -394,15 +394,15 @@ void generate_option_help(void) {
<< " The default is: " << Fl::get_font(FL_HELVETICA)
<< ':' << FL_NORMAL_SIZE << "\n\n"
<< " --wfall-width WIDTH\n"
<< " WIDTH may be 2000 to 4000 in Hz, recommend 50 Hz increments.\n\n"
// << " --wfall-width WIDTH\n"
// << " WIDTH may be 2000 to 4000 in Hz, recommend 50 Hz increments.\n\n"
<< " --wfall-height HEIGHT\n"
<< " HEIGHT in pixels, ie 100 - 200, recommend 10 pixel increments.\n\n"
<< " --toggle-check-buttons\n"
<< " Use lighted or check buttons for AFC / SQL.\n";
// << " --wfall-height HEIGHT\n"
// << " HEIGHT in pixels, ie 100 - 200, recommend 10 pixel increments.\n\n"
// << " --toggle-check-buttons\n"
// << " Use lighted or check buttons for AFC / SQL.\n"
;
option_help = help.str();
}
@ -425,7 +425,7 @@ int parse_args(int argc, char **argv, int& idx)
OPT_CONFIG_XMLRPC_ADDRESS, OPT_CONFIG_XMLRPC_PORT,
OPT_CONFIG_XMLRPC_ALLOW, OPT_CONFIG_XMLRPC_DENY, OPT_CONFIG_XMLRPC_LIST,
#endif
OPT_FONT, OPT_WFALL_WIDTH, OPT_WFALL_HEIGHT,
OPT_FONT, OPT_WFALL_HEIGHT, OPT_WFALL_WIDTH,
OPT_WINDOW_WIDTH, OPT_WINDOW_HEIGHT,
OPT_TOGGLE_CHECK,
#if USE_PORTAUDIO
@ -551,11 +551,13 @@ int parse_args(int argc, char **argv, int& idx)
break;
case OPT_WFALL_WIDTH:
IMAGE_WIDTH = strtol(optarg, NULL, 10);
progdefaults.wfwidth = strtol(optarg, NULL, 10);
// IMAGE_WIDTH = strtol(optarg, NULL, 10);
break;
case OPT_WFALL_HEIGHT:
Hwfall = strtol(optarg, NULL, 10);
progdefaults.wfheight = strtol(optarg, NULL, 10);
// Hwfall = strtol(optarg, NULL, 10);
break;
case OPT_WINDOW_WIDTH:

Wyświetl plik

@ -167,14 +167,8 @@ public:
// 2) Define progdefaults, the configuration struct that is initialised with
// fldigi's default options
#define ELEM_PROGDEFAULTS(type_, var_, tag_, ...) __VA_ARGS__,
// 3) Define an array of tag element pointers, used to write progdefaults
#define ELEM_TAG_ARRAY(type_, var_, tag_, ...) new tag_elem<type_>(tag_, progdefaults.var_),
// 4) Populate a map with TAG-NAME -> TAG-ELEMENT-POINTER pairs, used
// to read progdefaults. We'll define that map right here:
typedef map<string, tag_base*> tag_map_t;
tag_map_t tag_map;
#define ELEM_TAG_MAP(type_, var_, tag_, ...) tag_map[tag_] = new tag_elem<type_>(tag_, progdefaults.var_);
// 3) Define an array of tag element pointers
#define ELEM_TAG_ARRAY(type_, var_, tag_, ...) (*tag_ ? new tag_elem<type_>(tag_, progdefaults.var_) : 0),
// First define the default config
#undef ELEM_
@ -205,9 +199,10 @@ void configuration::writeDefaultsXML()
// write all variables with non-empty tags to f
f << "<FLDIGI_DEFS>\n";
for (size_t i = 0; i < sizeof(tag_list)/sizeof(*tag_list); i++) {
if (likely(*tag_list[i]->tag))
if (tag_list[i]) {
tag_list[i]->write(f);
delete tag_list[i];
delete tag_list[i];
}
}
f << "</FLDIGI_DEFS>\n";
f.close();
@ -235,12 +230,16 @@ bool configuration::readDefaultsXML()
if (!xml)
return false;
// populate the map
#undef ELEM_
#define ELEM_ ELEM_TAG_MAP
CONFIG_LIST
// create a TAG_NAME -> ELEMENT map
typedef map<string, tag_base*> tag_map_t;
tag_map_t tag_map;
// parse the file until end reached
tag_base* tag_list[] = { CONFIG_LIST };
for (size_t i = 0; i < sizeof(tag_list)/sizeof(*tag_list); i++)
if (tag_list[i])
tag_map[tag_list[i]->tag] = tag_list[i];
// parse the xml buffer
tag_map_t::const_iterator i;
while(xml->read()) {
switch(xml->getNodeType()) {
@ -261,10 +260,9 @@ bool configuration::readDefaultsXML()
}
delete xml;
// delete the tag objects and empty the map
for (i = tag_map.begin(); i != tag_map.end(); ++i)
delete i->second;
tag_map.clear();
// delete the tag objects
for (size_t i = 0; i < sizeof(tag_list)/sizeof(*tag_list); i++)
delete tag_list[i];
return true;
}