minor fixes of some prints; fix NMT message counter bug

This commit is contained in:
Andreas Eversberg 2018-12-23 19:44:05 +01:00
parent ea5e17a036
commit 5311f44daa
5 changed files with 12 additions and 9 deletions

View File

@ -657,7 +657,7 @@ void amps_go_idle(amps_t *amps)
frame_length = 247; /* bits after sync (RECC) */ frame_length = 247; /* bits after sync (RECC) */
amps_set_dsp_mode(amps, DSP_MODE_FRAME_RX_FRAME_TX, frame_length); amps_set_dsp_mode(amps, DSP_MODE_FRAME_RX_FRAME_TX, frame_length);
} else { } else {
PDEBUG_CHAN(DAMPS, DEBUG_INFO, "Entering IDLE state, sending test tone on %s.\n", chan_type_long_name(amps->chan_type)); PDEBUG_CHAN(DAMPS, DEBUG_INFO, "Entering IDLE state (sending silence / no RF) on %s.\n", chan_type_long_name(amps->chan_type));
amps_set_dsp_mode(amps, DSP_MODE_OFF, 0); amps_set_dsp_mode(amps, DSP_MODE_OFF, 0);
} }
} }

View File

@ -174,8 +174,8 @@ void nmt_country_list(int nmt_system)
int ch_from = 0, ch_to = 0; int ch_from = 0, ch_to = 0;
char ch_string[256]; char ch_string[256];
printf("TA from\tTA to\tYY Code\tChannels\t\tShort\tCountry (Provider)\n"); printf("TA from\tTA to\tYY Code\tChannels\t\t\tShort\tCountry (Provider)\n");
printf("------------------------------------------------------------------------------------------------\n"); printf("--------------------------------------------------------------------------------------------------------\n");
for (i = 0; nmt_country[i].short_name; i++) { for (i = 0; nmt_country[i].short_name; i++) {
if (nmt_system != nmt_country[i].system) if (nmt_system != nmt_country[i].system)
continue; continue;
@ -197,6 +197,7 @@ void nmt_country_list(int nmt_system)
else else
printf("\n"); printf("\n");
} }
printf("\nFor listing channels of the NMT %d system use '-N %d' as first option.\n", 1350 - nmt_system, 1350 - nmt_system);
} }
int nmt_country_by_short_name(int nmt_system, const char *short_name) int nmt_country_by_short_name(int nmt_system, const char *short_name)

View File

@ -140,11 +140,11 @@ static struct nmt_channels {
const char *short_name; const char *short_name;
const char *long_name; const char *long_name;
} nmt_channels[] = { } nmt_channels[] = {
{ 0, CHAN_TYPE_CC, "CC", "calling channel (incomming calls)" }, { 0, CHAN_TYPE_CC, "CC", "calling channel (calls to mobile)" },
{ 900, CHAN_TYPE_CCA, "CCA", "calling channel for group A mobiles with odd secret key (incomming calls)" }, { 900, CHAN_TYPE_CCA, "CCA", "calling channel for group A mobiles with odd secret key (calls to mobile)" },
{ 900, CHAN_TYPE_CCB, "CCB", "calling channel for group B mobiles with even secret key (incomming calls)" }, { 900, CHAN_TYPE_CCB, "CCB", "calling channel for group B mobiles with even secret key (calls to mobile)" },
{ 0, CHAN_TYPE_TC, "TC", "traffic channel (outgoing calls)" }, { 0, CHAN_TYPE_TC, "TC", "traffic channel (calls from mobile)" },
{ 900, CHAN_TYPE_AC_TC, "AC/TC","combined access & traffic channel (outgoing calls)" }, { 900, CHAN_TYPE_AC_TC, "AC/TC","combined access & traffic channel (calls from mobile)" },
{ 0, CHAN_TYPE_CC_TC, "CC/TC","combined calling & traffic channel (both way calls)" }, { 0, CHAN_TYPE_CC_TC, "CC/TC","combined calling & traffic channel (both way calls)" },
{ 0, CHAN_TYPE_TEST, "TEST", "test channel" }, { 0, CHAN_TYPE_TEST, "TEST", "test channel" },
{ 0, 0, NULL, NULL } { 0, 0, NULL, NULL }
@ -1078,6 +1078,7 @@ static void tx_mt_channel(nmt_t *nmt, frame_t *frame)
} else } else
PDEBUG_CHAN(DNMT, DEBUG_NOTICE, "Staying on CC/TC channel #%d.\n", tc->sender.kanal); PDEBUG_CHAN(DNMT, DEBUG_NOTICE, "Staying on CC/TC channel #%d.\n", tc->sender.kanal);
nmt_new_state(tc, STATE_MT_IDENT); nmt_new_state(tc, STATE_MT_IDENT);
tc->tx_frame_count = 0;
/* assign channel on 'nmt' to 'tc' */ /* assign channel on 'nmt' to 'tc' */
frame->mt = NMT_MESSAGE_2b; frame->mt = NMT_MESSAGE_2b;

View File

@ -550,7 +550,7 @@ void r2000_go_idle(r2000_t *r2000)
PDEBUG_CHAN(DR2000, DEBUG_INFO, "Entering IDLE state, no transmission at relais %d on %s.\n", r2000->sysinfo.relais, chan_type_long_name(r2000->sysinfo.chan_type)); PDEBUG_CHAN(DR2000, DEBUG_INFO, "Entering IDLE state, no transmission at relais %d on %s.\n", r2000->sysinfo.relais, chan_type_long_name(r2000->sysinfo.chan_type));
r2000_set_dsp_mode(r2000, DSP_MODE_OFF, -1); r2000_set_dsp_mode(r2000, DSP_MODE_OFF, -1);
} else { } else {
PDEBUG_CHAN(DR2000, DEBUG_INFO, "Entering IDLE state, sending idle frames of relais %d on %s.\n", r2000->sysinfo.relais, chan_type_long_name(r2000->sysinfo.chan_type)); PDEBUG_CHAN(DR2000, DEBUG_INFO, "Entering IDLE state, sending idle frames at relais %d on %s.\n", r2000->sysinfo.relais, chan_type_long_name(r2000->sysinfo.chan_type));
r2000_set_dsp_mode(r2000, DSP_MODE_FRAME, (r2000->sender.loopback) ? r2000_encode_super(r2000) : -1); r2000_set_dsp_mode(r2000, DSP_MODE_FRAME, (r2000->sender.loopback) ? r2000_encode_super(r2000) : -1);
} }
r2000_new_state(r2000, STATE_IDLE); r2000_new_state(r2000, STATE_IDLE);

View File

@ -3,6 +3,7 @@
#include "image.h" #include "image.h"
const char *image[] = { const char *image[] = {
"",
" @B(@g#@B)", " @B(@g#@B)",
" @g#", " @g#",
" #", " #",