Event History Setup: #287

Include a simple sh file to startup dsd-fme with opts line, and open log files for multi linux terminal support;

Fix bug with P25p1 MPDU Trunking Blocks setting address values to trigger event history watchdog;

Add an internal string into event history to log internal events of note (ENC LO, errors, etc);

Add a watchdog during any ENC LO event so the event_history will log the call with ENC LO;

Disable AHOY and RSP PDU's from Event History (clogs up the event history with extra info);

Fix DMR p_clear trigger to zero out src and tg values when tuning away;

Fix Hytera Enhanced RC4 (verified working); Misc Tweaks Regarding;
This commit is contained in:
lwvmobile
2025-05-06 21:19:11 -04:00
parent 68d959cb7a
commit 1532fdcc8e
13 changed files with 240 additions and 41 deletions

View File

@@ -3000,8 +3000,8 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state)
{
attron(COLOR_PAIR(1));
printw("Hytera Enhanced");
// if (state->R != 0)
// printw(" Key: %010X", state->R);
if (state->R != 0)
printw(" Key: %010llX", state->R);
attron(COLOR_PAIR(3));
}
@@ -3175,8 +3175,8 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state)
{
attron(COLOR_PAIR(1));
printw("Hytera Enhanced");
// if (state->RR != 0)
// printw(" Key: %010X", state->RR);
if (state->RR != 0)
printw(" Key: %010llX", state->RR);
attron(COLOR_PAIR(3));
}
@@ -3517,6 +3517,10 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state)
if (strncmp(text_string, state->event_history_s[slot].Event_History_Items[i%255].gps_s, 13) != 0)
printw ("| GPS: %s \n", state->event_history_s[slot].Event_History_Items[i%255].gps_s);
sprintf (text_string, "%s", "BUMBLEBEETUNA");
if (strncmp(text_string, state->event_history_s[slot].Event_History_Items[i%255].internal_str, 13) != 0)
printw ("| DSD-FME: %s \n", state->event_history_s[slot].Event_History_Items[i%255].internal_str);
}
printw ("------------------------------------------------------------------------------\n");
attroff(COLOR_PAIR(4)); //cyan for history
@@ -4427,6 +4431,7 @@ void init_event_history (Event_History_I * event_struct, uint8_t start, uint8_t
sprintf (event_struct->Event_History_Items[i].gps_s, "%s", "BUMBLEBEETUNA");
sprintf (event_struct->Event_History_Items[i].text_message, "%s", "BUMBLEBEETUNA");
sprintf (event_struct->Event_History_Items[i].event_string, "%s", "BUMBLEBEETUNA");
sprintf (event_struct->Event_History_Items[i].internal_str, "%s", "BUMBLEBEETUNA");
}
}
@@ -4467,6 +4472,7 @@ void push_event_history (Event_History_I * event_struct)
sprintf (event_struct->Event_History_Items[i].gps_s, "%s", event_struct->Event_History_Items[i-1].gps_s);
sprintf (event_struct->Event_History_Items[i].text_message, "%s", event_struct->Event_History_Items[i-1].text_message);
sprintf (event_struct->Event_History_Items[i].event_string, "%s", event_struct->Event_History_Items[i-1].event_string);
sprintf (event_struct->Event_History_Items[i].internal_str, "%s", event_struct->Event_History_Items[i-1].internal_str);
}
}
@@ -4489,6 +4495,8 @@ void write_event_to_log_file (dsd_opts * opts, dsd_state * state, uint8_t slot,
fprintf (event_log_file, " Talker Alias: %s \n", state->event_history_s[slot].Event_History_Items[0].alias);
if (strncmp(text_string, state->event_history_s[slot].Event_History_Items[0].gps_s, 13) != 0)
fprintf (event_log_file, " GPS: %s \n", state->event_history_s[slot].Event_History_Items[0].gps_s);
if (strncmp(text_string, state->event_history_s[slot].Event_History_Items[0].internal_str, 13) != 0)
fprintf (event_log_file, " DSD-FME: %s \n", state->event_history_s[slot].Event_History_Items[0].internal_str);
//flush and close log file
fflush (event_log_file);