Lockout TG Audio Playback and Keyboard Shortcuts;

This commit is contained in:
lwvmobile 2022-12-21 22:02:13 -05:00
parent 49f81da4df
commit e613b85829
2 changed files with 66 additions and 6 deletions

View File

@ -128,15 +128,39 @@ processMbeFrame (dsd_opts * opts, dsd_state * state, char imbe_fr[8][23], char a
for (i = 0; i < 88; i++)
{
imbe_d[i] = 0;
}
for (i = 0; i < 49; i++)
{
ambe_d[i] = 0;
}
//set playback mode for this frame
char mode[8];
//if we are using allow/whitelist mode, then write 'B' to mode for block
//comparison below will look for an 'A' to write to mode if it is allowed
if (opts->trunk_use_allow_list == 1) sprintf (mode, "%s", "B");
int groupNumber = 0;
if (state->currentslot == 0) groupNumber = state->lasttg;
else groupNumber = state->lasttgR;
for (i = 0; i < state->group_tally; i++)
{
if (state->group_array[i].groupNumber == groupNumber)
{
imbe_d[i] = 0;
strcpy (mode, state->group_array[i].groupMode);
}
}
for (i = 0; i < 49; i++)
{
ambe_d[i] = 0;
}
//set flag to not play audio this time, but won't prevent writing to wav files
if (strcmp(mode, "B") == 0) opts->audio_out = 0;
//end set playback mode for this frame
if ((state->synctype == 0) || (state->synctype == 1))
{
@ -608,5 +632,8 @@ processMbeFrame (dsd_opts * opts, dsd_state * state, char imbe_fr[8][23], char a
}
}
//reset audio out flag for next repitition
if (strcmp(mode, "B") == 0) opts->audio_out = 1;
//restore flag for null output type
if (opts->audio_out_type == 9) opts->audio_out = 0;
}

View File

@ -3062,6 +3062,39 @@ if (c == 115) //'s' key, stop playing wav or symbol in files
openPulseInput(opts);
}
//Lockout bug in EDACS prevents any group from tuning when using this, not sure why yet
//WARNING! USE THESE WITH CAUTION! IF BREAKING ISSUES OBSERVED, THEN RESTART AND DON'T USE THEM!!
if (opts->frame_provoice != 1 && c == 49) //'1' key, lockout slot 1 or conventional tg from tuning/playback during session
{
state->group_array[state->group_tally].groupNumber = state->lasttg;
sprintf (state->group_array[state->group_tally].groupMode, "%s", "B");
sprintf (state->group_array[state->group_tally].groupName, "%s", "LOCKOUT");
state->group_tally++;
//test tuning away to break sync, if not working so well, then disable
//RIGCTL
if (opts->frame_provoice != 1 && opts->p25_is_tuned == 1 && opts->use_rigctl == 1) SetFreq(opts->rigctl_sockfd, 450000000);
//rtl_udp
if (opts->frame_provoice != 1 && opts->p25_is_tuned == 1 && opts->audio_in_type == 3) rtl_udp_tune (opts, state, 450000000);
}
if (opts->frame_provoice != 1 && c == 50) //'2' key, lockout slot 2 tdma tgR from tuning/playback during session
{
state->group_array[state->group_tally].groupNumber = state->lasttgR;
sprintf (state->group_array[state->group_tally].groupMode, "%s", "B");
sprintf (state->group_array[state->group_tally].groupName, "%s", "LOCKOUT");
state->group_tally++;
//test tuning away to break sync, if not working so well, then disable
//RIGCTL
if (opts->p25_is_tuned == 1 && opts->use_rigctl == 1) SetFreq(opts->rigctl_sockfd, 450000000);
//rtl_udp
if (opts->p25_is_tuned == 1 && opts->audio_in_type == 3) rtl_udp_tune (opts, state, 450000000);
}
//anything with an entry box will need the inputs and outputs stopped first
//so probably just write a function to handle c input, and when c = certain values