From 94166b493c3aedc5aa06083c1ddf3336768813ce Mon Sep 17 00:00:00 2001 From: lwvmobile Date: Tue, 23 May 2023 06:21:58 -0400 Subject: [PATCH] Misc; #123 #125; --- src/dsd_frame_sync.c | 4 ++++ src/dsd_main.c | 5 ++++- src/dsd_ncurses.c | 4 ++-- src/dsd_reset.c | 10 ++++++---- 4 files changed, 16 insertions(+), 7 deletions(-) diff --git a/src/dsd_frame_sync.c b/src/dsd_frame_sync.c index bc0f371..ac95622 100644 --- a/src/dsd_frame_sync.c +++ b/src/dsd_frame_sync.c @@ -1314,6 +1314,7 @@ getFrameSync (dsd_opts * opts, dsd_state * state) { // state->carrier = 1; state->lastsynctype = 28; + state->last_cc_sync_time = time(NULL); state->offset = synctest_pos; state->max = ((state->max) + lmax) / 2; @@ -1336,6 +1337,7 @@ getFrameSync (dsd_opts * opts, dsd_state * state) { // state->carrier = 1; state->lastsynctype = 29; + state->last_cc_sync_time = time(NULL); state->offset = synctest_pos; state->max = ((state->max) + lmax) / 2; @@ -1364,6 +1366,7 @@ getFrameSync (dsd_opts * opts, dsd_state * state) if (state->lastsynctype == 28) { state->lastsynctype = 28; + state->last_cc_sync_time = time(NULL); // if (opts->payload == 1) // fprintf (stderr, "\n +FSW "); // if (opts->payload == 1) @@ -1393,6 +1396,7 @@ getFrameSync (dsd_opts * opts, dsd_state * state) if (state->lastsynctype == 29) { state->lastsynctype = 29; + state->last_cc_sync_time = time(NULL); // if (opts->payload == 1) // fprintf (stderr, "\n -FSW "); // if (opts->payload == 1) diff --git a/src/dsd_main.c b/src/dsd_main.c index 5510ed4..434f337 100644 --- a/src/dsd_main.c +++ b/src/dsd_main.c @@ -1357,7 +1357,7 @@ main (int argc, char **argv) } #ifdef AERO_BUILD - fprintf (stderr, "Build Version: v2.0.1-14 Win32 \n"); + fprintf (stderr, "Build Version: v2.0.1-15 Win32 \n"); #else fprintf (stderr, "Build Version: %s \n", GIT_TAG); #endif @@ -1778,6 +1778,9 @@ main (int argc, char **argv) sprintf (opts.output_name, "EDACS/PV"); fprintf (stderr,"Setting symbol rate to 9600 / second\n"); fprintf (stderr,"Decoding only ProVoice frames.\n"); + //rtl specific tweaks + opts.rtl_bandwidth = 24; + // opts.rtl_gain_value = 36; } else if (optarg[0] == '1') { diff --git a/src/dsd_ncurses.c b/src/dsd_ncurses.c index 6902da3..fe619bd 100644 --- a/src/dsd_ncurses.c +++ b/src/dsd_ncurses.c @@ -2072,7 +2072,7 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state) if (opts->ncurses_compact == 1) { printw ("------------------------------------------------------------------------------\n"); - printw ("| Digital Speech Decoder: Florida Man Edition - Aero \n", "v2.0.1-14 Win32"); + printw ("| Digital Speech Decoder: Florida Man Edition - Aero \n", "v2.0.1-15 Win32"); printw ("------------------------------------------------------------------------------\n"); } #elif LIMAZULUTWEAKS @@ -2101,7 +2101,7 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state) if (i == 4) printw (" MBElib %s", versionstr); #ifdef AERO_BUILD if (i == 5) printw (" %s ", "Aero Win32"); - if (i == 6) printw (" v2.0.1-14 Win32 \n"); + if (i == 6) printw (" v2.0.1-15 Win32 \n"); #else if (i == 5) printw (" %s ", "zDEV BUILD"); if (i == 6) printw (" %s \n", GIT_TAG); diff --git a/src/dsd_reset.c b/src/dsd_reset.c index 69ce852..b2d21ec 100644 --- a/src/dsd_reset.c +++ b/src/dsd_reset.c @@ -9,10 +9,11 @@ void resetState (dsd_state * state) int i, j; //Dibit Buffer -- Free Allocated Memory - free (state->dibit_buf); + // free (state->dibit_buf); //Dibit Buffer -- Memset/Init/Allocate Memory - state->dibit_buf = malloc (sizeof (int) * 1000000); + // state->dibit_buf = malloc (sizeof (int) * 1000000); + state->dibit_buf_p = state->dibit_buf + 200; memset (state->dibit_buf, 0, sizeof (int) * 200); state->repeat = 0; //repeat frame? @@ -125,10 +126,11 @@ void resetState (dsd_state * state) void reset_dibit_buffer(dsd_state * state) { //Dibit Buffer -- Free Allocated Memory - free (state->dibit_buf); + // free (state->dibit_buf); //Dibit Buffer -- Memset/Init/Allocate Memory - state->dibit_buf = malloc (sizeof (int) * 1000000); + // state->dibit_buf = malloc (sizeof (int) * 1000000); + state->dibit_buf_p = state->dibit_buf + 200; memset (state->dibit_buf, 0, sizeof (int) * 200); }