mirror of
https://github.com/lwvmobile/dsd-fme.git
synced 2026-11-14 01:37:25 -05:00
Migrate Call Alert Beeper to New Event Function; Ring different tones on voice start, end, and data calls; #287
Fix and Tweak Calloc Size to the size_t of Event_History * 600 total events (little extra overhead) ;
This commit is contained in:
@@ -1320,8 +1320,17 @@
|
||||
state->dmr_color_code = 16;
|
||||
state->dmr_t3_syscode = 0;
|
||||
|
||||
state->event_history_s = calloc(1, 10000000000); //TODO: tweak this size later on
|
||||
|
||||
//TODO: Test this in different environments before pushing it out
|
||||
state->event_history_s = calloc(600, sizeof(Event_History)); //600 items at the size of the Event_History struct
|
||||
|
||||
//debug
|
||||
// fprintf (stderr, "allocated size of event history struct: %ld bytes; \n", 600 * sizeof(Event_History));
|
||||
|
||||
if (state->event_history_s == NULL)
|
||||
{
|
||||
fprintf (stderr, "memory allocation failure! \n");
|
||||
}
|
||||
|
||||
//initialize event history items (0 to 255)
|
||||
for (uint8_t i = 0; i < 2; i++)
|
||||
init_event_history(&state->event_history_s[i], 0, 255);
|
||||
|
||||
Reference in New Issue
Block a user