DMR PI Header, NCurses Tweaks, Fun Stuff

DMR PI Header, NCurses Tweaks, Fun Stuff
--Add PI Header handler, print DMR ALG, KEY, and MI values
--NCurses updates to reflect new DMR and NXDN info available
--Other Fun Stuff a.k.a. Stuff I might have broken or can't remember what I did now
This commit is contained in:
lwvmobile
2022-03-12 00:03:21 -05:00
committed by GitHub
parent 9f330e7902
commit 0fc9380b00
13 changed files with 274 additions and 140 deletions

View File

@@ -736,15 +736,17 @@ void NXDN_decode_VCALL(dsd_opts * opts, dsd_state * state, uint8_t * Message)
/* Print the "Call Type" */
//fprintf(stderr, "%s - ", NXDN_Call_Type_To_Str(CallType));
fprintf(stderr, "\n\t %s - ", NXDN_Call_Type_To_Str(CallType)); //line break 1 tab, 2 spaces start this string
sprintf (state->nxdn_call_type, NXDN_Call_Type_To_Str(CallType));
sprintf (state->nxdn_call_type, NXDN_Call_Type_To_Str(CallType)); //fix warning below
//warning: format not a string literal and no format arguments [-Wformat-security]
//state->nxdn_call_type = NXDN_Call_Type_To_Str(CallType);
/* Print the "Voice Call Option" */
NXDN_Voice_Call_Option_To_Str(VoiceCallOption, DuplexMode, TransmissionMode);
fprintf(stderr, "%s %s - ", DuplexMode, TransmissionMode);
state->nxdn_key = (KeyID & 0xFF);
state->nxdn_cipher_type = CipherType;
//state->nxdn_key = (KeyID & 0xFF);
//state->nxdn_cipher_type = CipherType;
/* Print the "Cipher Type" */
if(CipherType != 0)
{
@@ -761,13 +763,16 @@ void NXDN_decode_VCALL(dsd_opts * opts, dsd_state * state, uint8_t * Message)
/* Print Source ID and Destination ID (Talk Group or Unit ID) */
fprintf(stderr, "Src=%u - Dst/TG=%u ", SourceUnitID & 0xFFFF, DestinationID & 0xFFFF);
state->nxdn_last_tg = (DestinationID & 0xFFFF);
if(state->NxdnElementsContent.VCallCrcIsGood)
{
if ( (SourceUnitID & 0xFFFF) > 0 )
{
state->nxdn_last_rid = SourceUnitID & 0xFFFF; //only grab if CRC is okay
state->nxdn_last_rid = SourceUnitID & 0xFFFF; //only grab if CRC is okay
state->nxdn_last_tg = (DestinationID & 0xFFFF);
state->nxdn_key = (KeyID & 0xFF);
state->nxdn_cipher_type = CipherType;
}
fprintf(stderr, " (OK) - ");
}