kopia lustrzana https://github.com/jamescoxon/dl-fldigi
Upstream version 2.11AB
rodzic
7c2464d222
commit
ffc692c17c
|
@ -70,7 +70,14 @@ Change Log:
|
|||
the filename suffix in the generate/capture/playback code;
|
||||
uses the fileselector filter value instead.
|
||||
30) Update fileselector - Fileselector now remembers previous directory.
|
||||
|
||||
31) MFSK bug fixes. The "broken image transmit" was due to stopflag not
|
||||
being initialised in the mfsk ctor. Image window processing changed
|
||||
to clearing the widget before redrawing the window.
|
||||
32) Fix crash with missing mixer device - Call OpenMixer in a try block
|
||||
and handle the exception.
|
||||
33) Changed DominoEX-FEC secondary char lookup to a std::map type.
|
||||
34) Corrected two coding errors which produced compile warnings in
|
||||
dominoex.cxx and mt63base.cxx
|
||||
|
||||
2.10.3)
|
||||
1) Corrected memory leak bug.
|
||||
|
|
|
@ -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, [AA])
|
||||
m4_define(FLDIGI_PATCH, [AB])
|
||||
|
||||
AC_INIT([fldigi], FLDIGI_MAJOR.FLDIGI_MINOR[FLDIGI_PATCH], [w1hkj AT w1hkj DOT com])
|
||||
|
||||
|
|
|
@ -296,7 +296,7 @@ void dex::decodeEX(int ch)
|
|||
int c = ch;
|
||||
|
||||
for (int i = 0; i < 4; i++) {
|
||||
if (c & 1 == 1) symbols[3-i] = 255;
|
||||
if ((c & 1) == 1) symbols[3-i] = 255;
|
||||
else symbols[3-i] = 1;
|
||||
c = c / 2;
|
||||
}
|
||||
|
|
|
@ -1739,7 +1739,6 @@ static const char szBaudRates[] = "300|600|1200|2400|4800|9600|19200|38400|57600
|
|||
{ tabSoundCard = new Fl_Group(0, 25, 400, 195, "SndCrd");
|
||||
tabSoundCard->color((Fl_Color)51);
|
||||
tabSoundCard->selection_color((Fl_Color)51);
|
||||
tabSoundCard->hide();
|
||||
{ tabsSoundCard = new Fl_Tabs(0, 25, 400, 195);
|
||||
tabsSoundCard->selection_color((Fl_Color)10);
|
||||
{ tabAudio = new Fl_Group(0, 50, 400, 170, "Audio devices");
|
||||
|
@ -1840,6 +1839,7 @@ l with your sound hardware.");
|
|||
menuOutSampleRate->align(FL_ALIGN_RIGHT);
|
||||
//extern Fl_Menu_Item sample_rate_menu[];
|
||||
//o->menu(sample_rate_menu);
|
||||
o->clear_changed();
|
||||
} // Fl_Choice* menuOutSampleRate
|
||||
{ Fl_Choice* o = menuInSampleRate = new Fl_Choice(8, 62, 85, 25, "Capture");
|
||||
menuInSampleRate->tooltip("Force a specific sample rate. Select \"Native\" if \"Auto\" does not work wel\
|
||||
|
@ -1849,6 +1849,7 @@ l with your sound hardware.");
|
|||
menuInSampleRate->align(FL_ALIGN_RIGHT);
|
||||
//extern Fl_Menu_Item sample_rate_menu[];
|
||||
//o->menu(sample_rate_menu);
|
||||
o->clear_changed();
|
||||
} // Fl_Choice* menuInSampleRate
|
||||
{ menuSampleConverter = new Fl_Choice(174, 91, 216, 25, "Converter");
|
||||
menuSampleConverter->down_box(FL_BORDER_BOX);
|
||||
|
@ -1939,6 +1940,7 @@ l with your sound hardware.");
|
|||
{ tabModems = new Fl_Group(0, 25, 401, 195, "Modem");
|
||||
tabModems->color((Fl_Color)51);
|
||||
tabModems->selection_color((Fl_Color)51);
|
||||
tabModems->hide();
|
||||
{ tabsModems = new Fl_Tabs(0, 25, 401, 195);
|
||||
tabsModems->color((Fl_Color)51);
|
||||
tabsModems->selection_color((Fl_Color)10);
|
||||
|
|
|
@ -671,7 +671,7 @@ o->label((inpQRZuserpassword->type() & FL_SECRET_INPUT) ? "Show" : "Hide");}
|
|||
}
|
||||
Fl_Group tabSoundCard {
|
||||
label SndCrd open
|
||||
xywh {0 25 400 195} color 51 selection_color 51 hide
|
||||
xywh {0 25 400 195} color 51 selection_color 51
|
||||
} {
|
||||
Fl_Tabs tabsSoundCard {open
|
||||
xywh {0 25 400 195} selection_color 10
|
||||
|
@ -802,15 +802,17 @@ progdefaults.changed = true;} open
|
|||
tooltip {Force a specific sample rate. Select "Native" if "Auto" does not work well with your sound hardware.} xywh {8 91 85 25} down_box BORDER_BOX align 8
|
||||
code0 {//extern Fl_Menu_Item sample_rate_menu[];}
|
||||
code1 {//o->menu(sample_rate_menu);}
|
||||
code2 {o->clear_changed();}
|
||||
} {}
|
||||
Fl_Choice menuInSampleRate {
|
||||
label Capture
|
||||
callback {progdefaults.in_sample_rate = o->value() > 1 ? strtol(o->mvalue()->text, 0, 10) : o->value();
|
||||
resetSoundCard();
|
||||
progdefaults.changed = true;} open
|
||||
progdefaults.changed = true;} open selected
|
||||
tooltip {Force a specific sample rate. Select "Native" if "Auto" does not work well with your sound hardware.} xywh {8 62 85 25} down_box BORDER_BOX align 8
|
||||
code0 {//extern Fl_Menu_Item sample_rate_menu[];}
|
||||
code1 {//o->menu(sample_rate_menu);}
|
||||
code2 {o->clear_changed();}
|
||||
} {}
|
||||
Fl_Choice menuSampleConverter {
|
||||
label Converter
|
||||
|
@ -922,7 +924,7 @@ progdefaults.changed = true;}
|
|||
}
|
||||
Fl_Group tabModems {
|
||||
label Modem open
|
||||
xywh {0 25 401 195} color 51 selection_color 51
|
||||
xywh {0 25 401 195} color 51 selection_color 51 hide
|
||||
} {
|
||||
Fl_Tabs tabsModems {open
|
||||
xywh {0 25 401 195} color 51 selection_color 10 align 9
|
||||
|
@ -1081,7 +1083,7 @@ progdefaults.changed = true;}
|
|||
Fl_Counter valDEX_PATHS {
|
||||
label Paths
|
||||
callback {progdefaults.DEX_PATHS = (int)o->value();
|
||||
progdefaults.changed = true;} selected
|
||||
progdefaults.changed = true;}
|
||||
xywh {20 174 63 21} type Simple minimum 4 maximum 8 step 1 value 5
|
||||
code0 {o->value(progdefaults.DEX_PATHS);}
|
||||
}
|
||||
|
|
|
@ -1993,7 +1993,13 @@ void enableMixer(bool on)
|
|||
#else
|
||||
mixer = new MixerBase;
|
||||
#endif
|
||||
try {
|
||||
mixer->openMixer(progdefaults.MXdevice.c_str());
|
||||
}
|
||||
catch (const MixerException& e) {
|
||||
put_status(e.what(), 5);
|
||||
goto ret;
|
||||
}
|
||||
|
||||
mixer->PCMVolume(progdefaults.PCMvolume);
|
||||
mixer->setXmtLevel(progStatus.XmtMixer); //valXmtMixer->value());
|
||||
|
@ -2011,6 +2017,7 @@ void enableMixer(bool on)
|
|||
delete mixer;
|
||||
mixer = 0;
|
||||
}
|
||||
ret:
|
||||
resetMixerControls();
|
||||
FL_UNLOCK_D();
|
||||
}
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
#include <stdlib.h>
|
||||
|
||||
#include <iostream>
|
||||
#include <map>
|
||||
|
||||
#include "confdialog.h"
|
||||
#include "status.h"
|
||||
|
@ -41,6 +42,7 @@
|
|||
using namespace std;
|
||||
|
||||
char dommsg[80];
|
||||
static map<int, unsigned char> mupsksec2pri;
|
||||
|
||||
void dominoex::tx_init(SoundBase *sc)
|
||||
{
|
||||
|
@ -90,6 +92,9 @@ void dominoex::restart()
|
|||
|
||||
void dominoex::init()
|
||||
{
|
||||
if (mupsksec2pri.empty())
|
||||
MuPsk_sec2pri_init();
|
||||
|
||||
modem::init();
|
||||
reset_filters();
|
||||
rx_init();
|
||||
|
@ -101,6 +106,49 @@ void dominoex::init()
|
|||
set_scope_mode(Digiscope::DOMDATA);
|
||||
}
|
||||
|
||||
void dominoex::MuPsk_sec2pri_init(void)
|
||||
{
|
||||
int chars[] = { 'A', 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, // À, Á, Â, Ã, Ä, Å
|
||||
0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, -1, // à, á, â, ã, ä, å
|
||||
'B', 0xdf, -1, // ß
|
||||
'C', 0xc7, 0xe7, 0xa9, -1, // Ç, ç, ©,
|
||||
'D', 0xd0, 0xb0, -1, // Ð, °
|
||||
'E', 0xc6, 0xe6, 0xc8, 0xc9, 0xca, 0xcb, // Æ, æ, È, É, Ê, Ë
|
||||
0xe8, 0xe9, 0xea, 0xeb, -1, // è, é, ê, ë
|
||||
'F', 0x192, -1, // ƒ
|
||||
'I', 0xcc, 0xcd, 0xce, 0xcf, 0xec, 0xed, // Ì, Í, Î, Ï, ì, í
|
||||
0xee, 0xef, 0xa1, -1, // î, ï, ¡
|
||||
'L', 0xa3, -1, // £
|
||||
'N', 0xd1, 0xf1, -1, // Ñ, ñ
|
||||
'O', 0xf4, 0xf6, 0xf2, 0xd6, 0xf3, 0xd3, // ô, ö, ò, Ö, ó, Ó
|
||||
0xd4, 0xd2, 0xf5, 0xd5, -1, // Ô, Ò, õ, Õ
|
||||
'R', 0xae, -1, // ®
|
||||
'U', 0xd9, 0xda, 0xdb, 0xdc, 0xf9, 0xfa, // Ù, Ú, Û, Ü, ù, ú
|
||||
0xfb, 0xfc, -1, // û, ü
|
||||
'X', 0xd7, -1, // ×
|
||||
'Y', 0xff, 0xfd, 0xdd, -1, // ÿ, ý, Ý
|
||||
'0', 0xd8, -1, // Ø
|
||||
'1', 0xb9, -1, // ¹
|
||||
'2', 0xb2, -1, // ²
|
||||
'3', 0xb3, -1, // ³
|
||||
'?', 0xbf, -1, // ¿
|
||||
'!', 0xa1, -1, // ¡
|
||||
'<', 0xab, -1, // «
|
||||
'>', 0xbb, -1, // »
|
||||
'{', '(', -1,
|
||||
'}', ')', -1,
|
||||
'|', '\\'
|
||||
};
|
||||
|
||||
int c = chars[0];
|
||||
for (size_t i = 1; i < sizeof(chars)/sizeof(*chars); i++) {
|
||||
if (chars[i] != -1)
|
||||
mupsksec2pri[chars[i]] = c;
|
||||
else
|
||||
c = chars[++i];
|
||||
}
|
||||
}
|
||||
|
||||
dominoex::~dominoex()
|
||||
{
|
||||
if (hilbert) delete hilbert;
|
||||
|
@ -609,43 +657,8 @@ int dominoex::tx_process()
|
|||
unsigned char dominoex::MuPskSec2Pri(int c)
|
||||
{
|
||||
if (c >= 'a' && c <= 'z') c -= 32;
|
||||
if (c == 'À' || c == 'Á' || c == 'Â' || c == 'Ã' || c == 'Ä' || c == 'Å' ||
|
||||
c == 'à' || c == 'á' || c == 'â' || c == 'ã' || c == 'ä' || c == 'å')
|
||||
c = 'A';
|
||||
if (c == 'ß') c = 'B';
|
||||
if (c == 'Ç' || c == 'ç' || c == '©') c = 'C';
|
||||
if (c == 'Ð' || c == '°') c = 'D';
|
||||
if (c == 'Æ' || c == 'æ' || c == 'È' || c == 'É' || c == 'Ê' || c == 'Ë' ||
|
||||
c == 'è' || c == 'é' || c == 'ê' || c == 'ë')
|
||||
c = 'E';
|
||||
if (c == 'ƒ') c = 'F';
|
||||
if (c == 'Ì' || c == 'Í' || c == 'Î' || c == 'Ï' || c == 'ì' || c == 'í' ||
|
||||
c == 'î' || c == 'ï' || c == '¡')
|
||||
c = 'I';
|
||||
if (c == '£') c = 'L';
|
||||
if (c == 'Ñ' || c == 'ñ') c = 'N';
|
||||
if (c == 'ô' || c == 'ö' || c == 'ò' || c == 'Ö' || c == 'ó' ||
|
||||
c == 'Ó' || c == 'Ô' || c == 'Ò' || c == 'õ' || c == 'Õ')
|
||||
c = 'O';
|
||||
if (c == '®') c = 'R';
|
||||
if (c == 'Ù' || c == 'Ú' || c == 'Û' || c == 'Ü' ||
|
||||
c == 'ù' || c == 'ú' || c == 'û' || c == 252)
|
||||
if (c == 'ü' || c == 'û' || c == 'ù' || c == 'Ü' ||
|
||||
c == 'ú' || c == 'Ú' || c == 'Û' || c == 'Ù')
|
||||
c = 'U';
|
||||
if (c == '×') c = 'X';
|
||||
if (c == 'ÿ' || c == 'ý' || c == 'Ý') c = 'Y';
|
||||
if (c == 'Ø') c = '0';
|
||||
if (c == '¹') c = '1';
|
||||
if (c == '²') c = '2';
|
||||
if (c == '³') c = '3';
|
||||
if (c == '¿') c = '?';
|
||||
if (c == '¡') c = '!';
|
||||
if (c == '«') c = '<';
|
||||
if (c == '»') c = '>';
|
||||
if (c == '{') c = '(';
|
||||
if (c == '}') c = ')';
|
||||
if (c == '|') c = '\\';
|
||||
|
||||
c = mupsksec2pri.find(c) != mupsksec2pri.end() ? mupsksec2pri[c] : c;
|
||||
|
||||
if (c >= 'A' && c <= 'Z') c = c - 'A' + 127;
|
||||
else if (c >= '0' && c <= '9') c = c - '0' + 14;
|
||||
|
@ -710,19 +723,14 @@ void dominoex::decodeMuPskSymbol(unsigned char symbol)
|
|||
}
|
||||
}
|
||||
|
||||
void dominoex::MuPskSoftdecode(complex *bins)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void dominoex::decodeMuPskEX(int ch)
|
||||
{
|
||||
unsigned char symbols[4];
|
||||
int c = ch;
|
||||
|
||||
for (int i = 0; i < 4; i++) {
|
||||
if (c & 1 == 1) symbols[3-i] = 255;
|
||||
else symbols[3-i] = -255;
|
||||
if ((c & 1) == 1) symbols[3-i] = 255;
|
||||
else symbols[3-i] = 1;//-255;
|
||||
c = c / 2;
|
||||
}
|
||||
|
||||
|
|
|
@ -154,14 +154,13 @@ private:
|
|||
// Rx
|
||||
unsigned int MuPskPriSecChar(unsigned int c);
|
||||
void decodeMuPskSymbol(unsigned char symbol);
|
||||
void MuPskSoftdecode(complex *bins);
|
||||
void decodeMuPskEX(int c);
|
||||
// Tx
|
||||
unsigned char MuPskSec2Pri(int c);
|
||||
void sendMuPskEX(unsigned char c, int secondary);
|
||||
void MuPskClearbits();
|
||||
void MuPskFlushTx();
|
||||
|
||||
void MuPsk_sec2pri_init(void);
|
||||
public:
|
||||
dominoex (trx_mode md);
|
||||
~dominoex ();
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
#include "rigclass.h"
|
||||
#endif
|
||||
|
||||
extern string appname;
|
||||
extern string HomeDir;
|
||||
extern string xmlfname;
|
||||
|
||||
|
|
|
@ -37,18 +37,19 @@
|
|||
#endif
|
||||
|
||||
class MixerException {
|
||||
public:
|
||||
char szError[80];
|
||||
int error;
|
||||
public:
|
||||
MixerException() { *szError = 0; error = 0; }
|
||||
MixerException(int e) {
|
||||
snprintf(szError, sizeof(szError), "Error: %d, %s", e, strerror(e));
|
||||
snprintf(szError, sizeof(szError), "Mixer error %d: %s", e, strerror(e));
|
||||
error = e;
|
||||
}
|
||||
MixerException(char *s) {
|
||||
snprintf(szError, sizeof(szError), "Error: %s", s);
|
||||
snprintf(szError, sizeof(szError), "Mixer error: %s", s);
|
||||
error = 1;
|
||||
}
|
||||
const char* what(void) const { return szError; }
|
||||
};
|
||||
|
||||
class MixerBase
|
||||
|
|
|
@ -74,6 +74,8 @@
|
|||
|
||||
using namespace std;
|
||||
|
||||
string appname;
|
||||
|
||||
string scDevice[2];
|
||||
|
||||
char szHomedir[120] = "";
|
||||
|
@ -123,6 +125,7 @@ void restore_streams(void);
|
|||
|
||||
int main(int argc, char ** argv)
|
||||
{
|
||||
appname = argv[0];
|
||||
debug_exec(argv);
|
||||
CREATE_THREAD_ID(); // only call this once
|
||||
SET_THREAD_ID(FLMAIN_TID);
|
||||
|
|
|
@ -175,6 +175,7 @@ mfsk::mfsk(trx_mode mfsk_mode) : modem()
|
|||
|
||||
startpic = false;
|
||||
abortxmt = false;
|
||||
stopflag = false;
|
||||
|
||||
bitshreg = 0;
|
||||
bitstate = 0;
|
||||
|
@ -1019,6 +1020,8 @@ void load_file(const char *n) {
|
|||
|
||||
// load the picture widget with the rgb image
|
||||
FL_LOCK_D();
|
||||
picTx->clear();
|
||||
picTxWin->redraw();
|
||||
picTx->video(xmtimg, W * H * 3);
|
||||
if (print_time_left(W * H * 3, txclr_tooltip, sizeof(txclr_tooltip), "Time needed: ") > 0)
|
||||
btnpicTxSendColor->tooltip(txclr_tooltip);
|
||||
|
|
|
@ -109,7 +109,7 @@ void status::saveLastState()
|
|||
scopeH = scopeview->h();
|
||||
}
|
||||
|
||||
Fl_Preferences spref(string(HomeDir).append(STATUS_FILENAME).c_str(), "w1hkj.com", 0);
|
||||
Fl_Preferences spref(HomeDir.c_str(), "w1hkj.com", PACKAGE_TARNAME);
|
||||
|
||||
spref.set("version", PACKAGE_VERSION);
|
||||
|
||||
|
@ -152,8 +152,7 @@ void status::saveLastState()
|
|||
|
||||
void status::loadLastState()
|
||||
{
|
||||
Fl_Preferences spref(string(HomeDir).append(STATUS_FILENAME).c_str(), "w1hkj.com", 0);
|
||||
|
||||
Fl_Preferences spref(HomeDir.c_str(), "w1hkj.com", PACKAGE_TARNAME);
|
||||
char version[64]; version[sizeof(version)-1] = '\0';
|
||||
bLastStateRead = spref.get("version", version, "", sizeof(version)-1);
|
||||
// Skip loading the rest of the status variables if we didn't read a
|
||||
|
|
|
@ -331,7 +331,7 @@ int MT63encoder::Process(char code) // encode an ASCII character "code"
|
|||
{ int i,k;
|
||||
code&=CodeMask;
|
||||
for(i=0; i<DataCarriers; i++) WalshBuff[i]=0;
|
||||
if(code<DataCarriers) WalshBuff[code]=1.0;
|
||||
if(code<DataCarriers) WalshBuff[(int)code]=1.0;
|
||||
else WalshBuff[code-DataCarriers]=(-1.0);
|
||||
dspWalshInvTrans(WalshBuff,DataCarriers);
|
||||
if(IntlvLen)
|
||||
|
|
|
@ -83,7 +83,6 @@ void psk::rx_init()
|
|||
bitclk = 0;
|
||||
freqerr = 0.0;
|
||||
if (mailserver && progdefaults.PSKmailSweetSpot) sigsearch = SIGSEARCH;
|
||||
set_scope_mode(Digiscope::PHASE);
|
||||
put_MODEstatus(mode);
|
||||
}
|
||||
|
||||
|
@ -99,6 +98,7 @@ void psk::init()
|
|||
{
|
||||
modem::init();
|
||||
restart();
|
||||
set_scope_mode(Digiscope::PHASE);
|
||||
rx_init();
|
||||
}
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue