More NCurses Tweaks

More NCurses Tweaks
--Clarify extra call and data information lines
--Add Data SRC and TGT to NCurses for LRRP and other things
--OCD nitpicks
This commit is contained in:
lwvmobile
2022-05-03 07:54:45 -04:00
committed by GitHub
parent ab873d3821
commit ea40e3e3b7
2 changed files with 18 additions and 9 deletions

View File

@@ -225,7 +225,7 @@ void Process34Data(dsd_opts * opts, dsd_state * state, unsigned char tdibits[98]
//LRRP //LRRP
if ( (state->dmr_34_rate_sf[slot][0] & 0x7F) == 0x45) //Start LRRP now if ( (state->dmr_34_rate_sf[slot][0] & 0x7F) == 0x45) //Start LRRP now
{ {
sprintf ( state->dmr_lrrp[state->currentslot][0], "LRRP - "); //sprintf ( state->dmr_lrrp[state->currentslot][0], "LRRP - ");
fprintf (stderr, "%s ", KMAG); fprintf (stderr, "%s ", KMAG);
//fprintf (stderr, "\n IP4 Header"); //Not sure this is accurate info IP4 Header? //fprintf (stderr, "\n IP4 Header"); //Not sure this is accurate info IP4 Header?
//fprintf (stderr, "\n Data Blocks [%d]", state->dmr_34_rate_sf[5]); //fprintf (stderr, "\n Data Blocks [%d]", state->dmr_34_rate_sf[5]);
@@ -454,7 +454,12 @@ void ProcessDataData(dsd_opts * opts, dsd_state * state, uint8_t info[196], uint
fprintf (stderr, " %d.%d.%d.%d", (DmrDataByte[4] & 0x3F), DmrDataByte[5], DmrDataByte[6], DmrDataByte[7]); //not sure if these are right or not fprintf (stderr, " %d.%d.%d.%d", (DmrDataByte[4] & 0x3F), DmrDataByte[5], DmrDataByte[6], DmrDataByte[7]); //not sure if these are right or not
fprintf (stderr, "[%d]", (DmrDataByte[5] <<16 ) + (DmrDataByte[6] <<8 ) + DmrDataByte[7] ); fprintf (stderr, "[%d]", (DmrDataByte[5] <<16 ) + (DmrDataByte[6] <<8 ) + DmrDataByte[7] );
} }
if (1 == 1) //already setting by current slot, no need for checking first
{
sprintf ( state->dmr_lrrp[state->currentslot][1], "SRC [%d] TGT [%d] ",
( (DmrDataByte[2] <<16 ) + (DmrDataByte[3] << 8) + DmrDataByte[4]),
( (DmrDataByte[5] <<16 ) + (DmrDataByte[6] <<8 ) + DmrDataByte[7]) );
}
if (DmrDataByte[0] == 0x01) if (DmrDataByte[0] == 0x01)
{ {
fprintf (stderr, "\n LRRP Control ACK - "); fprintf (stderr, "\n LRRP Control ACK - ");
@@ -1173,7 +1178,7 @@ void Process12Data(dsd_opts * opts, dsd_state * state, uint8_t info[196], uint8_
//LRRP //LRRP
if ( (state->dmr_12_rate_sf[slot][0] & 0x7F) == 0x45) //Start LRRP now if ( (state->dmr_12_rate_sf[slot][0] & 0x7F) == 0x45) //Start LRRP now
{ {
sprintf ( state->dmr_lrrp[state->currentslot][0], "LRRP - "); //sprintf ( state->dmr_lrrp[state->currentslot][0], "LRRP - ");
fprintf (stderr, "%s ", KMAG); fprintf (stderr, "%s ", KMAG);
//fprintf (stderr, "\n IP4 Header"); //Not sure this is accurate info IP4 Header? //fprintf (stderr, "\n IP4 Header"); //Not sure this is accurate info IP4 Header?
//fprintf (stderr, "\n Data Blocks [%d]", state->dmr_34_rate_sf[5]); //fprintf (stderr, "\n Data Blocks [%d]", state->dmr_34_rate_sf[5]);

View File

@@ -199,14 +199,14 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state)
{ {
for (short i = 0; i < 6; i++) for (short i = 0; i < 6; i++)
{ {
//sprintf (state->dmr_lrrp[0][i], ""); sprintf (state->dmr_lrrp[0][i], "");
} }
} }
if (state->dmrburstR == 16 || state->carrier == 0) if (state->dmrburstR == 16 || state->carrier == 0)
{ {
for (short i = 0; i < 6; i++) for (short i = 0; i < 6; i++)
{ {
//sprintf (state->dmr_lrrp[1][i], ""); sprintf (state->dmr_lrrp[1][i], "");
} }
} }
@@ -624,7 +624,8 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state)
printw ("FID: [%02X] SVC: [%02X] ", state->dmr_fid, state->dmr_so); printw ("FID: [%02X] SVC: [%02X] ", state->dmr_fid, state->dmr_so);
printw ("%s ", DMRBusrtTypes[state->dmrburstL]); printw ("%s ", DMRBusrtTypes[state->dmrburstL]);
printw ("\n"); printw ("\n");
printw ("| | "); //10 spaces //printw ("| | "); //10 spaces
printw ("| V XTRA | "); //10 spaces
//Burger King //Burger King
if(state->dmrburstL == 16 && state->payload_mi == 0 && (state->dmr_so & 0xCF) == 0x40) //4F or CF mask? if(state->dmrburstL == 16 && state->payload_mi == 0 && (state->dmr_so & 0xCF) == 0x40) //4F or CF mask?
{ {
@@ -673,7 +674,8 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state)
} }
printw ("\n"); printw ("\n");
//Alias Blocks and Embedded GPS //Alias Blocks and Embedded GPS
printw ("| | "); //10 spaces //printw ("| | "); //10 spaces
printw ("| D XTRA | ");
if(state->dmrburstL == 16) //only during call if(state->dmrburstL == 16) //only during call
{ {
attron(COLOR_PAIR(5)); attron(COLOR_PAIR(5));
@@ -722,7 +724,8 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state)
printw ("FID: [%02X] SVC: [%02X] ", state->dmr_fidR, state->dmr_soR); printw ("FID: [%02X] SVC: [%02X] ", state->dmr_fidR, state->dmr_soR);
printw ("%s ", DMRBusrtTypes[state->dmrburstR]); printw ("%s ", DMRBusrtTypes[state->dmrburstR]);
printw ("\n"); printw ("\n");
printw ("| | "); //12 spaces //printw ("| | "); //12 spaces
printw ("| V XTRA | "); //10 spaces
//Burger King 2 //Burger King 2
if(state->dmrburstR == 16 && state->payload_miR == 0 && (state->dmr_soR & 0xCF) == 0x40) //4F or CF mask? if(state->dmrburstR == 16 && state->payload_miR == 0 && (state->dmr_soR & 0xCF) == 0x40) //4F or CF mask?
@@ -772,7 +775,8 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state)
} }
printw ("\n"); printw ("\n");
//Alias Blocks and Embedded GPS //Alias Blocks and Embedded GPS
printw ("| | "); //10 spaces //printw ("| | ");
printw ("| D XTRA | ");
if(state->dmrburstR == 16) //only during call if(state->dmrburstR == 16) //only during call
{ {
attron(COLOR_PAIR(5)); attron(COLOR_PAIR(5));