kopia lustrzana https://github.com/jamescoxon/dl-fldigi
RsID Multiple
* Added Macro <NRSID:[n]> where - n < 0 will cause |n| RsID bursts and exit from Tx - n > 0 will cause |n| RxID bursts and Tx continue - n == 0 will cause a single RxID burst and Tx continue - multiple RsID bursts are separated by an interval of 200 millisecondspull/1/head
rodzic
5aefacd221
commit
ede0fd89d6
|
@ -63,6 +63,7 @@ struct status {
|
|||
int timer;
|
||||
int timerMacro;
|
||||
std::string LastMacroFile;
|
||||
int n_rsids;
|
||||
|
||||
bool spot_recv;
|
||||
bool spot_log;
|
||||
|
|
|
@ -160,6 +160,7 @@ void loadBrowser(Fl_Widget *widget) {
|
|||
w->add(_("<TEXT>\tvideo text"));
|
||||
w->add(_("<TXRSID:on|off|t>\tTx RSID on,off,toggle"));
|
||||
w->add(_("<RXRSID:on|off|t>\tRx RSID on,off,toggle"));
|
||||
w->add(_("<NRSID:NN>\tTransmit |NN| successive RsID bursts"));
|
||||
w->add(_("<DTMF:[Wn:][Ln:]chrs>\t[Wait][Len](ms)"));
|
||||
|
||||
w->add(LINE_SEP);
|
||||
|
|
|
@ -431,6 +431,21 @@ static void pTUNE(std::string &s, size_t &i, size_t endbracket)
|
|||
s.replace(i, endbracket - i + 1, "");
|
||||
}
|
||||
|
||||
static void pNRSID(std::string &s, size_t &i, size_t endbracket)
|
||||
{
|
||||
if (within_exec) {
|
||||
s.replace(i, endbracket - i + 1, "");
|
||||
return;
|
||||
}
|
||||
int number = 0;
|
||||
std::string sNumber = s.substr(i+7, endbracket - i - 7);
|
||||
if (sNumber.length() > 0) {
|
||||
sscanf(sNumber.c_str(), "%d", &number);
|
||||
progStatus.n_rsids = number;
|
||||
}
|
||||
s.replace(i, endbracket - i + 1, "");
|
||||
}
|
||||
|
||||
static bool useWait = false;
|
||||
static int waitTime = 0;
|
||||
|
||||
|
@ -1948,6 +1963,7 @@ static const MTAGS mtags[] = {
|
|||
{"<IDLE:", pIDLE},
|
||||
{"<TUNE:", pTUNE},
|
||||
{"<WAIT:", pWAIT},
|
||||
{"<NRSID:", pNRSID},
|
||||
{"<MODEM>", pMODEM_compSKED},
|
||||
{"<MODEM:", pMODEM},
|
||||
{"<EXEC>", pEXEC},
|
||||
|
|
|
@ -120,6 +120,7 @@ status progStatus = {
|
|||
0, // int timer
|
||||
0, // int timerMacro
|
||||
"macros.mdf", // string LastMacroFile;
|
||||
0, // int n_rsids
|
||||
false, // bool spot_recv
|
||||
false, // bool spot_log
|
||||
false, // bool contest
|
||||
|
|
|
@ -314,33 +314,54 @@ void trx_trx_transmit_loop()
|
|||
active_modem->tx_init(scard);
|
||||
|
||||
if ((active_modem != null_modem &&
|
||||
active_modem != ssb_modem &&
|
||||
active_modem != wwv_modem ) &&
|
||||
progdefaults.TransmitRSid)
|
||||
ReedSolomon->send(true);
|
||||
|
||||
while (trx_state == STATE_TX) {
|
||||
if (active_modem != ssb_modem && !progdefaults.DTMFstr.empty())
|
||||
dtmf->send();
|
||||
try {
|
||||
if (active_modem->tx_process() < 0)
|
||||
trx_state = STATE_RX;
|
||||
}
|
||||
catch (const SndException& e) {
|
||||
scard->Close();
|
||||
LOG_ERROR("%s. line: %i", e.what(), __LINE__);
|
||||
put_status(e.what(), 5);
|
||||
MilliSleep(10);
|
||||
return;
|
||||
}
|
||||
active_modem != ssb_modem &&
|
||||
active_modem != wwv_modem ) &&
|
||||
(progdefaults.TransmitRSid || progStatus.n_rsids != 0)) {
|
||||
if (progStatus.n_rsids < 0) {
|
||||
for (int i = 0; i > progStatus.n_rsids; i--) {
|
||||
ReedSolomon->send(true);
|
||||
MilliSleep(200);
|
||||
}
|
||||
} else if ( progStatus.n_rsids > 0 ) {
|
||||
for (int i = 0; i < progStatus.n_rsids; i++) {
|
||||
ReedSolomon->send(true);
|
||||
MilliSleep(200);
|
||||
}
|
||||
MilliSleep(200);
|
||||
if (progStatus.n_rsids == 1) progStatus.n_rsids = 0;
|
||||
} else
|
||||
ReedSolomon->send(true);
|
||||
}
|
||||
|
||||
if (progStatus.n_rsids >= 0) {
|
||||
while (trx_state == STATE_TX) {
|
||||
if (active_modem != ssb_modem && !progdefaults.DTMFstr.empty())
|
||||
dtmf->send();
|
||||
try {
|
||||
if (active_modem->tx_process() < 0)
|
||||
trx_state = STATE_RX;
|
||||
}
|
||||
catch (const SndException& e) {
|
||||
scard->Close();
|
||||
LOG_ERROR("%s", e.what());
|
||||
put_status(e.what(), 5);
|
||||
MilliSleep(10);
|
||||
return;
|
||||
}
|
||||
}
|
||||
} else
|
||||
trx_state = STATE_RX;
|
||||
|
||||
if ((active_modem != null_modem &&
|
||||
active_modem != ssb_modem &&
|
||||
active_modem != wwv_modem ) &&
|
||||
progdefaults.TransmitRSid &&
|
||||
progdefaults.rsid_post)
|
||||
active_modem != ssb_modem &&
|
||||
active_modem != wwv_modem ) &&
|
||||
progdefaults.TransmitRSid &&
|
||||
progdefaults.rsid_post &&
|
||||
progStatus.n_rsids >= 0)
|
||||
ReedSolomon->send(false);
|
||||
|
||||
progStatus.n_rsids = 0;
|
||||
|
||||
trx_xmit_wfall_end(current_samplerate);
|
||||
|
||||
scard->flush();
|
||||
|
|
Ładowanie…
Reference in New Issue