From 5c733c06608f7dba0bc4840390cd257138d11500 Mon Sep 17 00:00:00 2001 From: lwvmobile Date: Mon, 19 Dec 2022 05:30:48 -0500 Subject: [PATCH] Remus Ncurses Call String Stuff; --- src/dmr_flco.c | 58 ++++++++++++++++++++++++++++++++++++++++------- src/dsd_main.c | 4 ++-- src/dsd_ncurses.c | 16 +++++++++---- 3 files changed, 64 insertions(+), 14 deletions(-) diff --git a/src/dmr_flco.c b/src/dmr_flco.c index 1b4f9d3..bdeb596 100644 --- a/src/dmr_flco.c +++ b/src/dmr_flco.c @@ -164,10 +164,12 @@ void dmr_flco (dsd_opts * opts, dsd_state * state, uint8_t lc_bits[], uint32_t C if(so & 0x40) { + //REMUS! Uncomment Line Below if desired // strcat (state->call_string[slot], " Encrypted"); fprintf (stderr, "%s", KRED); fprintf(stderr, "Encrypted "); } + //REMUS! Uncomment Line Below if desired // else strcat (state->call_string[slot], " "); /* Check the "Service Option" bits */ @@ -175,17 +177,57 @@ void dmr_flco (dsd_opts * opts, dsd_state * state, uint8_t lc_bits[], uint32_t C { /* Experimentally determined with DSD+, * is equal to 0x2, this is a TXI call */ - if((so & 0x30) == 0x20) fprintf(stderr, "TXI "); - else fprintf(stderr, "Reserved=%d ", (so & 0x30) >> 4); + if((so & 0x30) == 0x20) + { + //REMUS! Uncomment Line Below if desired + // strcat (state->call_string[slot], " TXI"); + fprintf(stderr, "TXI "); + } + else + { + //REMUS! Uncomment Line Below if desired + // strcat (state->call_string[slot], " RES"); + fprintf(stderr, "Reserved=%d ", (so & 0x30) >> 4); + } } - if(so & 0x08) fprintf(stderr, "Broadcast "); - if(so & 0x04) fprintf(stderr, "OVCM "); + if(so & 0x08) + { + //REMUS! Uncomment Line Below if desired + // strcat (state->call_string[slot], "-BC "); + fprintf(stderr, "Broadcast "); + } + if(so & 0x04) + { + //REMUS! Uncomment Line Below if desired + // strcat (state->call_string[slot], "-OVCM "); + fprintf(stderr, "OVCM "); + } if(so & 0x03) { - if((so & 0x03) == 0x01) fprintf(stderr, "Priority 1 "); - else if((so & 0x03) == 0x02) fprintf(stderr, "Priority 2 "); - else if((so & 0x03) == 0x03) fprintf(stderr, "Priority 3 "); - else fprintf(stderr, "No Priority "); /* We should never go here */ + if((so & 0x03) == 0x01) + { + //REMUS! Uncomment Line Below if desired + // strcat (state->call_string[slot], "-P1"); + fprintf(stderr, "Priority 1 "); + } + else if((so & 0x03) == 0x02) + { + //REMUS! Uncomment Line Below if desired + // strcat (state->call_string[slot], "-P2"); + fprintf(stderr, "Priority 2 "); + } + else if((so & 0x03) == 0x03) + { + //REMUS! Uncomment Line Below if desired + // strcat (state->call_string[slot], "-P3"); + fprintf(stderr, "Priority 3 "); + } + else /* We should never go here */ + { + //REMUS! Uncomment Line Below if desired + // strcat (state->call_string[slot], " "); + fprintf(stderr, "No Priority "); + } } fprintf(stderr, "Call "); diff --git a/src/dsd_main.c b/src/dsd_main.c index f439beb..2c9be9f 100644 --- a/src/dsd_main.c +++ b/src/dsd_main.c @@ -314,7 +314,7 @@ noCarrier (dsd_opts * opts, dsd_state * state) memset(state->dmr_embedded_gps, 0, sizeof(state->dmr_embedded_gps)); memset(state->dmr_lrrp_gps, 0, sizeof(state->dmr_lrrp_gps)); - //multi-purpose call_string + //REMUS! multi-purpose call_string sprintf (state->call_string[0], "%s", " "); //20 spaces sprintf (state->call_string[1], "%s", " "); //20 spaces @@ -797,7 +797,7 @@ initState (dsd_state * state) memset(state->dmr_embedded_gps, 0, sizeof(state->dmr_embedded_gps)); memset(state->dmr_lrrp_gps, 0, sizeof(state->dmr_lrrp_gps)); - //multi-purpose call_string + //REMUS! multi-purpose call_string sprintf (state->call_string[0], "%s", " "); //20 spaces sprintf (state->call_string[1], "%s", " "); //20 spaces diff --git a/src/dsd_ncurses.c b/src/dsd_ncurses.c index 8423fee..798db65 100644 --- a/src/dsd_ncurses.c +++ b/src/dsd_ncurses.c @@ -2306,10 +2306,14 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state) attroff(COLOR_PAIR(2)); attron(COLOR_PAIR(3)); } - printw ("FID: [%02X] SVC: [%02X] ", state->dmr_fid, state->dmr_so); + + //REMUS! THIS IS THE OLD ONE + // printw ("FID: [%02X] SVC: [%02X] ", state->dmr_fid, state->dmr_so); + //This is the new one + printw ("%s | ", state->call_string[0]); printw ("%s ", DMRBusrtTypes[state->dmrburstL]); printw ("\n"); - //printw ("| | "); //10 spaces + printw ("| V XTRA | "); //10 spaces if(state->dmrburstL == 16 && state->payload_algid == 0 && (state->dmr_so & 0xCF) == 0x40) //4F or CF mask? & 0xCF currently @@ -2497,10 +2501,14 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state) attroff(COLOR_PAIR(2)); attron(COLOR_PAIR(3)); } - printw ("FID: [%02X] SVC: [%02X] ", state->dmr_fidR, state->dmr_soR); + + //REMUS! THIS IS THE OLD ONE + // printw ("FID: [%02X] SVC: [%02X] ", state->dmr_fidR, state->dmr_soR); + //THIS IS THE NEW ONE + printw ("%s | ", state->call_string[1]); printw ("%s ", DMRBusrtTypes[state->dmrburstR]); printw ("\n"); - //printw ("| | "); //12 spaces + printw ("| V XTRA | "); //10 spaces if(state->dmrburstR == 16 && state->payload_algidR == 0 && (state->dmr_soR & 0xCF) == 0x40) //4F or CF mask?