kopia lustrzana https://github.com/jamescoxon/dl-fldigi
pskmail events
* changed INFO event reporting to be like DEBUG level report * added event reports to provide additional program flowpull/1/head
rodzic
e12a3733b3
commit
9b26ff6611
|
@ -1099,6 +1099,8 @@ void init_modem(trx_mode mode, int freq)
|
|||
{
|
||||
ENSURE_THREAD(FLMAIN_TID);
|
||||
|
||||
LOG_INFO("mode: %d, freq: %d", (int)mode, freq);
|
||||
|
||||
#if !BENCHMARK_MODE
|
||||
quick_change = 0;
|
||||
modem_config_tab = tabsModems->child(0);
|
||||
|
@ -1340,10 +1342,22 @@ void init_modem_sync(trx_mode m, int f)
|
|||
{
|
||||
ENSURE_THREAD(FLMAIN_TID);
|
||||
|
||||
if (trx_state != STATE_RX)
|
||||
TRX_WAIT(STATE_RX, abort_tx());
|
||||
if (trx_state != STATE_RX) {
|
||||
LOG_INFO("%s", "Waiting for STATE_RX");
|
||||
abort_tx();
|
||||
while (trx_state != STATE_RX)
|
||||
trx_wait_state();
|
||||
}
|
||||
|
||||
LOG_INFO("Call init_modem %d, %d", m, f);
|
||||
init_modem(m, f);
|
||||
|
||||
if (trx_state != STATE_RX) {
|
||||
LOG_INFO("%s","Waiting for state RX");
|
||||
while (trx_state != STATE_RX)
|
||||
trx_wait_state();
|
||||
}
|
||||
|
||||
TRX_WAIT(STATE_RX, init_modem(m, f));
|
||||
REQ_FLUSH(TRX_TID);
|
||||
}
|
||||
|
||||
|
|
|
@ -23,6 +23,8 @@
|
|||
#ifndef _DEBUG_H_
|
||||
#define _DEBUG_H_
|
||||
|
||||
#define DEBUG_PSKMAIL 0
|
||||
|
||||
#include "util.h"
|
||||
|
||||
class debug
|
||||
|
|
|
@ -125,10 +125,13 @@ string noctrl(string src)
|
|||
static string retstr;
|
||||
retstr.clear();
|
||||
char hexstr[10];
|
||||
int c;
|
||||
for (size_t i = 0; i < src.length(); i++) {
|
||||
if ( src[i] < 128) retstr.append(asc[(int)src[i]]);
|
||||
c = src[i];
|
||||
if ( c > 0 && c < 128)
|
||||
retstr.append(asc[c]);
|
||||
else {
|
||||
snprintf(hexstr, sizeof(hexstr), "<%0X>", src[i]);
|
||||
snprintf(hexstr, sizeof(hexstr), "<%0X>", c & 0xFF);
|
||||
retstr.append(hexstr);
|
||||
}
|
||||
}
|
||||
|
@ -228,6 +231,9 @@ static string strSubCmd;
|
|||
|
||||
if (toparse.empty()) return;
|
||||
|
||||
if (DEBUG_PSKMAIL)
|
||||
LOG_INFO("Arq text: %s", noctrl(toparse).c_str());
|
||||
else
|
||||
LOG_VERBOSE("Arq text: %s", noctrl(toparse).c_str());
|
||||
|
||||
idxCmd = toparse.find("<cmd>");
|
||||
|
@ -627,6 +633,12 @@ void WriteARQsocket(unsigned char* data, size_t len)
|
|||
arqclient.erase(p);
|
||||
}
|
||||
}
|
||||
|
||||
string outs = "";
|
||||
for (unsigned int i = 0; i < len; i++)
|
||||
outs += asc[data[i] & 0x7F];
|
||||
LOG_INFO("%s", outs.c_str());
|
||||
|
||||
if (arqclient.empty()) arq_reset();
|
||||
}
|
||||
|
||||
|
@ -722,8 +734,12 @@ bool Socket_arqRx()
|
|||
active_modem->set_freq(progdefaults.PSKsweetspot);
|
||||
start_tx();
|
||||
} else {
|
||||
arqtext.append(txstring); //assign(txstring);
|
||||
arqtext.append(txstring);
|
||||
LOG_INFO("Appended tx text: %s", noctrl(txstring).c_str());
|
||||
if (trx_state != STATE_TX) {
|
||||
LOG_INFO("%s","Restarting TX");
|
||||
start_tx();
|
||||
}
|
||||
}
|
||||
txstring.clear();
|
||||
|
||||
|
|
|
@ -170,7 +170,7 @@ void debug::log(level_e level, const char* func, const char* srcf, int line, con
|
|||
if (!inst)
|
||||
return;
|
||||
|
||||
if (unlikely(debug::level == DEBUG_LEVEL)) {
|
||||
if (unlikely(debug::level == DEBUG_LEVEL) || DEBUG_PSKMAIL) {
|
||||
time_t t = time(NULL);
|
||||
struct tm stm;
|
||||
(void)localtime_r(&t, &stm);
|
||||
|
|
Ładowanie…
Reference in New Issue