Attempt Fix/Clean on RTL input code; #125

This commit is contained in:
lwvmobile
2023-05-18 09:29:44 -04:00
parent e4861bf94c
commit 7b6feb9e4f
13 changed files with 171 additions and 270 deletions

View File

@@ -148,10 +148,10 @@ void process_MAC_VPDU(dsd_opts * opts, dsd_state * state, int type, unsigned lon
opts->p25_is_tuned = 1; //set to 1 to set as currently tuned so we don't keep tuning nonstop
state->last_vc_sync_time = time(NULL);
}
//rtl_udp
//rtl
else if (opts->audio_in_type == 3)
{
rtl_udp_tune (opts, state, freq);
rtl_dev_tune (opts, freq);
state->p25_vc_freq[0] = state->p25_vc_freq[1] = freq;
opts->p25_is_tuned = 1;
state->last_vc_sync_time = time(NULL);
@@ -232,10 +232,10 @@ void process_MAC_VPDU(dsd_opts * opts, dsd_state * state, int type, unsigned lon
opts->p25_is_tuned = 1; //set to 1 to set as currently tuned so we don't keep tuning nonstop
state->last_vc_sync_time = time(NULL);
}
//rtl_udp
//rtl
else if (opts->audio_in_type == 3)
{
rtl_udp_tune (opts, state, freq);
rtl_dev_tune (opts, freq);
state->p25_vc_freq[0] = state->p25_vc_freq[1] = freq;
opts->p25_is_tuned = 1;
state->last_vc_sync_time = time(NULL);
@@ -353,10 +353,10 @@ void process_MAC_VPDU(dsd_opts * opts, dsd_state * state, int type, unsigned lon
j = 8; //break loop
}
//rtl_udp
//rtl
else if (opts->audio_in_type == 3)
{
rtl_udp_tune (opts, state, tunable_freq);
rtl_dev_tune (opts, tunable_freq);
state->p25_vc_freq[0] = state->p25_vc_freq[1] = tunable_freq;
opts->p25_is_tuned = 1;
state->last_vc_sync_time = time(NULL);
@@ -461,10 +461,10 @@ void process_MAC_VPDU(dsd_opts * opts, dsd_state * state, int type, unsigned lon
opts->p25_is_tuned = 1; //set to 1 to set as currently tuned so we don't keep tuning nonstop
state->last_vc_sync_time = time(NULL);
}
//rtl_udp
//rtl
else if (opts->audio_in_type == 3)
{
rtl_udp_tune (opts, state, freq);
rtl_dev_tune (opts, freq);
state->p25_vc_freq[0] = state->p25_vc_freq[1] = freq;
opts->p25_is_tuned = 1;
state->last_vc_sync_time = time(NULL);
@@ -554,10 +554,10 @@ void process_MAC_VPDU(dsd_opts * opts, dsd_state * state, int type, unsigned lon
opts->p25_is_tuned = 1; //set to 1 to set as currently tuned so we don't keep tuning nonstop
state->last_vc_sync_time = time(NULL);
}
//rtl_udp
//rtl
else if (opts->audio_in_type == 3)
{
rtl_udp_tune (opts, state, freq);
rtl_dev_tune (opts, freq);
if (state->synctype == 0 || state->synctype == 1) state->p25_vc_freq[0] = freq;
opts->p25_is_tuned = 1;
state->last_vc_sync_time = time(NULL);
@@ -710,10 +710,10 @@ void process_MAC_VPDU(dsd_opts * opts, dsd_state * state, int type, unsigned lon
state->last_vc_sync_time = time(NULL);
j = 8; //break loop
}
//rtl_udp
//rtl
else if (opts->audio_in_type == 3)
{
rtl_udp_tune (opts, state, tunable_freq);
rtl_dev_tune (opts, tunable_freq);
state->p25_vc_freq[0] = state->p25_vc_freq[1] = tunable_freq;
opts->p25_is_tuned = 1;
state->last_vc_sync_time = time(NULL);
@@ -889,10 +889,10 @@ void process_MAC_VPDU(dsd_opts * opts, dsd_state * state, int type, unsigned lon
state->last_vc_sync_time = time(NULL);
j = 8; //break loop
}
//rtl_udp
//rtl
else if (opts->audio_in_type == 3)
{
rtl_udp_tune (opts, state, tunable_freq);
rtl_dev_tune (opts, tunable_freq);
//probably best to only set these when really tuning
state->p25_vc_freq[0] = state->p25_vc_freq[1] = tunable_freq;
opts->p25_is_tuned = 1;
@@ -1011,10 +1011,10 @@ void process_MAC_VPDU(dsd_opts * opts, dsd_state * state, int type, unsigned lon
state->last_vc_sync_time = time(NULL);
j = 8; //break loop
}
//rtl_udp
//rtl
else if (opts->audio_in_type == 3)
{
rtl_udp_tune (opts, state, tunable_freq);
rtl_dev_tune (opts, tunable_freq);
//probably best to only set these when really tuning
state->p25_vc_freq[0] = state->p25_vc_freq[1] = tunable_freq;
opts->p25_is_tuned = 1;
@@ -1122,10 +1122,10 @@ void process_MAC_VPDU(dsd_opts * opts, dsd_state * state, int type, unsigned lon
opts->p25_is_tuned = 1; //set to 1 to set as currently tuned so we don't keep tuning nonstop
state->last_vc_sync_time = time(NULL);
}
//rtl_udp
//rtl
else if (opts->audio_in_type == 3)
{
rtl_udp_tune (opts, state, freq1);
rtl_dev_tune (opts, freq1);
state->p25_vc_freq[0] = state->p25_vc_freq[1] = freq1;
opts->p25_is_tuned = 1;
state->last_vc_sync_time = time(NULL);