mirror of
https://github.com/lwvmobile/dsd-fme.git
synced 2026-11-12 08:47:24 -05:00
Event History Setup: #287
P25p2: Misc Tweaks for Harris Things; Misc Event History P2 Tweaks;
This commit is contained in:
@@ -506,7 +506,9 @@ void l3h_embedded_alias_decode (dsd_opts * opts, dsd_state * state, uint8_t slot
|
||||
if (slot == 1 && state->lasttgR != 0) ttg = state->lasttgR;
|
||||
|
||||
int8_t ptr = 0;
|
||||
fprintf (stderr, " TG: %d; SRC: %d; Talker Alias: ", ttg, tsrc);
|
||||
if (tsrc != 0)
|
||||
fprintf (stderr, " TG: %d; SRC: %d; Talker Alias: ", ttg, tsrc);
|
||||
else fprintf (stderr, " TG: UNK; SRC: UNK; Talker Alias: ");
|
||||
for (int8_t i = 4; i <= len; i++)
|
||||
{
|
||||
if ( (input[i] > 0x19) && (input[i] < 0x7F) )
|
||||
@@ -526,7 +528,7 @@ void l3h_embedded_alias_decode (dsd_opts * opts, dsd_state * state, uint8_t slot
|
||||
//assign completed talker to a more useful string instead
|
||||
snprintf (str, ptr+1, "%s", ttemp);
|
||||
|
||||
if (state->event_history_s[slot].Event_History_Items[0].source_id == tsrc)
|
||||
if (state->event_history_s[slot].Event_History_Items[0].source_id == tsrc && tsrc != 0)
|
||||
sprintf (state->event_history_s[slot].Event_History_Items[0].alias, "%s", str);
|
||||
|
||||
//The Duke Energy system may relay two src values, may be a good idea to pick one and stick with it
|
||||
|
||||
@@ -381,10 +381,10 @@ void nmea_harris (dsd_opts * opts, dsd_state * state, uint8_t * input, uint32_t
|
||||
else fprintf (stderr, " Last Fix;");
|
||||
|
||||
//save to ncurses string
|
||||
sprintf (state->dmr_embedded_gps[slot], "GPS: (%f%s, %f%s)", latitude, deg_glyph, longitude, deg_glyph);
|
||||
sprintf (state->dmr_embedded_gps[slot], "(%f%s, %f%s)", latitude, deg_glyph, longitude, deg_glyph);
|
||||
|
||||
//save to event history string
|
||||
if (state->event_history_s[slot].Event_History_Items[0].source_id == src)
|
||||
if (state->event_history_s[slot].Event_History_Items[0].source_id == src && src != 0)
|
||||
sprintf (state->event_history_s[slot].Event_History_Items[0].gps_s, "%s", state->dmr_embedded_gps[slot]);
|
||||
|
||||
//save to LRRP report for mapping/logging
|
||||
|
||||
@@ -1634,11 +1634,11 @@
|
||||
}
|
||||
|
||||
//push a DSD-FME started event so users can see what this section does, and also gives users an idea of when context started
|
||||
state->event_history_s[0].Event_History_Items[0].color_pair = 6;
|
||||
state->event_history_s[0].Event_History_Items[0].color_pair = 4;
|
||||
watchdog_event_datacall (opts, state, 0, 0, "Any decoded voice calls or data calls display here;", 0);
|
||||
push_event_history (&state->event_history_s[0]);
|
||||
init_event_history (&state->event_history_s[0], 0, 1);
|
||||
state->event_history_s[0].Event_History_Items[0].color_pair = 6;
|
||||
state->event_history_s[0].Event_History_Items[0].color_pair = 4;
|
||||
watchdog_event_datacall (opts, state, 0, 0, "DSD-FME Started and Event History Initialized;", 0);
|
||||
push_event_history (&state->event_history_s[0]);
|
||||
init_event_history (&state->event_history_s[0], 0, 1);
|
||||
|
||||
@@ -1760,6 +1760,9 @@ void process_MAC_VPDU(dsd_opts * opts, dsd_state * state, int type, unsigned lon
|
||||
fprintf (stderr, "%02llX", MAC[i+len_a]);
|
||||
}
|
||||
|
||||
//assign here so we don't read an extra opcode value, like MAC Release on FL-DCC-1 (0x31 opcode)
|
||||
len_b = len;
|
||||
|
||||
}
|
||||
|
||||
//This is now confirmed to have the Harris Talker GPS, but the structure is unusual compared to other MFID messages,
|
||||
@@ -2067,6 +2070,12 @@ void process_MAC_VPDU(dsd_opts * opts, dsd_state * state, int type, unsigned lon
|
||||
fprintf (stderr, "MFID90 Group Regroup Voice");
|
||||
state->gi[slot] = 0;
|
||||
|
||||
|
||||
uint32_t mfid90_wacn = (MAC[10+len_a] << 16) | (MAC[11+len_a] << 8) | (MAC[12+len_a] & 0xF0);
|
||||
mfid90_wacn >>= 4;
|
||||
uint16_t mfid90_sys = ((MAC[12+len_a] << 16) & 0x0F00)| (MAC[12+len_a] << 8);
|
||||
fprintf (stderr, " EXT - FQSUID: %05X:%03X.%d", mfid90_wacn, mfid90_sys, src);
|
||||
|
||||
if (slot == 0)
|
||||
{
|
||||
state->lasttg = gr;
|
||||
|
||||
Reference in New Issue
Block a user