kopia lustrzana https://github.com/jamescoxon/dl-fldigi
				
				
				
			Upstream version 2.11D
							rodzic
							
								
									3c662b8d2f
								
							
						
					
					
						commit
						ecb383b79f
					
				
							
								
								
									
										20
									
								
								ChangeLog
								
								
								
								
							
							
						
						
									
										20
									
								
								ChangeLog
								
								
								
								
							|  | @ -1,15 +1,21 @@ | |||
| Change Log: | ||||
| 
 | ||||
| 2.11  1) Deleted local copy of libsamplerate as it was deprecated. | ||||
|       2) Deleted the fast text widgets that were a part of the early versions | ||||
| 2.11  1) Added EXEC macro | ||||
|       2) Added mousewheel over Macro buttons to move between macro button sets. | ||||
|       3) Fixed bug in Olivia signal level display. | ||||
|        | ||||
| 2.10.2 | ||||
|       1) Bug fix for QRZ CDROM access | ||||
| 2.10.1 | ||||
|       1) Fixed bug in MODEM macro that caused TX to hang | ||||
|       2) Fixed sound_init crash.  This would happen with an empty  | ||||
|          progdefaults.OSSdevice (e.g. new install) on a system without  | ||||
|          OSS devices. | ||||
|       3) Deleted local copy of libsamplerate as it was deprecated. | ||||
|       4) Deleted the fast text widgets that were a part of the early versions | ||||
|          of fldigi and had been retained for some performance improvement. | ||||
|          Recent changes to the more complete text widgets have equalled the | ||||
|          performance of the fast text widgets. | ||||
|       3) Added EXEC macro | ||||
|       4) Fixed bug in MODEM macro that caused TX to hang | ||||
|       5) Fixed sound_init crash.  This would happen with an empty  | ||||
|          progdefaults.OSSdevice (e.g. new install) on a system without  | ||||
|          OSS devices. | ||||
| 2.10  1) Added history decoding (ctrl-Left-click in waterfall). Available after | ||||
|          tracking has started.  This does not start a new signal acquisition. | ||||
|       2) Rewrote Psk and ViewPsk to use shared signal detection class | ||||
|  |  | |||
|  | @ -9,7 +9,7 @@ dnl major and minor must be integers; patch may | |||
| dnl contain other characters or be empty | ||||
| m4_define(FLDIGI_MAJOR, [2]) | ||||
| m4_define(FLDIGI_MINOR, [11]) | ||||
| m4_define(FLDIGI_PATCH, [C]) | ||||
| m4_define(FLDIGI_PATCH, [D]) | ||||
| 
 | ||||
| AC_INIT([fldigi], FLDIGI_MAJOR.FLDIGI_MINOR[FLDIGI_PATCH], [w1hkj AT w1hkj DOT com]) | ||||
| 
 | ||||
|  |  | |||
|  | @ -108,7 +108,7 @@ Fl_Box				*Status2 = (Fl_Box *)0; | |||
| Fl_Box				*Status1 = (Fl_Box *)0; | ||||
| Fl_Box				*WARNstatus = (Fl_Box *)0; | ||||
| Fl_Button			*MODEstatus = (Fl_Button *)0; | ||||
| Fl_Button 			*btnMacro[12]; | ||||
| Fl_Button 			*btnMacro[NUMMACKEYS]; | ||||
| Fl_Button			*btnAltMacros; | ||||
| Fl_Light_Button		*btn_afconoff; | ||||
| Fl_Light_Button		*btn_sqlonoff; | ||||
|  | @ -137,7 +137,7 @@ Fl_Slider			*valXmtMixer; | |||
| 
 | ||||
| int					altMacros = 0; | ||||
| bool				bSaveFreqList = false; | ||||
| string				strMacroName[12]; | ||||
| string				strMacroName[NUMMACKEYS]; | ||||
| 
 | ||||
| 
 | ||||
| waterfall			*wf = (waterfall *)0; | ||||
|  | @ -475,7 +475,7 @@ void macro_cb(Fl_Widget *w, void *v) | |||
| void colorize_macro(int i)  | ||||
| { | ||||
| 	if (progdefaults.useGroupColors == true) { | ||||
| 		if (i < 4){ | ||||
| 		if (i < NUMKEYROWS){ | ||||
| 			btnMacro[i]->color(fl_rgb_color( | ||||
| 				progdefaults.btnGroup1.R,  | ||||
| 				progdefaults.btnGroup1.G,  | ||||
|  | @ -505,7 +505,7 @@ void colorize_macro(int i) | |||
| void colorize_macros() | ||||
| { | ||||
| 	FL_LOCK_D(); | ||||
| 	for (int i = 0; i < 12; i++) { | ||||
| 	for (int i = 0; i < NUMMACKEYS; i++) { | ||||
| 		colorize_macro(i); | ||||
| 		btnMacro[i]->redraw_label(); | ||||
| 	} | ||||
|  | @ -514,12 +514,18 @@ void colorize_macros() | |||
| 
 | ||||
| void altmacro_cb(Fl_Widget *w, void *v) | ||||
| { | ||||
| 	static char alt_text[4]; | ||||
| 	altMacros = altMacros + (Fl::event_button() == FL_RIGHT_MOUSE ? -1 : 1); | ||||
| 	static char alt_text[NUMKEYROWS]; | ||||
| 
 | ||||
| 	intptr_t arg = reinterpret_cast<intptr_t>(v); | ||||
| 	if (arg) | ||||
| 		altMacros += arg; | ||||
| 	else | ||||
| 		altMacros = altMacros + (Fl::event_button() == FL_RIGHT_MOUSE ? -1 : 1); | ||||
| 	altMacros = WCLAMP(altMacros, 0, 3); | ||||
| 
 | ||||
| 	snprintf(alt_text, sizeof(alt_text), "%d", altMacros + 1); | ||||
| 	FL_LOCK_D(); | ||||
| 	for (int i = 0; i < 12; i++) | ||||
| 	for (int i = 0; i < NUMMACKEYS; i++) | ||||
| 		btnMacro[i]->label(macros.name[i + (altMacros * NUMMACKEYS)].c_str()); | ||||
| 	btnAltMacros->label(alt_text); | ||||
| 	btnAltMacros->redraw_label(); | ||||
|  | @ -1319,9 +1325,9 @@ void create_fl_digi_main() { | |||
| 		 | ||||
| 		Fl_Box *macroFrame = new Fl_Box(0, Y, WNOM, Hmacros); | ||||
| 			macroFrame->box(FL_ENGRAVED_FRAME); | ||||
| 			int Wbtn = (WNOM - 30 - 8 - 4)/12; | ||||
| 			int Wbtn = (WNOM - 30 - 8 - 4)/NUMMACKEYS; | ||||
| 			int xpos = 2; | ||||
| 			for (int i = 0; i < 12; i++) { | ||||
| 			for (int i = 0; i < NUMMACKEYS; i++) { | ||||
| 				if (i == 4 || i == 8) { | ||||
| 					bx = new Fl_Box(xpos, Y+2, 5, Hmacros - 4); | ||||
| 					bx->box(FL_FLAT_BOX); | ||||
|  |  | |||
|  | @ -2618,7 +2618,7 @@ template <class Type=float> | |||
|          if(SyncSNR>=SyncThreshold) | ||||
|          { | ||||
| /*
 | ||||
|          printf("%4.1f/%+2d => %4.1f/%3.1f = %4.1f  ", | ||||
|          printf("%4.1f/%+2d => %4.1f/%3.1f = %4.1f  \n", | ||||
|              (float)SyncBestBlockPhase/2, | ||||
|              (int)SyncBestFreqOffset-(FreqOffsets/2), | ||||
|              SyncBestSignal, BestNoise, | ||||
|  |  | |||
|  | @ -12,7 +12,8 @@ | |||
| using namespace std; | ||||
| 
 | ||||
| #define NUMMACKEYS 12 | ||||
| #define MAXMACROS (4 * NUMMACKEYS) | ||||
| #define NUMKEYROWS 4 | ||||
| #define MAXMACROS (NUMKEYROWS * NUMMACKEYS) | ||||
| 
 | ||||
| struct CONTESTCNTR { | ||||
| 	int count; | ||||
|  |  | |||
|  | @ -373,13 +373,13 @@ void set_env(void) | |||
| 	// PATH
 | ||||
| 	static string path; | ||||
| 	if (path.length() == 0) { | ||||
| 		path = HomeDir; | ||||
| 		if (*path.rbegin() != '/') | ||||
| 			path += '/'; | ||||
| 		path.append("scripts"); | ||||
| 		const char* p; | ||||
| 		if ((p = getenv("PATH"))) | ||||
| 			path.append(p).append(":"); | ||||
| 		path.append(HomeDir); | ||||
| 		if (*path.rbegin() != '/') | ||||
| 			path.append("/"); | ||||
| 		path.append("scripts"); | ||||
| 			path.append(":").append(p); | ||||
| 	} | ||||
| 	env[PATH].val = path.c_str(); | ||||
| 
 | ||||
|  | @ -480,6 +480,9 @@ void pEXEC(string &s, size_t &i) | |||
| 		s.insert(start, ln, end); | ||||
| 		start += end; | ||||
| 	} | ||||
| 	// delete the trailing newline of what we read
 | ||||
| 	if (start > i && s[start - 1] == '\n') | ||||
| 		s.erase(start - 1, 1); | ||||
| 
 | ||||
| 	fclose(fp); | ||||
| 	close(pfd[0]); | ||||
|  |  | |||
|  | @ -32,6 +32,9 @@ | |||
| # include <unistd.h> | ||||
| # include <pwd.h> | ||||
| 
 | ||||
| #include <iostream> | ||||
| using namespace std; | ||||
| 
 | ||||
| #include "qrzlib.h" | ||||
| 
 | ||||
| static char QRZdir[256] = ""; | ||||
|  | @ -183,6 +186,10 @@ void QRZ::OpenQRZFiles( const char *fname ) | |||
|   long fsize; | ||||
|   char dfname[64]; | ||||
|   char idxname[64]; | ||||
|   int num1; | ||||
|   int num2; | ||||
|   num1 = 0; | ||||
|   num2 = 0; | ||||
| 
 | ||||
|   if( fname[0] == 0 ) { | ||||
|     QRZvalid = 0; | ||||
|  | @ -226,8 +233,10 @@ void QRZ::OpenQRZFiles( const char *fname ) | |||
|   } | ||||
|   memset( index, 0, idxsize ); | ||||
| 
 | ||||
|   if (fread( &idxhdr.dataname, 1, 48, idxfile ) != 1 || | ||||
|       fread( index, 1, idxsize, idxfile ) != 1) { | ||||
|   num1 =  fread( &idxhdr.dataname, 48, 1, idxfile ); | ||||
|   num2 =  fread( index, idxsize, 1, idxfile ); | ||||
|   | ||||
|   if (num1 != 1 || num2 != 1) { | ||||
|     fclose( idxfile ); | ||||
|     free( index ); | ||||
|     QRZvalid = 0; | ||||
|  |  | |||
|  | @ -248,20 +248,17 @@ int olivia::rx_process(const double *buf, int len) | |||
| 
 | ||||
| 	Rx->Process(rxbuffer, len); | ||||
| 
 | ||||
| 	if ((snr = Rx->SignalToNoiseRatio()) > 99.9) | ||||
| 		snr = 99.9; | ||||
| 	snr = Rx->SignalToNoiseRatio(); | ||||
| 
 | ||||
| 	set_metric(snr); | ||||
| 	display_metric(snr > 100.0 ? 100.0 : snr); | ||||
| 	 | ||||
| 	double s2n = 20.0 * log10(snr); | ||||
| 	double s2n = 20.0 * log10(snr < 0.1 ? 0.1 : snr); | ||||
| 
 | ||||
| 	snprintf(msg1, sizeof(msg1), "s/n %4.1f", s2n);//Rx->SignalToNoiseRatio()); 
 | ||||
| 	put_Status1(msg1); | ||||
| 	snprintf(msg2, sizeof(msg2), "Freq: %+4.1f", Rx->FrequencyOffset()); | ||||
| 	put_Status2(msg2); | ||||
| //	snprintf(msg3, sizeof(msg3), "Tune: %4.1f, Time: %5.3f Hz, Block: %5.3f sec",
 | ||||
| //		Rx->TuneMargin(), Rx->TimeOffset(), Rx->BlockPeriod());
 | ||||
| //	put_status(msg3);
 | ||||
| 
 | ||||
| 	while (Rx->GetChar(ch) > 0) | ||||
| 		if ((c = unescape(ch)) != -1 && c > 7) | ||||
|  | @ -274,12 +271,12 @@ void olivia::restart() | |||
| { | ||||
| 	tones	= progdefaults.oliviatones; | ||||
| 	bw 		= progdefaults.oliviabw; | ||||
| //	samplerate = 8000;
 | ||||
| 	samplerate = 8000; | ||||
| //	samplerate = 11025;
 | ||||
| 	 | ||||
| 	Tx->Tones = 2 * (1 << tones); | ||||
| 	Tx->Bandwidth = 125 * (1 << bw); | ||||
| 	Tx->SampleRate = 8000.0;//samplerate;
 | ||||
| 	Tx->SampleRate = samplerate; //8000.0; //samplerate;
 | ||||
| 	Tx->OutputSampleRate = samplerate; | ||||
|     txbasefreq = get_txfreq_woffset(); | ||||
| 
 | ||||
|  | @ -312,7 +309,7 @@ void olivia::restart() | |||
| 	Rx->SyncIntegLen = sinteg; | ||||
| 	Rx->SyncThreshold = progStatus.sqlonoff ? progStatus.sldrSquelchValue : 0.0; | ||||
| 
 | ||||
| 	Rx->SampleRate = 8000.0;//samplerate;
 | ||||
| 	Rx->SampleRate = samplerate; // 8000.0;//samplerate;
 | ||||
| 	Rx->InputSampleRate = samplerate; | ||||
| 
 | ||||
| 	if (reverse) {  | ||||
|  |  | |||
|  | @ -45,6 +45,7 @@ | |||
| #include "fldigi-config.h" | ||||
| #include "configuration.h" | ||||
| #include "Viewer.h" | ||||
| #include "macros.h" | ||||
| 
 | ||||
| Fl_Mutex	wf_mutex = PTHREAD_MUTEX_INITIALIZER; | ||||
| 
 | ||||
|  | @ -1390,6 +1391,19 @@ int waterfall::handle(int event) | |||
| 		return 1; | ||||
| 	} | ||||
| 
 | ||||
| 	// as above; handle wheel events for the macro bar
 | ||||
| 	extern void altmacro_cb(Fl_Widget *w, void *v); | ||||
| 	for (int i = 0; i < NUMMACKEYS; i++) { | ||||
| 		if (Fl::event_inside(btnMacro[i])) { | ||||
| 			altmacro_cb(btnAltMacros, reinterpret_cast<void *>(d)); | ||||
| 			return 1; | ||||
| 		} | ||||
| 	} | ||||
| 	if (Fl::event_inside(btnAltMacros)) { | ||||
| 		altmacro_cb(btnAltMacros, reinterpret_cast<void *>(d)); | ||||
| 		return 1; | ||||
| 	} | ||||
| 
 | ||||
| 	return 0; | ||||
| } | ||||
| 
 | ||||
|  |  | |||
		Ładowanie…
	
		Reference in New Issue
	
	 Stelios Bounanos
						Stelios Bounanos