kopia lustrzana https://github.com/jamescoxon/dl-fldigi
				
				
				
			Upstream version 3.04AT
							rodzic
							
								
									dfa8465b94
								
							
						
					
					
						commit
						9461dc6706
					
				|  | @ -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, [4AS]) | ||||
| m4_define(FLDIGI_PATCH, [4AT]) | ||||
| 
 | ||||
| AC_INIT([fldigi], FLDIGI_MAJOR.FLDIGI_MINOR[FLDIGI_PATCH], [w1hkj AT w1hkj DOT com]) | ||||
| 
 | ||||
|  |  | |||
|  | @ -7,6 +7,7 @@ | |||
| #include "combo.h" | ||||
| #include "colorsfonts.h" | ||||
| #include "waterfall.h" | ||||
| #include "rigxml.h" | ||||
| extern void initViewer(); | ||||
| Fl_Double_Window *dlgConfig;  | ||||
| 
 | ||||
|  | @ -436,6 +437,67 @@ o->value(1); | |||
| progdefaults.changed = true; | ||||
| } | ||||
| 
 | ||||
| Fl_Check_Button *chkUSERIGCAT=(Fl_Check_Button *)0; | ||||
| 
 | ||||
| static void cb_chkUSERIGCAT(Fl_Check_Button* o, void*) { | ||||
|   if (o->value() == 1) { | ||||
|   chkUSEHAMLIB->value(0); | ||||
|   chkUSEMEMMAP->value(0); | ||||
|   chkUSEXMLRPC->value(0); | ||||
|   btnPTT[1]->value(0); | ||||
|   btnPTT[1]->deactivate(); | ||||
|   btnPTT[2]->value(0); | ||||
|   btnPTT[2]->deactivate(); | ||||
|   btnPTT[3]->activate(); | ||||
|   cboHamlibRig->deactivate(); | ||||
|   inpRIGdev->deactivate(); | ||||
|   mnuBaudRate->deactivate(); | ||||
|   progdefaults.chkUSEMEMMAPis = false; | ||||
|   progdefaults.chkUSEHAMLIBis = false; | ||||
|   progdefaults.chkUSERIGCATis = true; | ||||
|   progdefaults.chkUSEXMLRPCis = false; | ||||
|   } else { | ||||
|   if (btnPTT[3]->value() == 1) | ||||
|   	btnPTT[0]->value(1); | ||||
|   btnPTT[3]->value(0); | ||||
|   btnPTT[3]->deactivate(); | ||||
|   progdefaults.chkUSERIGCATis = false; | ||||
|   } | ||||
| for (int i = 0; i < 4; btnPTT[i++]->redraw()); | ||||
| progdefaults.changed = true; | ||||
| } | ||||
| 
 | ||||
| static void cb_btnPTT2(Fl_Round_Button* o, void*) { | ||||
|   btnPTT[0]->value(0); | ||||
| btnPTT[1]->value(0); | ||||
| btnPTT[2]->value(0); | ||||
| btnPTT[4]->value(0); | ||||
| o->value(1); | ||||
| progdefaults.changed = true; | ||||
| } | ||||
| 
 | ||||
| Fl_Output *txtXmlRigFilename=(Fl_Output *)0; | ||||
| 
 | ||||
| Fl_Button *btnSelectRigXmlFile=(Fl_Button *)0; | ||||
| 
 | ||||
| static void cb_btnSelectRigXmlFile(Fl_Button*, void*) { | ||||
|   selectRigXmlFilename(); | ||||
| } | ||||
| 
 | ||||
| Fl_Input_Choice *inpXmlRigDevice=(Fl_Input_Choice *)0; | ||||
| 
 | ||||
| static void cb_inpXmlRigDevice(Fl_Input_Choice* o, void*) { | ||||
|   progdefaults.XmlRigDevice = o->value(); | ||||
| progdefaults.changed = true; | ||||
| } | ||||
| 
 | ||||
| Fl_Choice *mnuXmlRigBaudrate=(Fl_Choice *)0; | ||||
| 
 | ||||
| static void cb_mnuXmlRigBaudrate(Fl_Choice* o, void*) { | ||||
|   progdefaults.XmlRigBaudrate = o->value(); | ||||
| progdefaults.changed = true; | ||||
| } | ||||
| 
 | ||||
| Fl_Check_Button *chkUSEHAMLIB=(Fl_Check_Button *)0; | ||||
| 
 | ||||
| static void cb_chkUSEHAMLIB(Fl_Check_Button* o, void*) { | ||||
|  | @ -469,19 +531,7 @@ for (int i = 0; i < 4; btnPTT[i++]->redraw()); | |||
| progdefaults.changed = true; | ||||
| } | ||||
| 
 | ||||
| Fl_ComboBox *cboHamlibRig=(Fl_ComboBox *)0; | ||||
| 
 | ||||
| static void cb_cboHamlibRig(Fl_ComboBox*, void*) { | ||||
|   progdefaults.changed = true; | ||||
| } | ||||
| 
 | ||||
| Fl_Choice *mnuBaudRate=(Fl_Choice *)0; | ||||
| 
 | ||||
| static void cb_mnuBaudRate(Fl_Choice*, void*) { | ||||
|   progdefaults.changed = true; | ||||
| } | ||||
| 
 | ||||
| static void cb_btnPTT2(Fl_Round_Button* o, void*) { | ||||
| static void cb_btnPTT3(Fl_Round_Button* o, void*) { | ||||
|   btnPTT[0]->value(0); | ||||
| btnPTT[2]->value(0); | ||||
| btnPTT[3]->value(0); | ||||
|  | @ -490,48 +540,23 @@ o->value(1); | |||
| progdefaults.changed = true; | ||||
| } | ||||
| 
 | ||||
| Fl_Input_Choice *inpRIGdev=(Fl_Input_Choice *)0; | ||||
| Fl_ComboBox *cboHamlibRig=(Fl_ComboBox *)0; | ||||
| 
 | ||||
| static void cb_inpRIGdev(Fl_Input_Choice*, void*) { | ||||
| static void cb_cboHamlibRig(Fl_ComboBox*, void*) { | ||||
|   progdefaults.changed = true; | ||||
| } | ||||
| 
 | ||||
| Fl_Check_Button *chkUSERIGCAT=(Fl_Check_Button *)0; | ||||
| Fl_Input_Choice *inpRIGdev=(Fl_Input_Choice *)0; | ||||
| 
 | ||||
| static void cb_chkUSERIGCAT(Fl_Check_Button* o, void*) { | ||||
|   if (o->value() == 1) { | ||||
|   chkUSEHAMLIB->value(0); | ||||
|   chkUSEMEMMAP->value(0); | ||||
|   chkUSEXMLRPC->value(0); | ||||
|   btnPTT[1]->value(0); | ||||
|   btnPTT[1]->deactivate(); | ||||
|   btnPTT[2]->value(0); | ||||
|   btnPTT[2]->deactivate(); | ||||
|   btnPTT[3]->activate(); | ||||
|   cboHamlibRig->deactivate(); | ||||
|   inpRIGdev->deactivate(); | ||||
|   mnuBaudRate->deactivate(); | ||||
|   progdefaults.chkUSEMEMMAPis = false; | ||||
|   progdefaults.chkUSEHAMLIBis = false; | ||||
|   progdefaults.chkUSERIGCATis = true; | ||||
|   progdefaults.chkUSEXMLRPCis = false; | ||||
|   } else { | ||||
|   if (btnPTT[3]->value() == 1) | ||||
|   	btnPTT[0]->value(1); | ||||
|   btnPTT[3]->value(0); | ||||
|   btnPTT[3]->deactivate(); | ||||
|   progdefaults.chkUSERIGCATis = false; | ||||
|   } | ||||
| for (int i = 0; i < 4; btnPTT[i++]->redraw()); | ||||
| static void cb_inpRIGdev(Fl_Input_Choice* o, void*) { | ||||
|   progdefaults.HamRigDevice = o->value(); | ||||
| progdefaults.changed = true; | ||||
| } | ||||
| 
 | ||||
| static void cb_btnPTT3(Fl_Round_Button* o, void*) { | ||||
|   btnPTT[0]->value(0); | ||||
| btnPTT[1]->value(0); | ||||
| btnPTT[2]->value(0); | ||||
| btnPTT[4]->value(0); | ||||
| o->value(1); | ||||
| Fl_Choice *mnuBaudRate=(Fl_Choice *)0; | ||||
| 
 | ||||
| static void cb_mnuBaudRate(Fl_Choice* o, void*) { | ||||
|   progdefaults.HamRigBaudrate = o->value(); | ||||
| progdefaults.changed = true; | ||||
| } | ||||
| 
 | ||||
|  | @ -1539,7 +1564,6 @@ static const char szBaudRates[] = "300|600|1200|2400|4800|9600|19200|38400|57600 | |||
|         tabOperator->selection_color((Fl_Color)51); | ||||
|         tabOperator->callback((Fl_Callback*)cb_tabOperator); | ||||
|         tabOperator->when(FL_WHEN_CHANGED); | ||||
|         tabOperator->hide(); | ||||
|         { inpMyCallsign = new Fl_Input(78, 36, 85, 24, "Callsign:"); | ||||
|           inpMyCallsign->callback((Fl_Callback*)cb_inpMyCallsign); | ||||
|         } // Fl_Input* inpMyCallsign
 | ||||
|  | @ -1586,7 +1610,6 @@ static const char szBaudRates[] = "300|600|1200|2400|4800|9600|19200|38400|57600 | |||
|         tabWaterfall->hide(); | ||||
|         { Fl_Tabs* o = new Fl_Tabs(0, 25, 410, 195); | ||||
|           { Fl_Group* o = new Fl_Group(0, 50, 400, 170, "Filters/Colors"); | ||||
|             o->hide(); | ||||
|             { Fl_Group* o = new Fl_Group(10, 84, 385, 96); | ||||
|               o->box(FL_ENGRAVED_FRAME); | ||||
|               { WF_Palette = new colorbox(28, 107, 260, 24, "Palette:"); | ||||
|  | @ -1707,6 +1730,7 @@ static const char szBaudRates[] = "300|600|1200|2400|4800|9600|19200|38400|57600 | |||
|             o->end(); | ||||
|           } // Fl_Group* o
 | ||||
|           { Fl_Group* o = new Fl_Group(5, 54, 393, 166, "Misc"); | ||||
|             o->hide(); | ||||
|             { Fl_Group* o = new Fl_Group(8, 60, 390, 158); | ||||
|               o->box(FL_ENGRAVED_FRAME); | ||||
|               { Fl_Check_Button* o = btnUseCursorLines = new Fl_Check_Button(58, 79, 100, 20, "Cursor BW"); | ||||
|  | @ -1899,13 +1923,55 @@ static const char szBaudRates[] = "300|600|1200|2400|4800|9600|19200|38400|57600 | |||
|           o->end(); | ||||
|         } // Fl_Group* o
 | ||||
|         { Fl_Tabs* o = new Fl_Tabs(200, 34, 200, 150); | ||||
|           { Fl_Group* o = new Fl_Group(200, 60, 200, 120, "RigCAT"); | ||||
|             { chkUSERIGCAT = new Fl_Check_Button(208, 65, 20, 20, "rigCAT"); | ||||
|               chkUSERIGCAT->down_box(FL_DOWN_BOX); | ||||
|               chkUSERIGCAT->callback((Fl_Callback*)cb_chkUSERIGCAT); | ||||
|               chkUSERIGCAT->align(FL_ALIGN_RIGHT); | ||||
|             } // Fl_Check_Button* chkUSERIGCAT
 | ||||
|             { btnPTT[3] = new Fl_Round_Button(290, 65, 20, 19, "RigCAT PTT"); | ||||
|               btnPTT[3]->down_box(FL_DIAMOND_DOWN_BOX); | ||||
|               btnPTT[3]->selection_color((Fl_Color)1); | ||||
|               btnPTT[3]->callback((Fl_Callback*)cb_btnPTT2); | ||||
|               btnPTT[3]->align(FL_ALIGN_RIGHT); | ||||
|               btnPTT[3]->deactivate(); | ||||
|             } // Fl_Round_Button* btnPTT[3]
 | ||||
|             { Fl_Output* o = txtXmlRigFilename = new Fl_Output(208, 103, 130, 22, "Xml File"); | ||||
|               txtXmlRigFilename->color(FL_LIGHT2); | ||||
|               txtXmlRigFilename->align(FL_ALIGN_TOP_LEFT); | ||||
|               o->value(fl_filename_name(progdefaults.XmlRigFilename.c_str())); | ||||
|             } // Fl_Output* txtXmlRigFilename
 | ||||
|             { btnSelectRigXmlFile = new Fl_Button(338, 102, 54, 24, "Select"); | ||||
|               btnSelectRigXmlFile->tooltip("Select xml file for your rig"); | ||||
|               btnSelectRigXmlFile->callback((Fl_Callback*)cb_btnSelectRigXmlFile); | ||||
|             } // Fl_Button* btnSelectRigXmlFile
 | ||||
|             { Fl_Input_Choice* o = inpXmlRigDevice = new Fl_Input_Choice(245, 130, 144, 22, "Port:"); | ||||
|               inpXmlRigDevice->callback((Fl_Callback*)cb_inpXmlRigDevice); | ||||
|               o->value(progdefaults.XmlRigDevice.c_str()); | ||||
|             } // Fl_Input_Choice* inpXmlRigDevice
 | ||||
|             { Fl_Choice* o = mnuXmlRigBaudrate = new Fl_Choice(290, 154, 99, 22, "Baud Rate:"); | ||||
|               mnuXmlRigBaudrate->down_box(FL_BORDER_BOX); | ||||
|               mnuXmlRigBaudrate->callback((Fl_Callback*)cb_mnuXmlRigBaudrate); | ||||
|               o->add(szBaudRates); | ||||
|               o->value(progdefaults.XmlRigBaudrate); | ||||
|             } // Fl_Choice* mnuXmlRigBaudrate
 | ||||
|             o->end(); | ||||
|           } // Fl_Group* o
 | ||||
|           { Fl_Group* o = new Fl_Group(200, 60, 200, 120, "Ham"); | ||||
|             o->hide(); | ||||
|             { chkUSEHAMLIB = new Fl_Check_Button(350, 64, 20, 20, "use Hamlib"); | ||||
|               chkUSEHAMLIB->down_box(FL_DOWN_BOX); | ||||
|               chkUSEHAMLIB->callback((Fl_Callback*)cb_chkUSEHAMLIB); | ||||
|               chkUSEHAMLIB->align(FL_ALIGN_LEFT); | ||||
|             } // Fl_Check_Button* chkUSEHAMLIB
 | ||||
|             { Fl_ComboBox* o = cboHamlibRig = new Fl_ComboBox(240, 104, 150, 22, "Rig:"); | ||||
|             { btnPTT[1] = new Fl_Round_Button(350, 83, 20, 20, "use Hamlib PTT"); | ||||
|               btnPTT[1]->down_box(FL_DIAMOND_DOWN_BOX); | ||||
|               btnPTT[1]->selection_color((Fl_Color)1); | ||||
|               btnPTT[1]->callback((Fl_Callback*)cb_btnPTT3); | ||||
|               btnPTT[1]->align(FL_ALIGN_LEFT); | ||||
|               btnPTT[1]->deactivate(); | ||||
|             } // Fl_Round_Button* btnPTT[1]
 | ||||
|             { Fl_ComboBox* o = cboHamlibRig = new Fl_ComboBox(235, 104, 160, 22, "Rig:"); | ||||
|               cboHamlibRig->box(FL_DOWN_BOX); | ||||
|               cboHamlibRig->color(FL_BACKGROUND2_COLOR); | ||||
|               cboHamlibRig->selection_color(FL_BACKGROUND_COLOR); | ||||
|  | @ -1916,48 +1982,18 @@ static const char szBaudRates[] = "300|600|1200|2400|4800|9600|19200|38400|57600 | |||
|               cboHamlibRig->callback((Fl_Callback*)cb_cboHamlibRig); | ||||
|               cboHamlibRig->align(FL_ALIGN_LEFT); | ||||
|               cboHamlibRig->when(FL_WHEN_RELEASE); | ||||
|               cboHamlibRig->deactivate(); | ||||
|               o->readonly(); | ||||
|             } // Fl_ComboBox* cboHamlibRig
 | ||||
|             { Fl_Input_Choice* o = inpRIGdev = new Fl_Input_Choice(246, 130, 144, 22, "Port:"); | ||||
|               inpRIGdev->callback((Fl_Callback*)cb_inpRIGdev); | ||||
|               o->value(progdefaults.HamRigDevice.c_str()); | ||||
|             } // Fl_Input_Choice* inpRIGdev
 | ||||
|             { Fl_Choice* o = mnuBaudRate = new Fl_Choice(291, 154, 99, 22, "Baud Rate:"); | ||||
|               mnuBaudRate->down_box(FL_BORDER_BOX); | ||||
|               mnuBaudRate->callback((Fl_Callback*)cb_mnuBaudRate); | ||||
|               mnuBaudRate->deactivate(); | ||||
|               o->add(szBaudRates); | ||||
|               o->value(progdefaults.HamRigBaudrate); | ||||
|             } // Fl_Choice* mnuBaudRate
 | ||||
|             { btnPTT[1] = new Fl_Round_Button(350, 83, 20, 20, "use Hamlib PTT"); | ||||
|               btnPTT[1]->down_box(FL_DIAMOND_DOWN_BOX); | ||||
|               btnPTT[1]->selection_color((Fl_Color)1); | ||||
|               btnPTT[1]->callback((Fl_Callback*)cb_btnPTT2); | ||||
|               btnPTT[1]->align(FL_ALIGN_LEFT); | ||||
|               btnPTT[1]->deactivate(); | ||||
|             } // Fl_Round_Button* btnPTT[1]
 | ||||
|             { inpRIGdev = new Fl_Input_Choice(246, 130, 144, 22, "Port:"); | ||||
|               inpRIGdev->callback((Fl_Callback*)cb_inpRIGdev); | ||||
|               inpRIGdev->deactivate(); | ||||
|             } // Fl_Input_Choice* inpRIGdev
 | ||||
|             o->end(); | ||||
|           } // Fl_Group* o
 | ||||
|           { Fl_Group* o = new Fl_Group(200, 60, 200, 120, "RigCAT"); | ||||
|             o->hide(); | ||||
|             { chkUSERIGCAT = new Fl_Check_Button(350, 121, 20, 20, "use rigCAT"); | ||||
|               chkUSERIGCAT->down_box(FL_DOWN_BOX); | ||||
|               chkUSERIGCAT->callback((Fl_Callback*)cb_chkUSERIGCAT); | ||||
|               chkUSERIGCAT->align(FL_ALIGN_LEFT); | ||||
|             } // Fl_Check_Button* chkUSERIGCAT
 | ||||
|             { btnPTT[3] = new Fl_Round_Button(350, 147, 20, 19, "use RigCAT PTT"); | ||||
|               btnPTT[3]->down_box(FL_DIAMOND_DOWN_BOX); | ||||
|               btnPTT[3]->selection_color((Fl_Color)1); | ||||
|               btnPTT[3]->callback((Fl_Callback*)cb_btnPTT3); | ||||
|               btnPTT[3]->align(FL_ALIGN_LEFT); | ||||
|               btnPTT[3]->deactivate(); | ||||
|             } // Fl_Round_Button* btnPTT[3]
 | ||||
|             { Fl_Output* o = new Fl_Output(205, 65, 190, 50); | ||||
|               o->type(12); | ||||
|               o->box(FL_BORDER_BOX); | ||||
|               o->color(FL_LIGHT1); | ||||
|               o->value("Control specified in rig.xml\nfile"); | ||||
|             } // Fl_Output* o
 | ||||
|             o->end(); | ||||
|           } // Fl_Group* o
 | ||||
|           { Fl_Group* o = new Fl_Group(200, 60, 200, 120, "Mem"); | ||||
|  | @ -2213,9 +2249,9 @@ l with your sound hardware."); | |||
|       { tabMisc = new Fl_Group(0, 25, 405, 200, "Misc"); | ||||
|         tabMisc->color((Fl_Color)51); | ||||
|         tabMisc->selection_color((Fl_Color)51); | ||||
|         tabMisc->hide(); | ||||
|         { tabsMisc = new Fl_Tabs(0, 25, 400, 195); | ||||
|           { tabCPUspeed = new Fl_Group(0, 50, 400, 170, "CPU speed"); | ||||
|             tabCPUspeed->hide(); | ||||
|             { Fl_Group* o = new Fl_Group(5, 62, 390, 43); | ||||
|               o->box(FL_ENGRAVED_FRAME); | ||||
|               o->align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE); | ||||
|  | @ -2248,6 +2284,7 @@ l with your sound hardware."); | |||
|             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); | ||||
|  |  | |||
|  | @ -23,6 +23,8 @@ decl {\#include "colorsfonts.h"} {} | |||
| 
 | ||||
| decl {\#include "waterfall.h"} {}  | ||||
| 
 | ||||
| decl {\#include "rigxml.h"} {}  | ||||
| 
 | ||||
| decl {extern void initViewer();} {}  | ||||
| 
 | ||||
| decl {Fl_Double_Window *dlgConfig;} {public | ||||
|  | @ -41,15 +43,15 @@ static const char szBaudRates[] = "300|600|1200|2400|4800|9600|19200|38400|57600 | |||
|   code {} {} | ||||
|   Fl_Window {} { | ||||
|     label {fldigi - config} open | ||||
|     xywh {555 456 400 255} type Double color 45 selection_color 51 align 80 visible | ||||
|     xywh {503 648 400 255} type Double color 45 selection_color 51 align 80 visible | ||||
|   } { | ||||
|     Fl_Tabs tabsConfigure {open | ||||
|       xywh {0 0 410 225} color 47 selection_color 9 | ||||
|     } { | ||||
|       Fl_Group tabOperator { | ||||
|         label Oper | ||||
|         callback {progdefaults.changed = true;} open | ||||
|         xywh {0 25 400 195} color 51 selection_color 51 when 1 hide | ||||
|         callback {progdefaults.changed = true;} open selected | ||||
|         xywh {0 25 400 195} color 51 selection_color 51 when 1 | ||||
|       } { | ||||
|         Fl_Input inpMyCallsign { | ||||
|           label {Callsign:} | ||||
|  | @ -116,7 +118,7 @@ progdefaults.changed = true;} | |||
|         } { | ||||
|           Fl_Group {} { | ||||
|             label {Filters/Colors} open | ||||
|             xywh {0 50 400 170} hide | ||||
|             xywh {0 50 400 170} | ||||
|           } { | ||||
|             Fl_Group {} {open | ||||
|               xywh {10 84 385 96} box ENGRAVED_FRAME | ||||
|  | @ -290,7 +292,7 @@ progdefaults.changed = true;} | |||
|           } | ||||
|           Fl_Group {} { | ||||
|             label Misc open | ||||
|             xywh {5 54 393 166} | ||||
|             xywh {5 54 393 166} hide | ||||
|           } { | ||||
|             Fl_Group {} {open | ||||
|               xywh {8 60 390 158} box ENGRAVED_FRAME | ||||
|  | @ -539,8 +541,77 @@ progdefaults.changed = true;} | |||
|           xywh {200 34 200 150} | ||||
|         } { | ||||
|           Fl_Group {} { | ||||
|             label Ham open | ||||
|             label RigCAT open | ||||
|             xywh {200 60 200 120} | ||||
|           } { | ||||
|             Fl_Check_Button chkUSERIGCAT { | ||||
|               label rigCAT | ||||
|               callback {if (o->value() == 1) { | ||||
|   chkUSEHAMLIB->value(0); | ||||
|   chkUSEMEMMAP->value(0); | ||||
|   chkUSEXMLRPC->value(0); | ||||
|   btnPTT[1]->value(0); | ||||
|   btnPTT[1]->deactivate(); | ||||
|   btnPTT[2]->value(0); | ||||
|   btnPTT[2]->deactivate(); | ||||
|   btnPTT[3]->activate(); | ||||
|   cboHamlibRig->deactivate(); | ||||
|   inpRIGdev->deactivate(); | ||||
|   mnuBaudRate->deactivate(); | ||||
|   progdefaults.chkUSEMEMMAPis = false; | ||||
|   progdefaults.chkUSEHAMLIBis = false; | ||||
|   progdefaults.chkUSERIGCATis = true; | ||||
|   progdefaults.chkUSEXMLRPCis = false; | ||||
|   } else { | ||||
|   if (btnPTT[3]->value() == 1) | ||||
|   	btnPTT[0]->value(1); | ||||
|   btnPTT[3]->value(0); | ||||
|   btnPTT[3]->deactivate(); | ||||
|   progdefaults.chkUSERIGCATis = false; | ||||
|   } | ||||
| for (int i = 0; i < 4; btnPTT[i++]->redraw()); | ||||
| progdefaults.changed = true;} | ||||
|               xywh {208 65 20 20} down_box DOWN_BOX align 8 | ||||
|             } | ||||
|             Fl_Round_Button {btnPTT[3]} { | ||||
|               label {RigCAT PTT} | ||||
|               callback {btnPTT[0]->value(0); | ||||
| btnPTT[1]->value(0); | ||||
| btnPTT[2]->value(0); | ||||
| btnPTT[4]->value(0); | ||||
| o->value(1); | ||||
| progdefaults.changed = true;} | ||||
|               xywh {290 65 20 19} down_box DIAMOND_DOWN_BOX selection_color 1 align 8 deactivate | ||||
|             } | ||||
|             Fl_Output txtXmlRigFilename { | ||||
|               label {Xml File} | ||||
|               xywh {208 103 130 22} color 52 align 5 | ||||
|               code0 {o->value(fl_filename_name(progdefaults.XmlRigFilename.c_str()));} | ||||
|             } | ||||
|             Fl_Button btnSelectRigXmlFile { | ||||
|               label Select | ||||
|               callback {selectRigXmlFilename();} | ||||
|               tooltip {Select xml file for your rig} xywh {338 102 54 24} | ||||
|             } | ||||
|             Fl_Input_Choice inpXmlRigDevice { | ||||
|               label {Port:} | ||||
|               callback {progdefaults.XmlRigDevice = o->value(); | ||||
| progdefaults.changed = true;} open | ||||
|               xywh {245 130 144 22} | ||||
|               code0 {o->value(progdefaults.XmlRigDevice.c_str());} | ||||
|             } {} | ||||
|             Fl_Choice mnuXmlRigBaudrate { | ||||
|               label {Baud Rate:} | ||||
|               callback {progdefaults.XmlRigBaudrate = o->value(); | ||||
| progdefaults.changed = true;} open | ||||
|               xywh {290 154 99 22} down_box BORDER_BOX | ||||
|               code0 {o->add(szBaudRates);} | ||||
|               code1 {o->value(progdefaults.XmlRigBaudrate);} | ||||
|             } {} | ||||
|           } | ||||
|           Fl_Group {} { | ||||
|             label Ham open | ||||
|             xywh {200 60 200 120} hide | ||||
|           } { | ||||
|             Fl_Check_Button chkUSEHAMLIB { | ||||
|               label {use Hamlib} | ||||
|  | @ -574,19 +645,6 @@ for (int i = 0; i < 4; btnPTT[i++]->redraw()); | |||
| progdefaults.changed = true;} | ||||
|               xywh {350 64 20 20} down_box DOWN_BOX align 4 | ||||
|             } | ||||
|             Fl_Box cboHamlibRig { | ||||
|               label {Rig:} | ||||
|               callback {progdefaults.changed = true;} | ||||
|               xywh {240 104 150 22} box DOWN_BOX color 7 align 4 deactivate | ||||
|               code0 {o->readonly();} | ||||
|               class Fl_ComboBox | ||||
|             } | ||||
|             Fl_Choice mnuBaudRate { | ||||
|               label {Baud Rate:} | ||||
|               callback {progdefaults.changed = true;} open | ||||
|               xywh {291 154 99 22} down_box BORDER_BOX deactivate | ||||
|               code0 {o->add(szBaudRates);} | ||||
|             } {} | ||||
|             Fl_Round_Button {btnPTT[1]} { | ||||
|               label {use Hamlib PTT} | ||||
|               callback {btnPTT[0]->value(0); | ||||
|  | @ -597,59 +655,28 @@ o->value(1); | |||
| progdefaults.changed = true;} | ||||
|               xywh {350 83 20 20} down_box DIAMOND_DOWN_BOX selection_color 1 align 4 deactivate | ||||
|             } | ||||
|             Fl_Box cboHamlibRig { | ||||
|               label {Rig:} | ||||
|               callback {progdefaults.changed = true;} | ||||
|               xywh {235 104 160 22} box DOWN_BOX color 7 align 4 | ||||
|               code0 {o->readonly();} | ||||
|               class Fl_ComboBox | ||||
|             } | ||||
|             Fl_Input_Choice inpRIGdev { | ||||
|               label {Port:} | ||||
|               callback {progdefaults.changed = true;} open | ||||
|               xywh {246 130 144 22} deactivate | ||||
|               callback {progdefaults.HamRigDevice = o->value(); | ||||
| progdefaults.changed = true;} open | ||||
|               xywh {246 130 144 22} | ||||
|               code0 {o->value(progdefaults.HamRigDevice.c_str());} | ||||
|             } {} | ||||
|             Fl_Choice mnuBaudRate { | ||||
|               label {Baud Rate:} | ||||
|               callback {progdefaults.HamRigBaudrate = o->value(); | ||||
| progdefaults.changed = true;} open | ||||
|               xywh {291 154 99 22} down_box BORDER_BOX | ||||
|               code0 {o->add(szBaudRates);} | ||||
|               code1 {o->value(progdefaults.HamRigBaudrate);} | ||||
|             } {} | ||||
|           } | ||||
|           Fl_Group {} { | ||||
|             label RigCAT open | ||||
|             xywh {200 60 200 120} hide | ||||
|           } { | ||||
|             Fl_Check_Button chkUSERIGCAT { | ||||
|               label {use rigCAT} | ||||
|               callback {if (o->value() == 1) { | ||||
|   chkUSEHAMLIB->value(0); | ||||
|   chkUSEMEMMAP->value(0); | ||||
|   chkUSEXMLRPC->value(0); | ||||
|   btnPTT[1]->value(0); | ||||
|   btnPTT[1]->deactivate(); | ||||
|   btnPTT[2]->value(0); | ||||
|   btnPTT[2]->deactivate(); | ||||
|   btnPTT[3]->activate(); | ||||
|   cboHamlibRig->deactivate(); | ||||
|   inpRIGdev->deactivate(); | ||||
|   mnuBaudRate->deactivate(); | ||||
|   progdefaults.chkUSEMEMMAPis = false; | ||||
|   progdefaults.chkUSEHAMLIBis = false; | ||||
|   progdefaults.chkUSERIGCATis = true; | ||||
|   progdefaults.chkUSEXMLRPCis = false; | ||||
|   } else { | ||||
|   if (btnPTT[3]->value() == 1) | ||||
|   	btnPTT[0]->value(1); | ||||
|   btnPTT[3]->value(0); | ||||
|   btnPTT[3]->deactivate(); | ||||
|   progdefaults.chkUSERIGCATis = false; | ||||
|   } | ||||
| for (int i = 0; i < 4; btnPTT[i++]->redraw()); | ||||
| progdefaults.changed = true;} | ||||
|               xywh {350 121 20 20} down_box DOWN_BOX align 4 | ||||
|             } | ||||
|             Fl_Round_Button {btnPTT[3]} { | ||||
|               label {use RigCAT PTT} | ||||
|               callback {btnPTT[0]->value(0); | ||||
| btnPTT[1]->value(0); | ||||
| btnPTT[2]->value(0); | ||||
| btnPTT[4]->value(0); | ||||
| o->value(1); | ||||
| progdefaults.changed = true;} | ||||
|               xywh {350 147 20 19} down_box DIAMOND_DOWN_BOX selection_color 1 align 4 deactivate | ||||
|             } | ||||
|             Fl_Output {} { | ||||
|               xywh {205 65 190 50} type Multiline box BORDER_BOX color 50 | ||||
|               code0 {o->value("Control specified in rig.xml\\nfile");} | ||||
|             } | ||||
|           } | ||||
|           Fl_Group {} { | ||||
|             label Mem open | ||||
|  | @ -1040,14 +1067,14 @@ progdefaults.changed = true;} | |||
|       } | ||||
|       Fl_Group tabMisc { | ||||
|         label Misc open | ||||
|         xywh {0 25 405 200} color 51 selection_color 51 | ||||
|         xywh {0 25 405 200} color 51 selection_color 51 hide | ||||
|       } { | ||||
|         Fl_Tabs tabsMisc {open | ||||
|           xywh {0 25 400 195} | ||||
|         } { | ||||
|           Fl_Group tabCPUspeed { | ||||
|             label {CPU speed} open | ||||
|             xywh {0 50 400 170} hide | ||||
|             xywh {0 50 400 170} | ||||
|           } { | ||||
|             Fl_Group {} {open | ||||
|               xywh {5 62 390 43} box ENGRAVED_FRAME align 21 | ||||
|  | @ -1087,7 +1114,7 @@ progdefaults.changed = true;} | |||
|           } | ||||
|           Fl_Group tabMainWindow { | ||||
|             label {Main window} open | ||||
|             xywh {0 50 400 170} | ||||
|             xywh {0 50 400 170} hide | ||||
|           } { | ||||
|             Fl_Group {} { | ||||
|               label {Changes take effect on startup} open | ||||
|  | @ -1117,7 +1144,7 @@ progdefaults.changed = true;} | |||
|               Fl_Check_Button btnDockedRigControl { | ||||
|                 label {Docked Rig Control} | ||||
|                 callback {progdefaults.docked_rig_control = o->value(); | ||||
| progdefaults.changed = true;} selected | ||||
| progdefaults.changed = true;} | ||||
|                 xywh {200 150 160 20} down_box DOWN_BOX value 1 | ||||
|                 code0 {o->value(progdefaults.docked_rig_control);} | ||||
|               } | ||||
|  |  | |||
|  | @ -2015,10 +2015,10 @@ void create_fl_digi_main() { | |||
| 				QsoInfoFrame2 = new Fl_Group(rightof(QsoButtonFrame), Y,  | ||||
| 							WNOM - rightof(QsoButtonFrame), Hnotes); | ||||
| 
 | ||||
| 					inpName = new Fl_Input(rightof(QsoButtonFrame)+40, Y, 90, Hnotes, "Name"); | ||||
| 					inpName = new Fl_Input(rightof(QsoButtonFrame) + 38, Y, 90, Hnotes, "Name"); | ||||
| 					inpName->align(FL_ALIGN_LEFT); | ||||
| 			 | ||||
| 					inpLoc = new Fl_Input(rightof(inpName) - 8, Y, 58, Hnotes, "Loc"); | ||||
| 					inpLoc = new Fl_Input(rightof(inpCall) - 58, Y, 58, Hnotes, "Loc"); | ||||
| 					inpLoc->align(FL_ALIGN_LEFT); | ||||
| 
 | ||||
| 					inpAZ = new Fl_Input(leftof(inpRstOut), Y, 28, Hnotes, "Az"); | ||||
|  |  | |||
|  | @ -72,12 +72,16 @@ extern Fl_Round_Button *btnDTRplusV; | |||
| #include <FL/Fl_Input_Choice.H> | ||||
| extern Fl_Input_Choice *inpTTYdev; | ||||
| extern Fl_Round_Button *btnPTT[5]; | ||||
| extern Fl_Check_Button *chkUSEHAMLIB; | ||||
| extern Fl_ComboBox *cboHamlibRig; | ||||
| extern Fl_Choice *mnuBaudRate; | ||||
| extern Fl_Input_Choice *inpRIGdev; | ||||
| extern Fl_Check_Button *chkUSERIGCAT; | ||||
| #include <FL/Fl_Output.H> | ||||
| extern Fl_Output *txtXmlRigFilename; | ||||
| extern Fl_Button *btnSelectRigXmlFile; | ||||
| extern Fl_Input_Choice *inpXmlRigDevice; | ||||
| extern Fl_Choice *mnuXmlRigBaudrate; | ||||
| extern Fl_Check_Button *chkUSEHAMLIB; | ||||
| extern Fl_ComboBox *cboHamlibRig; | ||||
| extern Fl_Input_Choice *inpRIGdev; | ||||
| extern Fl_Choice *mnuBaudRate; | ||||
| extern Fl_Check_Button *chkUSEMEMMAP; | ||||
| extern Fl_Check_Button *chkUSEXMLRPC; | ||||
| extern Fl_Button *btnInit_Interface; | ||||
|  |  | |||
|  | @ -173,6 +173,9 @@ | |||
|         ELEM_(std::string, HamRigDevice, "HAMRIGDEVICE", DEFAULT_HAMRIGDEVICE)          \ | ||||
|         ELEM_(std::string, HamRigName, "HAMRIGNAME", "")                                \ | ||||
|         ELEM_(int, HamRigBaudrate, "HAMRIGBAUDRATE", 1) /* 600 baud */                  \ | ||||
|         ELEM_(std::string, XmlRigFilename, "XMLRIGFILENAME", "")                        \ | ||||
|         ELEM_(std::string, XmlRigDevice, "XMLRIGDEVICE", DEFAULT_HAMRIGDEVICE)          \ | ||||
|         ELEM_(int, XmlRigBaudrate, "XMLRIGBAUDRATE", 1)                                 \ | ||||
| /* Operator */                                                                          \ | ||||
|         ELEM_(std::string, myCall, "MYCALL", "")                                        \ | ||||
|         ELEM_(std::string, myQth, "MYQTH", "")                                          \ | ||||
|  | @ -287,6 +290,7 @@ struct configuration | |||
| 	void testCommPorts(); | ||||
| 	void getRigs(); | ||||
| 	std::string strBaudRate(); | ||||
| 	int  BaudRate(size_t); | ||||
| }; | ||||
| 
 | ||||
| extern configuration progdefaults; | ||||
|  |  | |||
|  | @ -1,81 +1,27 @@ | |||
| /* XPM */ | ||||
| static const char *time_icon[] = { | ||||
| /* columns rows colors chars-per-pixel */ | ||||
| "16 16 59 1", | ||||
| "  c #2E3436", | ||||
| ". c #32383A", | ||||
| "X c #383E40", | ||||
| "o c #393E40", | ||||
| "O c #3B4042", | ||||
| "+ c #404648", | ||||
| "@ c #414748", | ||||
| "# c #4A5052", | ||||
| "$ c #4C5153", | ||||
| "% c #4D5254", | ||||
| "& c #555753", | ||||
| "* c #61635F", | ||||
| "= c #636561", | ||||
| "- c #646662", | ||||
| "; c #686A66", | ||||
| ": c #6E706C", | ||||
| "> c #7C7E79", | ||||
| ", c #818485", | ||||
| "< c #888A85", | ||||
| "1 c #939591", | ||||
| "2 c #959798", | ||||
| "3 c #9B9C9A", | ||||
| "4 c #A0A2A3", | ||||
| "5 c #AAABA8", | ||||
| "6 c #B0B1AE", | ||||
| "7 c #B0B2B3", | ||||
| "8 c #B8B9B7", | ||||
| "9 c #C2C3C1", | ||||
| "0 c #C3C4C2", | ||||
| "q c #C2C4C4", | ||||
| "w c #C5C6C6", | ||||
| "e c #C8C8C8", | ||||
| "r c #CACAC9", | ||||
| "t c #C8C9CA", | ||||
| "y c #C9C9CA", | ||||
| "u c #CACBCA", | ||||
| "i c #CDCECD", | ||||
| "p c #CECFCE", | ||||
| "a c #D2D2D2", | ||||
| "s c gray84", | ||||
| "d c gray85", | ||||
| "f c #DFDFDF", | ||||
| "g c gray88", | ||||
| "h c #E1E1E1", | ||||
| "j c #E2E2E2", | ||||
| "k c #E3E3E2", | ||||
| "l c gray89", | ||||
| "z c #E4E4E4", | ||||
| "x c #E6E6E6", | ||||
| "c c #E7E7E7", | ||||
| "v c #E9E9E9", | ||||
| "b c #ECECEC", | ||||
| "n c #EEEEEE", | ||||
| "m c #F1F1F1", | ||||
| "M c #F3F3F3", | ||||
| "N c #FBFBFA", | ||||
| "B c #FDFDFD", | ||||
| "V c gray100", | ||||
| "C c None", | ||||
| /* pixels */ | ||||
| "CC<<CCC<CCC<CCCC", | ||||
| "C<<<<<<<<<<<<<CC", | ||||
| "<V<0VV<sBB<sBV<C", | ||||
| "<V<1xx<<kx<<xV<C", | ||||
| "<VsdxxsszxsssV<C", | ||||
| ">Vxzt,j$+7ccxV>C", | ||||
| ">Vnx% f2e#xxpV>C", | ||||
| ">Vnxf fq@4xxrV>C", | ||||
| ";Vxxf f.ywxi9V;C", | ||||
| ";Vxxf fOoXxi9V;C", | ||||
| "=VxllglhhhaMBN=C", | ||||
| "-Vxvbnmxpu8M63-C", | ||||
| "-VVVVVVVVVVV5:-C", | ||||
| "=*************-C", | ||||
| "C <&&&&&&&&&& CC", | ||||
| "C             CC" | ||||
| }; | ||||
| static const char * time_icon[] = { | ||||
| "16 16 8 1", | ||||
| " 	c None", | ||||
| ".	c #2E3436", | ||||
| "+	c #636561", | ||||
| "@	c #FFFFFF", | ||||
| "#	c #FDFDFD", | ||||
| "$	c #FBFBFA", | ||||
| "%	c #646662", | ||||
| "&	c #61635F", | ||||
| "  ..  ..  ..    ", | ||||
| " +.+++.+++.+++  ", | ||||
| "+@.@@@.@##.@@@+ ", | ||||
| "+@..@@..@@..@@+.", | ||||
| "+@@@@@@@@@@@@@+.", | ||||
| "+@@@@.@@..@@@@+.", | ||||
| "+@@@..@.@@.@@@+.", | ||||
| "+@@@@.@@@@.@@@+.", | ||||
| "+@@@@.@@..@@@@+.", | ||||
| "+@@@@.@.@@@@@@+.", | ||||
| "+@@@@.@....@#$+.", | ||||
| "+@@@@@@@@@@@@@+.", | ||||
| "%@@@@@@@@@@@@@+.", | ||||
| "+&&&&&&&&&&&&&+.", | ||||
| " .@@@@@@@@@@@@@.", | ||||
| " ..............."}; | ||||
|  |  | |||
|  | @ -104,6 +104,7 @@ extern std::list<std::string> LSBmodes; | |||
| extern XMLRIG rig; | ||||
| 
 | ||||
| extern bool readRigXML(); | ||||
| extern void	selectRigXmlFilename(); | ||||
| 
 | ||||
| #endif | ||||
| 
 | ||||
|  |  | |||
|  | @ -234,6 +234,8 @@ int main(int argc, char ** argv) | |||
| 		LOG_INFO("speed factor=%f, slowcpu=%d, sample_converter=\"%s\"", speed, | ||||
| 			 progdefaults.slowcpu, src_get_name(progdefaults.sample_converter)); | ||||
| 	} | ||||
| 	if (progdefaults.XmlRigFilename.empty()) | ||||
| 		progdefaults.XmlRigFilename = xmlfname; | ||||
| 
 | ||||
| 	progStatus.loadLastState(); | ||||
| 
 | ||||
|  |  | |||
|  | @ -391,30 +391,30 @@ int configuration::setDefaults() { | |||
| 	if(chkUSEMEMMAPis) { | ||||
| 		chkUSEMEMMAP->value(1);  | ||||
| 		chkUSEHAMLIB->value(0); chkUSERIGCAT->value(0); chkUSEXMLRPC->value(0); | ||||
| 		cboHamlibRig->deactivate(); | ||||
| 		inpRIGdev->deactivate(); | ||||
| 		mnuBaudRate->deactivate(); | ||||
| //		cboHamlibRig->deactivate();
 | ||||
| //		inpRIGdev->deactivate();
 | ||||
| //		mnuBaudRate->deactivate();
 | ||||
| 		btnPTT[1]->deactivate(); btnPTT[2]->activate(); btnPTT[3]->deactivate(); | ||||
| 	} else if (chkUSEHAMLIBis) { | ||||
| 		chkUSEHAMLIB->value(1); | ||||
| 		chkUSEMEMMAP->value(0); chkUSERIGCAT->value(0);  chkUSEXMLRPC->value(0); | ||||
| 		cboHamlibRig->activate(); | ||||
| 		inpRIGdev->activate(); | ||||
| 		mnuBaudRate->activate(); | ||||
| //		cboHamlibRig->activate();
 | ||||
| //		inpRIGdev->activate();
 | ||||
| //		mnuBaudRate->activate();
 | ||||
| 		btnPTT[1]->activate(); btnPTT[2]->deactivate(); btnPTT[3]->deactivate(); | ||||
| 	} else if (chkUSERIGCATis) { | ||||
| 		chkUSERIGCAT->value(1); | ||||
| 		chkUSEMEMMAP->value(0); chkUSEHAMLIB->value(0); chkUSEXMLRPC->value(0); | ||||
| 		cboHamlibRig->deactivate(); | ||||
| 		inpRIGdev->deactivate(); | ||||
| 		mnuBaudRate->deactivate(); | ||||
| //		cboHamlibRig->deactivate();
 | ||||
| //		inpRIGdev->deactivate();
 | ||||
| //		mnuBaudRate->deactivate();
 | ||||
| 		btnPTT[1]->deactivate(); btnPTT[2]->deactivate(); btnPTT[3]->activate(); | ||||
| 	} else if (chkUSEXMLRPCis) { | ||||
| 		chkUSEXMLRPC->value(1); | ||||
| 		chkUSEMEMMAP->value(0); chkUSEHAMLIB->value(0); chkUSERIGCAT->value(0); | ||||
| 		cboHamlibRig->deactivate(); | ||||
| 		inpRIGdev->deactivate(); | ||||
| 		mnuBaudRate->deactivate(); | ||||
| //		cboHamlibRig->deactivate();
 | ||||
| //		inpRIGdev->deactivate();
 | ||||
| //		mnuBaudRate->deactivate();
 | ||||
| 		btnPTT[1]->deactivate(); btnPTT[2]->deactivate(); btnPTT[3]->deactivate(); | ||||
| 	} else { | ||||
| 		chkUSEMEMMAP->value(0); chkUSEHAMLIB->value(0);  | ||||
|  | @ -424,6 +424,9 @@ int configuration::setDefaults() { | |||
| 
 | ||||
| 	inpRIGdev->value(HamRigDevice.c_str()); | ||||
| 	mnuBaudRate->value(HamRigBaudrate); | ||||
| 	 | ||||
| 	inpXmlRigDevice->value(XmlRigDevice.c_str()); | ||||
| 	mnuXmlRigBaudrate->value(XmlRigBaudrate); | ||||
| 
 | ||||
| 	valCWsweetspot->value(CWsweetspot); | ||||
| 	valRTTYsweetspot->value(RTTYsweetspot); | ||||
|  | @ -649,6 +652,12 @@ string configuration::strBaudRate() | |||
| 	return (szBaudRates[HamRigBaudrate + 1]); | ||||
| } | ||||
| 
 | ||||
| int configuration::BaudRate(size_t n) | ||||
| { | ||||
| 	if (n > sizeof(szBaudRates) + 1) return 1200; | ||||
| 	return (atoi(szBaudRates[n + 1])); | ||||
| } | ||||
| 
 | ||||
| #if USE_HAMLIB | ||||
| void configuration::getRigs() { | ||||
| list<string>::iterator pstr; | ||||
|  | @ -702,6 +711,7 @@ void configuration::testCommPorts() | |||
| #if USE_HAMLIB | ||||
| 			inpRIGdev->add(ttyname); | ||||
| #endif | ||||
| 			inpXmlRigDevice->add(ttyname); | ||||
| 		} | ||||
| 	} | ||||
| 	ret = true; | ||||
|  |  | |||
|  | @ -26,10 +26,10 @@ bool riglist_compare_func(const void *a, const void *b) | |||
| 	const struct rig_caps *rig2 = (const struct rig_caps *)b; | ||||
| 	int ret; | ||||
| 
 | ||||
| 	ret = strcmp(rig1->mfg_name, rig2->mfg_name); | ||||
| 	ret = strcasecmp(rig1->mfg_name, rig2->mfg_name); | ||||
| 	if (ret > 0) return false; | ||||
| 	if (ret < 0) return true; | ||||
| 	ret = strcmp(rig1->model_name, rig2->model_name); | ||||
| 	ret = strcasecmp(rig1->model_name, rig2->model_name); | ||||
| 	if (ret > 0) return false; | ||||
| 	if (ret <= 0) return true; | ||||
| 	if (rig1->rig_model > rig2->rig_model) | ||||
|  | @ -77,11 +77,38 @@ void Rig::get_rignames() | |||
| 	prig1 = riglist.begin(); | ||||
| 	 | ||||
| 	while (prig1 != riglist.end()) { | ||||
| 		rig_name_model = (*prig1)->mfg_name; | ||||
| 		rig_name_model.append( (*prig1)->model_name ); | ||||
| 		rignames.push_back(rig_name_model); | ||||
| 		rig_name_model.clear(); | ||||
| 		switch ((*prig1)->status) { | ||||
| 			case RIG_STATUS_ALPHA : | ||||
| 				rig_name_model.append((*prig1)->model_name); | ||||
| 				rig_name_model.append(" - Alpha"); | ||||
| 				rignames.push_back(rig_name_model); | ||||
| 				break; | ||||
| 			case RIG_STATUS_UNTESTED : | ||||
| 				rig_name_model.append((*prig1)->model_name); | ||||
| 				rig_name_model.append(" - Untested"); | ||||
| 				rignames.push_back(rig_name_model); | ||||
| 				break; | ||||
| 			case RIG_STATUS_BETA : | ||||
| 				rig_name_model.append((*prig1)->model_name); | ||||
| 				rig_name_model.append(" - Beta"); | ||||
| 				rignames.push_back(rig_name_model); | ||||
| 				break; | ||||
| 			case RIG_STATUS_BUGGY :  | ||||
| 				break; | ||||
| 			case RIG_STATUS_NEW : | ||||
| 				rig_name_model.append((*prig1)->model_name); | ||||
| 				rig_name_model.append(" - New"); | ||||
| 				rignames.push_back(rig_name_model); | ||||
| 				break; | ||||
| 			case RIG_STATUS_STABLE : | ||||
| 			default : | ||||
| 				rig_name_model.append((*prig1)->model_name); | ||||
| 				rig_name_model.append(" - Stable"); | ||||
| 				rignames.push_back(rig_name_model); | ||||
| 		} | ||||
| 		prig1++; | ||||
| 		}		 | ||||
| 	}		 | ||||
| } | ||||
| 
 | ||||
| void Rig::get_riglist() | ||||
|  |  | |||
|  | @ -945,6 +945,7 @@ void rigCAT_sendINIT() | |||
| 
 | ||||
| bool rigCAT_init(bool useXML) | ||||
| { | ||||
| 	 | ||||
| 	if (rigCAT_open == true) { | ||||
| 		LOG_ERROR("RigCAT already open"); | ||||
| 		return false; | ||||
|  | @ -962,6 +963,9 @@ bool rigCAT_init(bool useXML) | |||
| 		} | ||||
| 
 | ||||
| 		if (noXMLfile == false) {	 | ||||
| 			rigio.Baud(progdefaults.BaudRate(progdefaults.XmlRigBaudrate)); | ||||
| 			rigio.Device(progdefaults.XmlRigDevice); | ||||
| 
 | ||||
| 			if (rigio.OpenPort() == false) { | ||||
| 				LOG_ERROR("Cannot open serial port %s", rigio.Device().c_str()); | ||||
| 				return false; | ||||
|  |  | |||
|  | @ -22,6 +22,10 @@ | |||
| #endif | ||||
| #include "debug.h" | ||||
| 
 | ||||
| #include "configuration.h" | ||||
| #include "fileselect.h" | ||||
| #include "confdialog.h" | ||||
| 
 | ||||
| //#define DEBUGXML
 | ||||
| 
 | ||||
| void parseRIGDEF(size_t &); | ||||
|  | @ -590,8 +594,6 @@ void parsePORT(size_t &p0) | |||
| 	p0 = pend; | ||||
| 
 | ||||
| 	LOG_INFO("\nSerial port parameters:\n\
 | ||||
|     port: %s\n\ | ||||
|     baud: %d\n\ | ||||
|     retries: %d\n\ | ||||
|     timeout: %d\n\ | ||||
|     initial rts: %+d\n\ | ||||
|  | @ -599,7 +601,7 @@ void parsePORT(size_t &p0) | |||
|     initial dts: %+d\n\ | ||||
|     use dtr ptt: %c\n\ | ||||
|     use flowcontrol: %c", | ||||
| 		  rig.port.c_str(), rig.baud, rig.retries, rig.timeout, (rig.rts ? +12 : -12), | ||||
| 		  rig.retries, rig.timeout, (rig.rts ? +12 : -12), | ||||
| 		  (rig.rtsptt ? 'T' : 'F'), (rig.dtr ? +12 : -12), (rig.dtrptt ? 'T' : 'F'), | ||||
| 		  (rig.rtscts ? 'T' : 'F')); | ||||
| 
 | ||||
|  | @ -850,7 +852,7 @@ bool readRigXML() | |||
| 	LSBmodes.clear(); | ||||
| 	strXML = ""; | ||||
| 
 | ||||
| 	ifstream xmlfile(xmlfname.c_str(), ios::in); | ||||
| 	ifstream xmlfile(progdefaults.XmlRigFilename.c_str(), ios::in); | ||||
| 	if (xmlfile) { | ||||
| 		while (!xmlfile.eof()) { | ||||
| 			lines++; | ||||
|  | @ -865,3 +867,13 @@ bool readRigXML() | |||
| 	return false; | ||||
| } | ||||
| 
 | ||||
| void selectRigXmlFilename() | ||||
| { | ||||
| 	string deffilename; | ||||
| 	deffilename = progdefaults.XmlRigFilename; | ||||
|     const char *p = FSEL::select("Open rig xml file", "Fldigi rig xml definition file\t*.xml", deffilename.c_str()); | ||||
|     if (p) { | ||||
|    		progdefaults.XmlRigFilename = p; | ||||
|    		txtXmlRigFilename->value(fl_filename_name(p)); | ||||
| 	} | ||||
| } | ||||
|  |  | |||
		Ładowanie…
	
		Reference in New Issue
	
	 Stelios Bounanos
						Stelios Bounanos