Moto Alias Dump Function;

Misc Tweaks for displaying and writing various P25 Aliases to File and Ncurses for display;

Misc String Safety Tweaks on Aliases and writing to csv files / display;
This commit is contained in:
lwvmobile
2025-02-07 17:33:08 -05:00
parent 0cbf42e4e6
commit 6dd1410faf
6 changed files with 173 additions and 33 deletions

View File

@@ -1753,6 +1753,7 @@ void process_MAC_VPDU(dsd_opts * opts, dsd_state * state, int type, unsigned lon
if (len > 24)
len = 24; //should never exceed this len, but just in case it does
//(TODO: Move Alias to dsd_alias.c)
//Harris "Talker" Alias -- Not always in the SACCH, has been seen in the FACCH as well (before MAC_PTT)
if (MAC[1+len_a] == 0xA8) //1010 1000 (so, its opcode is 0x28, with the b = 0b10 value for manufacturer message?)
{
@@ -1763,12 +1764,17 @@ void process_MAC_VPDU(dsd_opts * opts, dsd_state * state, int type, unsigned lon
fprintf (stderr, "%c", (char)MAC[i+len_a]);
else fprintf (stderr, " ");
if ( (MAC[i+len_a] > 0x19) && (MAC[i+len_a] < 0x7F) )
state->dmr_alias_block_segment[slot][0][k/4][k%4] = MAC[i+len_a];
else state->dmr_alias_block_segment[slot][0][k/4][k%4] = 0x20;
//disabled, since we load this to the generic_talker_alias string now
// if ( (MAC[i+len_a] > 0x19) && (MAC[i+len_a] < 0x7F) )
// state->dmr_alias_block_segment[slot][0][k/4][k%4] = MAC[i+len_a];
// else state->dmr_alias_block_segment[slot][0][k/4][k%4] = 0x20;
if ( (MAC[i+len_a] > 0x19) && (MAC[i+len_a] < 0x7F) )
if (MAC[i+len_a] == 0x2C) //remove a comma if it exists, change it to a 0x2E dot
ttemp[k] = 0x2E;
else if ( (MAC[i+len_a] > 0x19) && (MAC[i+len_a] < 0x7F) )
ttemp[k] = MAC[i+len_a];
else if (MAC[i+len_a] != 0)
ttemp[k] = 0x20; //space
k++;
}