From 7e6b3adf9d8b9be6f24f780125d8025b3a975a1b Mon Sep 17 00:00:00 2001 From: lwvmobile <59371473+lwvmobile@users.noreply.github.com> Date: Sat, 5 Feb 2022 09:44:26 -0500 Subject: [PATCH] Remove NXDN from -fa option Removed NXDN from -fa option so it doesn't cause a bunch of random false positives Clean up a few little things, hopefully nothing too major. --- src/dsd_audio.c | 3 --- src/dsd_frame_sync.c | 17 +---------------- src/dsd_main.c | 13 +++---------- 3 files changed, 4 insertions(+), 29 deletions(-) diff --git a/src/dsd_audio.c b/src/dsd_audio.c index 2182c43..1f5de6d 100644 --- a/src/dsd_audio.c +++ b/src/dsd_audio.c @@ -358,9 +358,6 @@ playSynthesizedVoice (dsd_opts * opts, dsd_state * state) #endif } else - //short multiple = 12; - //probably going to need to do that void voodoo again here to get this to work to even see if it works in the grand scheme - //result = write (opts->audio_out_fd, ( (state->audio_out_buf_p - state->audio_out_idx) * 12 ), (state->audio_out_idx * 24) ); //HERE HERE work on way to boost output from 8000 to 48000 result = write (opts->audio_out_fd, (state->audio_out_buf_p - state->audio_out_idx), (state->audio_out_idx * 2)); //12 state->audio_out_idx = 0; } diff --git a/src/dsd_frame_sync.c b/src/dsd_frame_sync.c index 2d3da61..15908a8 100644 --- a/src/dsd_frame_sync.c +++ b/src/dsd_frame_sync.c @@ -80,10 +80,6 @@ char * getDate(void) { return curr2; } -time_t last_sync_time; -short int time_set = 0; -//last_sync_time = time(NULL); - void printFrameSync (dsd_opts * opts, dsd_state * state, char *frametype, int offset, char *modulation) { @@ -578,7 +574,6 @@ getFrameSync (dsd_opts * opts, dsd_state * state) //if (opts->errorbars == 1 && (time(NULL) - now) > 2 ) { printFrameSync (opts, state, " -ProVoice ", synctest_pos + 1, modulation); - //now = time(NULL); } state->lastsynctype = 14; return (14); @@ -591,23 +586,13 @@ getFrameSync (dsd_opts * opts, dsd_state * state) state->min = ((state->min) + lmin) / 2; sprintf (state->ftype, " ProVoice "); if (opts->errorbars == 1) - //if (opts->errorbars == 1 && (time(NULL) - now) > 2 ) { printFrameSync (opts, state, " -ProVoice ", synctest_pos + 1, modulation); - //now = time(NULL); //must be something I added, don't even remember why now } state->lastsynctype = 15; return (15); } - else - { - if (time_set == 0) - { - //state->lastsynctype = 99; //HERE HERE set last sync type to 99, special type - last_sync_time = time(NULL); - time_set == 1; - } - } + } if ((opts->frame_nxdn96 == 1) || (opts->frame_nxdn48 == 1)) { diff --git a/src/dsd_main.c b/src/dsd_main.c index df4a0c6..b2e33be 100644 --- a/src/dsd_main.c +++ b/src/dsd_main.c @@ -164,7 +164,7 @@ initOpts (dsd_opts * opts) opts->frame_x2tdma = 1; opts->frame_p25p1 = 1; opts->frame_nxdn48 = 0; - opts->frame_nxdn96 = 1; + opts->frame_nxdn96 = 0; opts->frame_dmr = 1; opts->frame_provoice = 0; opts->mod_c4fm = 1; @@ -340,7 +340,7 @@ usage () printf (" -f1 Decode only P25 Phase 1\n"); printf (" -fd Decode only D-STAR\n"); printf (" -fi Decode only NXDN48* (6.25 kHz) / IDAS*\n"); - printf (" -fn Decode only NXDN96 (12.5 kHz)\n"); + printf (" -fn Decode only NXDN96* (12.5 kHz)\n"); printf (" -fp Decode only ProVoice*\n"); printf (" -fr Decode only DMR/MOTOTRBO\n"); printf (" -fx Decode only X2-TDMA\n"); @@ -736,7 +736,7 @@ main (int argc, char **argv) opts.frame_x2tdma = 1; opts.frame_p25p1 = 1; opts.frame_nxdn48 = 0; - opts.frame_nxdn96 = 1; + opts.frame_nxdn96 = 0; opts.frame_dmr = 1; opts.frame_provoice = 0; } @@ -809,9 +809,6 @@ main (int argc, char **argv) state.rf_mod = 2; //was 2 //opts.symboltiming = 2400; //NXDN48 uses 2400 symbol rate printf ("Setting symbol rate to 2400 / second\n"); - //printf ("Enabling only GFSK modulation optimizations.\n"); - //printf ("Why are we using GFSK modulations? Isn't NXDN FSK4/C4FM??.\n"); - //printf ("Well, it works now, so probably just the way DSD interprets symbols.\n"); printf ("Decoding only NXDN 4800 baud frames.\n"); } else if (optarg[0] == 'n') @@ -827,11 +824,7 @@ main (int argc, char **argv) opts.mod_qpsk = 0; opts.mod_gfsk = 1; state.rf_mod = 2; - //printf ("Enabling only C4FM/FSK4 modulation optimizations. I really need a new FSK4 modulator\n"); printf ("Enabling only GFSK modulation optimizations.\n"); - //printf ("Why are we using GFSK modulations? Isn't NXDN FSK4/C4FM??.\n"); - //printf ("Well, it works now, so probably just the way DSD interprets symbols.\n"); - //opts.symboltiming = 4800; //NXDN96 uses 4800 symbol rate printf ("Decoding only NXDN 9600 baud frames.\n"); } else if (optarg[0] == 'r')