From 5311f44daa75a3aee58c7b5e5759a67bbceddd1a Mon Sep 17 00:00:00 2001 From: Andreas Eversberg Date: Sun, 23 Dec 2018 19:44:05 +0100 Subject: minor fixes of some prints; fix NMT message counter bug --- src/amps/amps.c | 2 +- src/nmt/countries.c | 5 +++-- src/nmt/nmt.c | 11 ++++++----- src/r2000/r2000.c | 2 +- src/tacs/image.c | 1 + 5 files changed, 12 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/amps/amps.c b/src/amps/amps.c index 38bec7b..e9adeed 100644 --- a/src/amps/amps.c +++ b/src/amps/amps.c @@ -657,7 +657,7 @@ void amps_go_idle(amps_t *amps) frame_length = 247; /* bits after sync (RECC) */ amps_set_dsp_mode(amps, DSP_MODE_FRAME_RX_FRAME_TX, frame_length); } 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); } } diff --git a/src/nmt/countries.c b/src/nmt/countries.c index 2ca935d..8812319 100644 --- a/src/nmt/countries.c +++ b/src/nmt/countries.c @@ -174,8 +174,8 @@ void nmt_country_list(int nmt_system) int ch_from = 0, ch_to = 0; char ch_string[256]; - printf("TA from\tTA to\tYY Code\tChannels\t\tShort\tCountry (Provider)\n"); - printf("------------------------------------------------------------------------------------------------\n"); + printf("TA from\tTA to\tYY Code\tChannels\t\t\tShort\tCountry (Provider)\n"); + printf("--------------------------------------------------------------------------------------------------------\n"); for (i = 0; nmt_country[i].short_name; i++) { if (nmt_system != nmt_country[i].system) continue; @@ -197,6 +197,7 @@ void nmt_country_list(int nmt_system) else 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) diff --git a/src/nmt/nmt.c b/src/nmt/nmt.c index 38a6d08..81e8fd2 100644 --- a/src/nmt/nmt.c +++ b/src/nmt/nmt.c @@ -140,11 +140,11 @@ static struct nmt_channels { const char *short_name; const char *long_name; } nmt_channels[] = { - { 0, CHAN_TYPE_CC, "CC", "calling channel (incomming calls)" }, - { 900, CHAN_TYPE_CCA, "CCA", "calling channel for group A mobiles with odd secret key (incomming calls)" }, - { 900, CHAN_TYPE_CCB, "CCB", "calling channel for group B mobiles with even secret key (incomming calls)" }, - { 0, CHAN_TYPE_TC, "TC", "traffic channel (outgoing calls)" }, - { 900, CHAN_TYPE_AC_TC, "AC/TC","combined access & traffic channel (outgoing 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 (calls to mobile)" }, + { 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 (calls from mobile)" }, + { 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_TEST, "TEST", "test channel" }, { 0, 0, NULL, NULL } @@ -1078,6 +1078,7 @@ static void tx_mt_channel(nmt_t *nmt, frame_t *frame) } else PDEBUG_CHAN(DNMT, DEBUG_NOTICE, "Staying on CC/TC channel #%d.\n", tc->sender.kanal); nmt_new_state(tc, STATE_MT_IDENT); + tc->tx_frame_count = 0; /* assign channel on 'nmt' to 'tc' */ frame->mt = NMT_MESSAGE_2b; diff --git a/src/r2000/r2000.c b/src/r2000/r2000.c index 16f2087..8baf8da 100644 --- a/src/r2000/r2000.c +++ b/src/r2000/r2000.c @@ -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)); r2000_set_dsp_mode(r2000, DSP_MODE_OFF, -1); } 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_new_state(r2000, STATE_IDLE); diff --git a/src/tacs/image.c b/src/tacs/image.c index d4e22a1..949b068 100644 --- a/src/tacs/image.c +++ b/src/tacs/image.c @@ -3,6 +3,7 @@ #include "image.h" const char *image[] = { + "", " @B(@g#@B)", " @g#", " #", -- cgit v1.2.3