mirror of
https://github.com/lwvmobile/dsd-fme.git
synced 2026-11-12 16:57:23 -05:00
New Event History Setup and Logging to a Log File, part 2; #287
Rework all Per Call Wav files to tie into Event History; Auto Delete Empty Wav files created; Wav Files in progress have no extension and have no hard set name until closing; Delete all OLD patch files that are resolved directly or indirectly by new Event History, or have previously been incorporated into code.
This commit is contained in:
@@ -1,51 +0,0 @@
|
||||
diff --git a/src/dmr_pi.c b/src/dmr_pi.c
|
||||
index 55dfb83..33fb3ba 100644
|
||||
--- a/src/dmr_pi.c
|
||||
+++ b/src/dmr_pi.c
|
||||
@@ -14,6 +14,9 @@ void dmr_pi (dsd_opts * opts, dsd_state * state, uint8_t PI_BYTE[], uint32_t CRC
|
||||
{
|
||||
UNUSED2(opts, CRCCorrect);
|
||||
|
||||
+ //force slot to 0 if using dmr mono handling
|
||||
+ if (opts->dmr_mono == 1) state->currentslot = 0;
|
||||
+
|
||||
if((IrrecoverableErrors == 0))
|
||||
{
|
||||
|
||||
diff --git a/src/dsd_frame.c b/src/dsd_frame.c
|
||||
index 3b2a3e1..ba32618 100644
|
||||
--- a/src/dsd_frame.c
|
||||
+++ b/src/dsd_frame.c
|
||||
@@ -160,7 +160,8 @@ processFrame (dsd_opts * opts, dsd_state * state)
|
||||
sprintf (state->slot2light, " slot2 ");
|
||||
//we can safely open MBE on any MS or mono handling
|
||||
if ((opts->mbe_out_dir[0] != 0) && (opts->mbe_out_f == NULL)) openMbeOutFile (opts, state);
|
||||
- if (opts->p25_trunk == 0) dmrMSBootstrap (opts, state);
|
||||
+ // if (opts->p25_trunk == 0) //line disabled to allow mono mode while trunking
|
||||
+ dmrMSBootstrap (opts, state);
|
||||
}
|
||||
if (opts->dmr_mono == 1 && state->synctype == 32)
|
||||
{
|
||||
diff --git a/src/dsd_main.c b/src/dsd_main.c
|
||||
index 7be5912..8db6dc3 100644
|
||||
--- a/src/dsd_main.c
|
||||
+++ b/src/dsd_main.c
|
||||
@@ -2302,13 +2302,13 @@ main (int argc, char **argv)
|
||||
state.rf_mod = 0; //
|
||||
opts.pulse_digi_rate_out = 8000;
|
||||
opts.pulse_digi_out_channels = 2;
|
||||
- opts.dmr_mono = 0;
|
||||
- opts.dmr_stereo = 1;
|
||||
+ opts.dmr_mono = 1;
|
||||
+ opts.dmr_stereo = 0; //not sure if this will break anything
|
||||
state.dmr_stereo = 0; //0
|
||||
// opts.setmod_bw = 7000;
|
||||
- sprintf (opts.output_name, "DMR Stereo");
|
||||
- fprintf (stderr,"-fr / DMR Mono switch has been deprecated.\n");
|
||||
- fprintf (stderr,"Decoding DMR Stereo BS/MS Simplex\n");
|
||||
+ sprintf (opts.output_name, "DMR Mono");
|
||||
+ // fprintf (stderr,"-fr / DMR Mono switch enabled. \n NOTE: Some ENC options in Slot 2 may not work properly.\n");
|
||||
+ fprintf (stderr,"\n Decoding DMR Stereo BS/MS Simplex in Mono Single Slot Only Configuration.\n");
|
||||
|
||||
}
|
||||
else if (optarg[0] == 'm')
|
||||
@@ -1,152 +0,0 @@
|
||||
diff --git a/src/dmr_pi.c b/src/dmr_pi.c
|
||||
index 7542c61..d1c8e39 100644
|
||||
--- a/src/dmr_pi.c
|
||||
+++ b/src/dmr_pi.c
|
||||
@@ -14,6 +14,9 @@ void dmr_pi (dsd_opts * opts, dsd_state * state, uint8_t PI_BYTE[], uint32_t CRC
|
||||
{
|
||||
UNUSED2(opts, CRCCorrect);
|
||||
|
||||
+ //force slot to 0 if using dmr mono handling
|
||||
+ if (opts->dmr_mono == 1) state->currentslot = 0;
|
||||
+
|
||||
if((IrrecoverableErrors == 0))
|
||||
{
|
||||
|
||||
diff --git a/src/dsd_audio2.c b/src/dsd_audio2.c
|
||||
index 756e468..13316df 100644
|
||||
--- a/src/dsd_audio2.c
|
||||
+++ b/src/dsd_audio2.c
|
||||
@@ -988,6 +988,9 @@ void playSynthesizedVoiceSS3 (dsd_opts * opts, dsd_state * state)
|
||||
memset (stereo_samp2, 0, sizeof(stereo_samp2));
|
||||
memset (stereo_samp3, 0, sizeof(stereo_samp3));
|
||||
|
||||
+ if (opts->dmr_mono == 1)
|
||||
+ memcpy (state->s_r4, state->s_l4, sizeof(state->s_r4));
|
||||
+
|
||||
//dmr enc checkdown for whether or not to fill the stereo sample or not for playback or writing
|
||||
encL = encR = 0;
|
||||
encL = (state->dmr_so >> 6) & 0x1;
|
||||
@@ -1070,8 +1073,16 @@ void playSynthesizedVoiceSS3 (dsd_opts * opts, dsd_state * state)
|
||||
}
|
||||
|
||||
//flag either left or right as 'enc' to mute if B
|
||||
- if (strcmp(modeL, "B") == 0) encL = 1;
|
||||
- if (strcmp(modeR, "B") == 0) encR = 1;
|
||||
+ if (strcmp(modeL, "B") == 0)
|
||||
+ {
|
||||
+ encL = 1;
|
||||
+ encR = 1;
|
||||
+ }
|
||||
+ if (strcmp(modeR, "B") == 0)
|
||||
+ {
|
||||
+ encR = 1;
|
||||
+ encL = 1;
|
||||
+ }
|
||||
|
||||
//check to see if we need to enable slot and toggle slot preference here
|
||||
//this method will always favor slot 2 (this is a patch anyways, so....meh)
|
||||
diff --git a/src/dsd_frame.c b/src/dsd_frame.c
|
||||
index 577169c..275abb6 100644
|
||||
--- a/src/dsd_frame.c
|
||||
+++ b/src/dsd_frame.c
|
||||
@@ -160,7 +160,8 @@ processFrame (dsd_opts * opts, dsd_state * state)
|
||||
sprintf (state->slot2light, " slot2 ");
|
||||
//we can safely open MBE on any MS or mono handling
|
||||
if ((opts->mbe_out_dir[0] != 0) && (opts->mbe_out_f == NULL)) openMbeOutFile (opts, state);
|
||||
- if (opts->p25_trunk == 0) dmrMSBootstrap (opts, state);
|
||||
+ // if (opts->p25_trunk == 0) //line disabled to allow mono mode while trunking
|
||||
+ dmrMSBootstrap (opts, state);
|
||||
}
|
||||
if (opts->dmr_mono == 1 && state->synctype == 32)
|
||||
{
|
||||
diff --git a/src/dsd_main.c b/src/dsd_main.c
|
||||
index 3ca7788..22462a0 100644
|
||||
--- a/src/dsd_main.c
|
||||
+++ b/src/dsd_main.c
|
||||
@@ -1645,9 +1645,9 @@ main (int argc, char **argv)
|
||||
}
|
||||
|
||||
#ifdef AERO_BUILD
|
||||
- fprintf (stderr, "Build Version: AW (20231015) \n");
|
||||
+ fprintf (stderr, "Build Version: AW MTL (20240201) \n");
|
||||
#else
|
||||
- fprintf (stderr, "Build Version: AW %s \n", GIT_TAG);
|
||||
+ fprintf (stderr, "Build Version: AW MTL %s \n", GIT_TAG);
|
||||
#endif
|
||||
fprintf (stderr,"MBElib Version: %s\n", versionstr);
|
||||
|
||||
@@ -2474,14 +2474,18 @@ main (int argc, char **argv)
|
||||
opts.mod_qpsk = 0;
|
||||
opts.mod_gfsk = 0;
|
||||
state.rf_mod = 0;
|
||||
- opts.dmr_stereo = 1;
|
||||
- opts.dmr_mono = 0;
|
||||
+ // opts.dmr_stereo = 1;
|
||||
+ // opts.dmr_mono = 0;
|
||||
// opts.setmod_bw = 7000;
|
||||
opts.pulse_digi_rate_out = 8000;
|
||||
opts.pulse_digi_out_channels = 2;
|
||||
- sprintf (opts.output_name, "DMR");
|
||||
-
|
||||
- fprintf (stderr,"Decoding DMR Stereo BS/MS Simplex\n");
|
||||
+ opts.dmr_mono = 1;
|
||||
+ opts.dmr_stereo = 0; //not sure if this will break anything
|
||||
+ state.dmr_stereo = 0; //0
|
||||
+ // opts.setmod_bw = 7000;
|
||||
+ sprintf (opts.output_name, "DMR Mono");
|
||||
+ // fprintf (stderr,"-fr / DMR Mono switch enabled. \n NOTE: Some ENC options in Slot 2 may not work properly.\n");
|
||||
+ fprintf (stderr,"\n Decoding DMR Stereo BS/MS Simplex in Mono Single Slot Only Configuration.\n");
|
||||
}
|
||||
//change ft to only do P25 and DMR (TDMA trunking modes)
|
||||
else if (optarg[0] == 't')
|
||||
@@ -2558,13 +2562,13 @@ main (int argc, char **argv)
|
||||
state.rf_mod = 0; //
|
||||
opts.pulse_digi_rate_out = 8000;
|
||||
opts.pulse_digi_out_channels = 2;
|
||||
- opts.dmr_mono = 0;
|
||||
- opts.dmr_stereo = 1;
|
||||
+ opts.dmr_mono = 1;
|
||||
+ opts.dmr_stereo = 0; //not sure if this will break anything
|
||||
state.dmr_stereo = 0; //0
|
||||
// opts.setmod_bw = 7000;
|
||||
- sprintf (opts.output_name, "DMR Stereo");
|
||||
- fprintf (stderr,"-fr / DMR Mono switch has been deprecated.\n");
|
||||
- fprintf (stderr,"Decoding DMR Stereo BS/MS Simplex\n");
|
||||
+ sprintf (opts.output_name, "DMR Mono");
|
||||
+ // fprintf (stderr,"-fr / DMR Mono switch enabled. \n NOTE: Some ENC options in Slot 2 may not work properly.\n");
|
||||
+ fprintf (stderr,"\n Decoding DMR Stereo BS/MS Simplex in Mono Single Slot Only Configuration.\n");
|
||||
|
||||
}
|
||||
else if (optarg[0] == 'm')
|
||||
diff --git a/src/dsd_ncurses.c b/src/dsd_ncurses.c
|
||||
index 73965dc..e5b38aa 100644
|
||||
--- a/src/dsd_ncurses.c
|
||||
+++ b/src/dsd_ncurses.c
|
||||
@@ -2297,8 +2297,8 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state)
|
||||
if (opts->ncurses_compact == 1)
|
||||
{
|
||||
printw ("------------------------------------------------------------------------------\n");
|
||||
- printw ("| Digital Speech Decoder: Florida Man Edition - Aero %s \n", "AW (20231015)");
|
||||
- printw ("------------------------------------------------------------------------------\n");
|
||||
+ printw ("| Digital Speech Decoder: Florida Man Edition - Aero %s \n", "AW MTL (20240328)");
|
||||
+ printw ("------------------------------------------------------------------------------\n");
|
||||
}
|
||||
#elif LIMAZULUTWEAKS
|
||||
if (opts->ncurses_compact == 1)
|
||||
@@ -2336,12 +2336,12 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state)
|
||||
#endif
|
||||
#ifdef AERO_BUILD
|
||||
if (i == 5) printw (" %s ", "Aero Build");
|
||||
- if (i == 6) printw (" AW (20231015) \n");
|
||||
+ if (i == 6) printw (" AW MTL (20240328) \n");
|
||||
#elif ZDEV_BUILD
|
||||
- if (i == 5) printw (" %s ", "AW ");
|
||||
+ if (i == 5) printw (" %s ", "AW MTL");
|
||||
if (i == 6) printw (" %s \n", GIT_TAG);
|
||||
- #else
|
||||
- if (i == 5) printw (" %s ", "AW ");
|
||||
+ #else
|
||||
+ if (i == 5) printw (" %s ", "AW MTL");
|
||||
if (i == 6) printw (" %s \n", GIT_TAG);
|
||||
#endif
|
||||
else printw ("\n");
|
||||
@@ -1,277 +0,0 @@
|
||||
diff --git a/include/dsd.h b/include/dsd.h
|
||||
index 9ebf3f1..c5ac68a 100644
|
||||
--- a/include/dsd.h
|
||||
+++ b/include/dsd.h
|
||||
@@ -18,16 +18,16 @@
|
||||
*/
|
||||
|
||||
//defined by CMakeLists.txt -- Disable by using cmake -DCOLORS=OFF ..
|
||||
-#ifdef PRETTY_COLORS
|
||||
-#define KNRM "\x1B[0m"
|
||||
-#define KRED "\x1B[31m"
|
||||
-#define KGRN "\x1B[32m"
|
||||
-#define KYEL "\x1B[33m"
|
||||
-#define KBLU "\x1B[34m"
|
||||
-#define KMAG "\x1B[35m"
|
||||
-#define KCYN "\x1B[36m"
|
||||
-#define KWHT "\x1B[37m"
|
||||
-#else
|
||||
+// #ifdef PRETTY_COLORS
|
||||
+// #define KNRM "\x1B[0m"
|
||||
+// #define KRED "\x1B[31m"
|
||||
+// #define KGRN "\x1B[32m"
|
||||
+// #define KYEL "\x1B[33m"
|
||||
+// #define KBLU "\x1B[34m"
|
||||
+// #define KMAG "\x1B[35m"
|
||||
+// #define KCYN "\x1B[36m"
|
||||
+// #define KWHT "\x1B[37m"
|
||||
+// #else
|
||||
#define KNRM ""
|
||||
#define KRED ""
|
||||
#define KGRN ""
|
||||
@@ -36,7 +36,7 @@
|
||||
#define KMAG ""
|
||||
#define KCYN ""
|
||||
#define KWHT ""
|
||||
-#endif
|
||||
+// #endif
|
||||
|
||||
#include "config.h"
|
||||
#include <stdio.h>
|
||||
diff --git a/src/dmr_bs.c b/src/dmr_bs.c
|
||||
index bdab262..17a9e70 100644
|
||||
--- a/src/dmr_bs.c
|
||||
+++ b/src/dmr_bs.c
|
||||
@@ -266,14 +266,14 @@ void dmrBS (dsd_opts * opts, dsd_state * state)
|
||||
if ( strcmp (sync, DMR_BS_DATA_SYNC) == 0 )
|
||||
{
|
||||
|
||||
- fprintf (stderr,"%s ", timestr);
|
||||
+ // fprintf (stderr,"%s ", timestr);
|
||||
if (internalslot == 0)
|
||||
{
|
||||
if (opts->inverted_dmr == 0)
|
||||
{
|
||||
- fprintf (stderr,"Sync: +DMR ");
|
||||
+ // fprintf (stderr,"Sync: +DMR ");
|
||||
}
|
||||
- else fprintf (stderr,"Sync: -DMR ");
|
||||
+ else {}//fprintf (stderr,"Sync: -DMR ");
|
||||
|
||||
vc1 = 7; //set to 7 so we can see that we should not be on a VC unless a framesync comes in for it first
|
||||
|
||||
@@ -284,9 +284,9 @@ void dmrBS (dsd_opts * opts, dsd_state * state)
|
||||
{
|
||||
if (opts->inverted_dmr == 0)
|
||||
{
|
||||
- fprintf (stderr,"Sync: +DMR ");
|
||||
+ // fprintf (stderr,"Sync: +DMR ");
|
||||
}
|
||||
- else fprintf (stderr,"Sync: -DMR ");
|
||||
+ else {}//fprintf (stderr,"Sync: -DMR ");
|
||||
|
||||
vc2 = 7; //set to 7 so we can see that we should not be on a VC unless a framesync comes in for it first
|
||||
|
||||
diff --git a/src/dmr_data.c b/src/dmr_data.c
|
||||
index 87f4dfd..57e5647 100644
|
||||
--- a/src/dmr_data.c
|
||||
+++ b/src/dmr_data.c
|
||||
@@ -232,10 +232,10 @@ dmr_data_sync (dsd_opts * opts, dsd_state * state)
|
||||
sprintf(state->slot2light, "[sLoT2]");
|
||||
}
|
||||
|
||||
- if (state->dmr_ms_mode == 0)
|
||||
- {
|
||||
- fprintf(stderr, "%s %s ", state->slot1light, state->slot2light);
|
||||
- }
|
||||
+ // if (state->dmr_ms_mode == 0)
|
||||
+ // {
|
||||
+ // fprintf(stderr, "%s %s ", state->slot1light, state->slot2light);
|
||||
+ // }
|
||||
|
||||
// Slot type - Second part - Parity bit
|
||||
for (i = 0; i < 5; i++)
|
||||
@@ -292,6 +292,13 @@ dmr_data_sync (dsd_opts * opts, dsd_state * state)
|
||||
info[(2*i) + 98] = (1 & (dibit >> 1)); // bit 1
|
||||
info[(2*i) + 99] = (1 & dibit); // bit 0
|
||||
}
|
||||
+
|
||||
+ // if (state->dmr_ms_mode == 0 && burst != 0x09)
|
||||
+ if (burst != 0x09)
|
||||
+ {
|
||||
+ printFrameSync (opts, state, "+DMR ", 90, NULL); //don't think the values matter
|
||||
+ fprintf(stderr, "%s %s ", state->slot1light, state->slot2light);
|
||||
+ }
|
||||
|
||||
//don't run on MS Reverse Channel Data
|
||||
if (state->dmr_ms_rc == 0) dmr_data_burst_handler(opts, state, (uint8_t *)info, burst);
|
||||
@@ -303,15 +310,16 @@ dmr_data_sync (dsd_opts * opts, dsd_state * state)
|
||||
}
|
||||
|
||||
//ending line break
|
||||
- fprintf(stderr, "\n");
|
||||
+ if (burst != 0x09)
|
||||
+ fprintf(stderr, "\n");
|
||||
|
||||
END:
|
||||
if (SlotTypeOk == 0 || cach_okay != 1)
|
||||
{
|
||||
- fprintf (stderr, "%s", KRED);
|
||||
- fprintf (stderr, "| CACH/Burst FEC ERR");
|
||||
- fprintf (stderr, "%s", KNRM);
|
||||
- fprintf (stderr, "\n");
|
||||
+ // fprintf (stderr, "%s", KRED);
|
||||
+ // fprintf (stderr, "| CACH/Burst FEC ERR");
|
||||
+ // fprintf (stderr, "%s", KNRM);
|
||||
+ // fprintf (stderr, "\n");
|
||||
dmr_reset_blocks (opts, state); //failsafe to reset all data header and blocks when bad tact or slottype
|
||||
}
|
||||
|
||||
diff --git a/src/dmr_dburst.c b/src/dmr_dburst.c
|
||||
index fe81158..078524d 100644
|
||||
--- a/src/dmr_dburst.c
|
||||
+++ b/src/dmr_dburst.c
|
||||
@@ -205,7 +205,7 @@ void dmr_data_burst_handler(dsd_opts * opts, dsd_state * state, uint8_t info[196
|
||||
//flag off prop head when not looking at data blocks
|
||||
if (databurst != 0x6 && databurst != 0x7 && databurst != 0x8 && databurst != 0xA && databurst != 0xB) state->data_p_head[slot] = 0;
|
||||
|
||||
- if (databurst != 0xEB)
|
||||
+ if (databurst != 0xEB && databurst != 0x09)
|
||||
{
|
||||
if (state->dmr_ms_mode == 0)
|
||||
{
|
||||
diff --git a/src/dmr_flco.c b/src/dmr_flco.c
|
||||
index 839b085..e43b568 100644
|
||||
--- a/src/dmr_flco.c
|
||||
+++ b/src/dmr_flco.c
|
||||
@@ -790,21 +790,23 @@ uint8_t dmr_cach (dsd_opts * opts, dsd_state * state, uint8_t cach_bits[25])
|
||||
crc = crc8_ok(slco_bits, 36);
|
||||
|
||||
//only run SLCO on good everything
|
||||
- if (h1 && h2 && h3 && crc) dmr_slco (opts, state, slco_bits);
|
||||
- else
|
||||
- {
|
||||
- //this line break issue is wracking on my OCD for clean line breaks
|
||||
- if (opts->payload == 1 && state->dmrburstL == 16 && state->currentslot == 0) ; //no line break if current slot is voice with payload enabled
|
||||
- else if (opts->payload == 1 && state->dmrburstR == 16 && state->currentslot == 1) ; //no line break if current slot is voice with payload enabled
|
||||
- else fprintf (stderr, "\n");
|
||||
- fprintf (stderr, "%s", KRED);
|
||||
- fprintf (stderr, " SLCO CRC ERR");
|
||||
- fprintf (stderr, "%s", KNRM);
|
||||
- if (opts->payload == 1 && state->dmrburstL == 16 && state->currentslot == 0) //if current slot is voice with payload enabled
|
||||
- fprintf (stderr, "\n");
|
||||
- else if (opts->payload == 1 && state->dmrburstR == 16 && state->currentslot == 1) //if current slot is voice with payload enabled
|
||||
- fprintf (stderr, "\n");
|
||||
- }
|
||||
+ if (h1 && h2 && h3 && crc) {} //dmr_slco (opts, state, slco_bits);
|
||||
+ // else
|
||||
+ // {
|
||||
+ // //this line break issue is wracking on my OCD for clean line breaks
|
||||
+ // if (opts->payload == 1 && state->dmrburstL == 16 && state->currentslot == 0) {} //no line break if current slot is voice with payload enabled
|
||||
+ // else if (opts->payload == 1 && state->dmrburstR == 16 && state->currentslot == 1) {} //no line break if current slot is voice with payload enabled
|
||||
+ // else {} //fprintf (stderr, "\n");
|
||||
+ // // fprintf (stderr, "%s", KRED);
|
||||
+ // // fprintf (stderr, " SLCO CRC ERR");
|
||||
+ // // fprintf (stderr, "%s", KNRM);
|
||||
+ // if (opts->payload == 1 && state->dmrburstL == 16 && state->currentslot == 0) //if current slot is voice with payload enabled
|
||||
+ // fprintf (stderr, "\n");
|
||||
+ // else if (opts->payload == 1 && state->dmrburstR == 16 && state->currentslot == 1) //if current slot is voice with payload enabled
|
||||
+ // fprintf (stderr, "\n");
|
||||
+ // }
|
||||
+
|
||||
+ UNUSED(opts);
|
||||
|
||||
}
|
||||
return (err); //return err value based on success or failure, even if we aren't checking it
|
||||
@@ -935,8 +937,11 @@ void dmr_slco (dsd_opts * opts, dsd_state * state, uint8_t slco_bits[])
|
||||
uint8_t xpt_hash = (uint8_t)ConvertBitIntoBytes(&slco_bits[20], 8); //priority TG hash
|
||||
|
||||
//initial line break
|
||||
- fprintf (stderr, "\n");
|
||||
- fprintf (stderr, "%s", KYEL);
|
||||
+ if (slco != 0)
|
||||
+ {
|
||||
+ fprintf (stderr, "\n");
|
||||
+ fprintf (stderr, "%s", KYEL);
|
||||
+ }
|
||||
|
||||
if (slco == 0x2) //C_SYS_Parms
|
||||
{
|
||||
@@ -973,7 +978,8 @@ void dmr_slco (dsd_opts * opts, dsd_state * state, uint8_t slco_bits[])
|
||||
else sprintf (state->dmr_site_parms, "TIII %s:%d-%d;%04X; ", model_str, net, site, syscode);
|
||||
}
|
||||
else if (slco == 0x0) //null
|
||||
- fprintf (stderr, " SLCO NULL ");
|
||||
+ // fprintf (stderr, " SLCO NULL ");
|
||||
+ {}
|
||||
else if (slco == 0x1)
|
||||
{
|
||||
fprintf (stderr, " Activity Update"); //102 361-2 7.1.3.2
|
||||
diff --git a/src/dsd_frame_sync.c b/src/dsd_frame_sync.c
|
||||
index 062bb20..f47a447 100644
|
||||
--- a/src/dsd_frame_sync.c
|
||||
+++ b/src/dsd_frame_sync.c
|
||||
@@ -940,7 +940,7 @@ getFrameSync (dsd_opts * opts, dsd_state * state)
|
||||
sprintf(state->ftype, "DMR ");
|
||||
if (opts->errorbars == 1)
|
||||
{
|
||||
- printFrameSync (opts, state, "+DMR ", synctest_pos + 1, modulation);
|
||||
+ // printFrameSync (opts, state, "+DMR ", synctest_pos + 1, modulation);
|
||||
}
|
||||
state->lastsynctype = 10;
|
||||
state->last_cc_sync_time = time(NULL);
|
||||
@@ -1068,7 +1068,7 @@ getFrameSync (dsd_opts * opts, dsd_state * state)
|
||||
sprintf(state->ftype, "DMR ");
|
||||
if (opts->errorbars == 1) //&& opts->dmr_stereo == 0
|
||||
{
|
||||
- printFrameSync (opts, state, "-DMR ", synctest_pos + 1, modulation);
|
||||
+ // printFrameSync (opts, state, "-DMR ", synctest_pos + 1, modulation);
|
||||
}
|
||||
state->lastsynctype = 13;
|
||||
state->last_cc_sync_time = time(NULL);
|
||||
@@ -1443,7 +1443,7 @@ getFrameSync (dsd_opts * opts, dsd_state * state)
|
||||
{
|
||||
if ((opts->errorbars == 1) && (opts->verbose > 1) && (state->carrier == 1))
|
||||
{
|
||||
- fprintf (stderr,"Sync: no sync\n");
|
||||
+ // fprintf (stderr,"Sync: no sync\n");
|
||||
// fprintf (stderr,"Press CTRL + C to close.\n");
|
||||
|
||||
}
|
||||
diff --git a/src/dsd_main.c b/src/dsd_main.c
|
||||
index 98f2ead..b09cb81 100644
|
||||
--- a/src/dsd_main.c
|
||||
+++ b/src/dsd_main.c
|
||||
@@ -1687,7 +1687,7 @@ main (int argc, char **argv)
|
||||
}
|
||||
|
||||
#ifdef AERO_BUILD
|
||||
- fprintf (stderr, "Build Version: AW (20231015) \n");
|
||||
+ fprintf (stderr, "Build Version: AW (20240523) \n");
|
||||
#else
|
||||
fprintf (stderr, "Build Version: AW %s \n", GIT_TAG);
|
||||
#endif
|
||||
diff --git a/src/dsd_ncurses.c b/src/dsd_ncurses.c
|
||||
index a5442af..514b9ae 100644
|
||||
--- a/src/dsd_ncurses.c
|
||||
+++ b/src/dsd_ncurses.c
|
||||
@@ -2423,7 +2423,7 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state)
|
||||
if (opts->ncurses_compact == 1)
|
||||
{
|
||||
printw ("------------------------------------------------------------------------------\n");
|
||||
- printw ("| Digital Speech Decoder: Florida Man Edition - Aero %s \n", "AW (20231015)");
|
||||
+ printw ("| Digital Speech Decoder: Florida Man Edition - Aero %s \n", "AW (20240523)");
|
||||
printw ("------------------------------------------------------------------------------\n");
|
||||
}
|
||||
#elif LIMAZULUTWEAKS
|
||||
@@ -2462,8 +2462,8 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state)
|
||||
if (i == 4 && opts->frame_m17 == 1) printw (" CODEC2");
|
||||
#endif
|
||||
#ifdef AERO_BUILD
|
||||
- if (i == 5) printw (" %s ", "Aero Build");
|
||||
- if (i == 6) printw (" AW (20231015) \n");
|
||||
+ if (i == 5) printw (" %s ", "Cretu Build");
|
||||
+ if (i == 6) printw (" AW (20240523) \n");
|
||||
#elif ZDEV_BUILD
|
||||
if (i == 5) printw (" %s ", "AW ");
|
||||
if (i == 6) printw (" %s \n", GIT_TAG);
|
||||
@@ -1,120 +0,0 @@
|
||||
diff --git a/src/dmr_block.c b/src/dmr_block.c
|
||||
index 893b0e8..e7f9de7 100644
|
||||
--- a/src/dmr_block.c
|
||||
+++ b/src/dmr_block.c
|
||||
@@ -783,6 +783,6 @@ void dmr_reset_blocks (dsd_opts * opts, dsd_state * state)
|
||||
//reset some strings -- resetting call string here causes random blink on ncurses terminal (cap+)
|
||||
// sprintf (state->call_string[0], "%s", " "); //21 spaces
|
||||
// sprintf (state->call_string[1], "%s", " "); //21 spaces
|
||||
- sprintf (state->dmr_lrrp_gps[0], "%s", "");
|
||||
- sprintf (state->dmr_lrrp_gps[1], "%s", "");
|
||||
+ // sprintf (state->dmr_lrrp_gps[0], "%s", ""); //disabled for dmr data call persistence #174
|
||||
+ // sprintf (state->dmr_lrrp_gps[1], "%s", ""); //disabled for dmr data call persistence #174
|
||||
}
|
||||
\ No newline at end of file
|
||||
diff --git a/src/dmr_data.c b/src/dmr_data.c
|
||||
index 3541152..3cae906 100644
|
||||
--- a/src/dmr_data.c
|
||||
+++ b/src/dmr_data.c
|
||||
@@ -267,7 +267,20 @@ dmr_data_sync (dsd_opts * opts, dsd_state * state)
|
||||
state->color_code_ok = SlotTypeOk;
|
||||
|
||||
//not sure why I still have two variables for this, need to look and see what state->color_code still ties into
|
||||
- if (SlotTypeOk == 1) state->dmr_color_code = state->color_code;
|
||||
+ if (SlotTypeOk == 1)
|
||||
+ {
|
||||
+ if (state->dmr_color_code != state->color_code)
|
||||
+ {
|
||||
+ //Zero out values on color code change #174
|
||||
+ state->lasttg = 0;
|
||||
+ state->lasttgR =0;
|
||||
+ state->lastsrc = 0;
|
||||
+ state->lastsrcR = 0;
|
||||
+ sprintf (state->dmr_lrrp_gps[0], "%s", "");
|
||||
+ sprintf (state->dmr_lrrp_gps[1], "%s", "");
|
||||
+ state->dmr_color_code = state->color_code;
|
||||
+ }
|
||||
+ }
|
||||
|
||||
/* Reconstitute the burst type */
|
||||
burst = (uint8_t)((SlotType[4] << 3) + (SlotType[5] << 2) + (SlotType[6] << 1) + SlotType[7]);
|
||||
diff --git a/src/dsd_main.c b/src/dsd_main.c
|
||||
index 5531ef3..5598793 100644
|
||||
--- a/src/dsd_main.c
|
||||
+++ b/src/dsd_main.c
|
||||
@@ -257,10 +257,10 @@ if(opts->frame_m17 == 1) //&& opts->audio_in_type == 5
|
||||
//zero out right away if not trunking
|
||||
if (opts->p25_trunk == 0)
|
||||
{
|
||||
- state->lasttg = 0;
|
||||
- state->lastsrc = 0;
|
||||
- state->lasttgR = 0;
|
||||
- state->lastsrcR = 0;
|
||||
+ // state->lasttg = 0; //disabled for dmr voice call persistence #174
|
||||
+ // state->lastsrc = 0; //disabled for dmr voice call persistence #174
|
||||
+ // state->lasttgR = 0; //disabled for dmr voice call persistence #174
|
||||
+ // state->lastsrcR = 0; //disabled for dmr voice call persistence #174
|
||||
|
||||
//zero out vc frequencies?
|
||||
state->p25_vc_freq[0] = 0;
|
||||
@@ -290,10 +290,10 @@ if(opts->frame_m17 == 1) //&& opts->audio_in_type == 5
|
||||
//mainly bugfix for ncurses and per call wavs (edacs) and also signal fade, etc
|
||||
if (opts->p25_trunk == 1 && opts->p25_is_tuned == 1 && time(NULL) - state->last_cc_sync_time > opts->trunk_hangtime)
|
||||
{
|
||||
- state->lasttg = 0;
|
||||
- state->lastsrc = 0;
|
||||
- state->lasttgR = 0;
|
||||
- state->lastsrcR = 0;
|
||||
+ // state->lasttg = 0; //disabled for dmr voice call persistence #174
|
||||
+ // state->lastsrc = 0; //disabled for dmr voice call persistence #174
|
||||
+ // state->lasttgR = 0; //disabled for dmr voice call persistence #174
|
||||
+ // state->lastsrcR = 0; //disabled for dmr voice call persistence #174
|
||||
|
||||
}
|
||||
|
||||
@@ -431,7 +431,7 @@ if(opts->frame_m17 == 1) //&& opts->audio_in_type == 5
|
||||
memset(state->dmr_alias_len, 0, sizeof(state->dmr_alias_len));
|
||||
memset(state->dmr_alias_block_segment, 0, sizeof(state->dmr_alias_block_segment));
|
||||
memset(state->dmr_embedded_gps, 0, sizeof(state->dmr_embedded_gps));
|
||||
- memset(state->dmr_lrrp_gps, 0, sizeof(state->dmr_lrrp_gps));
|
||||
+ // memset(state->dmr_lrrp_gps, 0, sizeof(state->dmr_lrrp_gps));
|
||||
|
||||
// memset(state->active_channel, 0, sizeof(state->active_channel));
|
||||
|
||||
diff --git a/src/dsd_ncurses.c b/src/dsd_ncurses.c
|
||||
index 4646e77..e9ecab1 100644
|
||||
--- a/src/dsd_ncurses.c
|
||||
+++ b/src/dsd_ncurses.c
|
||||
@@ -3104,7 +3104,7 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state)
|
||||
}
|
||||
|
||||
//LRRP
|
||||
- if(state->dmrburstL != 16) //only during data and no trunking
|
||||
+ // if(state->dmrburstL != 16) //only during data and no trunking //disabled for dmr data call persistence #174
|
||||
{
|
||||
attron(COLOR_PAIR(4));
|
||||
printw ("%s", state->dmr_lrrp_gps[0]);
|
||||
@@ -3298,7 +3298,7 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state)
|
||||
}
|
||||
|
||||
//LRRP
|
||||
- if(state->dmrburstR != 16) //only during data and no trunking
|
||||
+ // if(state->dmrburstR != 16) //only during data and no trunking //disabled for dmr data call persistence #174
|
||||
{
|
||||
attron(COLOR_PAIR(4));
|
||||
printw ("%s", state->dmr_lrrp_gps[1]);
|
||||
@@ -3978,10 +3978,10 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state)
|
||||
dmr_reset_blocks (opts, state);
|
||||
|
||||
//zero out additional items
|
||||
- state->lasttg = 0;
|
||||
- state->lasttgR = 0;
|
||||
- state->lastsrc = 0;
|
||||
- state->lastsrcR = 0;
|
||||
+ // state->lasttg = 0; //disabled for dmr voice call persistence #174
|
||||
+ // state->lasttgR = 0; //disabled for dmr voice call persistence #174
|
||||
+ // state->lastsrc = 0; //disabled for dmr voice call persistence #174
|
||||
+ // state->lastsrcR = 0; //disabled for dmr voice call persistence #174
|
||||
state->payload_algid = 0;
|
||||
state->payload_algidR = 0;
|
||||
state->payload_keyid = 0;
|
||||
@@ -1,499 +0,0 @@
|
||||
diff --git a/src/dmr_csbk.c b/src/dmr_csbk.c
|
||||
index 6ee44d6..45502a4 100644
|
||||
--- a/src/dmr_csbk.c
|
||||
+++ b/src/dmr_csbk.c
|
||||
@@ -520,6 +520,26 @@ void dmr_cspdu (dsd_opts * opts, dsd_state * state, uint8_t cs_pdu_bits[], uint8
|
||||
//rigctl
|
||||
if (opts->use_rigctl == 1)
|
||||
{
|
||||
+
|
||||
+ if (state->currentslot == 0)
|
||||
+ {
|
||||
+ //close any perCall wav files that are open
|
||||
+ if (opts->dmr_stereo_wav == 1 && opts->wav_out_f != NULL)
|
||||
+ {
|
||||
+ closeWavOutFileL (opts, state);
|
||||
+ opts->wav_out_f = NULL;
|
||||
+ }
|
||||
+ }
|
||||
+ else if (state->currentslot == 1)
|
||||
+ {
|
||||
+ //close any perCall wav files that are open
|
||||
+ if (opts->dmr_stereo_wav == 1 && opts->wav_out_fR != NULL)
|
||||
+ {
|
||||
+ closeWavOutFileR (opts, state);
|
||||
+ opts->wav_out_fR = NULL;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
//Guess I forgot to add this condition here
|
||||
if (GetCurrentFreq(opts->rigctl_sockfd) != state->p25_cc_freq)
|
||||
dmr_reset_blocks (opts, state); //reset all block gathering since we are tuning away from current frequency
|
||||
@@ -554,6 +574,26 @@ void dmr_cspdu (dsd_opts * opts, dsd_state * state, uint8_t cs_pdu_bits[], uint8
|
||||
else if (opts->audio_in_type == 3)
|
||||
{
|
||||
#ifdef USE_RTLSDR
|
||||
+
|
||||
+ if (state->currentslot == 0)
|
||||
+ {
|
||||
+ //close any perCall wav files that are open
|
||||
+ if (opts->dmr_stereo_wav == 1 && opts->wav_out_f != NULL)
|
||||
+ {
|
||||
+ closeWavOutFileL (opts, state);
|
||||
+ opts->wav_out_f = NULL;
|
||||
+ }
|
||||
+ }
|
||||
+ else if (state->currentslot == 1)
|
||||
+ {
|
||||
+ //close any perCall wav files that are open
|
||||
+ if (opts->dmr_stereo_wav == 1 && opts->wav_out_fR != NULL)
|
||||
+ {
|
||||
+ closeWavOutFileR (opts, state);
|
||||
+ opts->wav_out_fR = NULL;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
//Guess I forgot to add this condition here
|
||||
uint32_t tempf = (uint32_t)state->p25_cc_freq;
|
||||
if (opts->rtlsdr_center_freq != tempf)
|
||||
diff --git a/src/dmr_flco.c b/src/dmr_flco.c
|
||||
index 839b085..637debf 100644
|
||||
--- a/src/dmr_flco.c
|
||||
+++ b/src/dmr_flco.c
|
||||
@@ -298,20 +298,7 @@ void dmr_flco (dsd_opts * opts, dsd_state * state, uint8_t lc_bits[], uint32_t C
|
||||
|
||||
if (type != 2) //VLC and EMB, set our target, source, so, and fid per channel
|
||||
{
|
||||
- if (state->currentslot == 0)
|
||||
- {
|
||||
- state->dmr_fid = fid;
|
||||
- state->dmr_so = so;
|
||||
- state->lasttg = target;
|
||||
- state->lastsrc = source;
|
||||
- }
|
||||
- if (state->currentslot == 1)
|
||||
- {
|
||||
- state->dmr_fidR = fid;
|
||||
- state->dmr_soR = so;
|
||||
- state->lasttgR = target;
|
||||
- state->lastsrcR = source;
|
||||
- }
|
||||
+ //moved per call further down past the call_string stuff
|
||||
|
||||
//update cc amd vc sync time for trunking purposes (particularly Con+)
|
||||
if (opts->p25_is_tuned == 1)
|
||||
@@ -337,6 +324,12 @@ void dmr_flco (dsd_opts * opts, dsd_state * state, uint8_t lc_bits[], uint32_t C
|
||||
//reset gain
|
||||
if (opts->floating_point == 1)
|
||||
state->aout_gain = opts->audio_gain;
|
||||
+ //close any perCall wav files that are open
|
||||
+ if (opts->dmr_stereo_wav == 1 && opts->wav_out_f != NULL)
|
||||
+ {
|
||||
+ closeWavOutFileL (opts, state);
|
||||
+ opts->wav_out_f = NULL;
|
||||
+ }
|
||||
}
|
||||
if (state->currentslot == 1)
|
||||
{
|
||||
@@ -350,6 +343,12 @@ void dmr_flco (dsd_opts * opts, dsd_state * state, uint8_t lc_bits[], uint32_t C
|
||||
//reset gain
|
||||
if (opts->floating_point == 1)
|
||||
state->aout_gainR = opts->audio_gain;
|
||||
+ //close any perCall wav files that are open
|
||||
+ if (opts->dmr_stereo_wav == 1 && opts->wav_out_fR != NULL)
|
||||
+ {
|
||||
+ closeWavOutFileR (opts, state);
|
||||
+ opts->wav_out_fR = NULL;
|
||||
+ }
|
||||
}
|
||||
|
||||
}
|
||||
@@ -612,6 +611,69 @@ void dmr_flco (dsd_opts * opts, dsd_state * state, uint8_t lc_bits[], uint32_t C
|
||||
fprintf (stderr, "Key %010llX ", state->RR);
|
||||
fprintf (stderr, "%s ", KNRM);
|
||||
}
|
||||
+
|
||||
+ if (type != 2)
|
||||
+ {
|
||||
+ if (state->currentslot == 0)
|
||||
+ {
|
||||
+ state->dmr_fid = fid;
|
||||
+ state->dmr_so = so;
|
||||
+ state->lasttg = target;
|
||||
+ state->lastsrc = source;
|
||||
+ char * timestr = NULL;
|
||||
+ char * datestr = NULL;
|
||||
+ timestr = getTime();
|
||||
+ datestr = getDate();
|
||||
+
|
||||
+ //setup a call string for the per call (group/private and/or emergency)
|
||||
+ char cs[200]; memset (cs, 0, 200*sizeof(char));
|
||||
+ int x = 0;
|
||||
+ for (int i = 0; i < 200; i++)
|
||||
+ {
|
||||
+ //copy over non space and non termination values from call string
|
||||
+ if (i != 0 && state->call_string[0][i] != ' ' && state->call_string[0][i] != 0)
|
||||
+ cs[x++] = state->call_string[0][i];
|
||||
+ }
|
||||
+ cs[x] = 0; //terminate
|
||||
+
|
||||
+ //open wav file here if not already opened
|
||||
+ if (opts->dmr_stereo_wav == 1 && opts->wav_out_f == NULL)
|
||||
+ {
|
||||
+ sprintf (opts->wav_out_file, "%s/%s %s CC %d - %s - TG %d - RD %d", opts->wav_out_dir, datestr, timestr, state->dmr_color_code, cs, target, source);
|
||||
+ openWavOutFileL (opts, state);
|
||||
+ }
|
||||
+ free (timestr); free(datestr);
|
||||
+ }
|
||||
+ if (state->currentslot == 1)
|
||||
+ {
|
||||
+ state->dmr_fidR = fid;
|
||||
+ state->dmr_soR = so;
|
||||
+ state->lasttgR = target;
|
||||
+ state->lastsrcR = source;
|
||||
+ char * timestr = NULL;
|
||||
+ char * datestr = NULL;
|
||||
+ timestr = getTime();
|
||||
+ datestr = getDate();
|
||||
+
|
||||
+ //setup a call string for the per call (group/private and/or emergency)
|
||||
+ char cs[200]; memset (cs, 0, 200*sizeof(char));
|
||||
+ int x = 0;
|
||||
+ for (int i = 0; i < 200; i++)
|
||||
+ {
|
||||
+ //copy over non space and non termination values from call string
|
||||
+ if (i != 0 && state->call_string[1][i] != ' ' && state->call_string[1][i] != 0)
|
||||
+ cs[x++] = state->call_string[1][i];
|
||||
+ }
|
||||
+ cs[x] = 0; //terminate
|
||||
+
|
||||
+ //open wav file here if not already opened
|
||||
+ if (opts->dmr_stereo_wav == 1 && opts->wav_out_fR == NULL)
|
||||
+ {
|
||||
+ sprintf (opts->wav_out_fileR, "%s/%s %s CC %d - %s - TG %d - RD %d", opts->wav_out_dir, datestr, timestr, state->dmr_color_code, cs, target, source);
|
||||
+ openWavOutFileR (opts, state);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
|
||||
}
|
||||
|
||||
diff --git a/src/dsd_file.c b/src/dsd_file.c
|
||||
index 6f4ecaa..f4b201d 100644
|
||||
--- a/src/dsd_file.c
|
||||
+++ b/src/dsd_file.c
|
||||
@@ -555,6 +555,16 @@ void closeWavOutFile (dsd_opts * opts, dsd_state * state)
|
||||
UNUSED(state);
|
||||
|
||||
sf_close(opts->wav_out_f);
|
||||
+ char newfilename[1032];
|
||||
+ int result; UNUSED(result);
|
||||
+ sprintf (newfilename, "%s.wav", opts->wav_out_file);
|
||||
+ result = rename (opts->wav_out_file, newfilename);
|
||||
+ // fprintf (stderr, "\n Close WAV FileF %s; Result: %d \n", newfilename, result);
|
||||
+
|
||||
+ //copy back to wav_out_file string for ncurses display
|
||||
+ memcpy (opts->wav_out_file, newfilename, 1023);
|
||||
+ opts->wav_out_file[1023] = 0;
|
||||
+
|
||||
}
|
||||
|
||||
void closeWavOutFileL (dsd_opts * opts, dsd_state * state)
|
||||
@@ -562,6 +572,16 @@ void closeWavOutFileL (dsd_opts * opts, dsd_state * state)
|
||||
UNUSED(state);
|
||||
|
||||
sf_close(opts->wav_out_f);
|
||||
+ char newfilename[1032];
|
||||
+ int result; UNUSED(result);
|
||||
+ sprintf (newfilename, "%s.wav", opts->wav_out_file);
|
||||
+ result = rename (opts->wav_out_file, newfilename);
|
||||
+ // fprintf (stderr, "\n Close WAV FileL %s; Result: %d \n", newfilename, result);
|
||||
+
|
||||
+ //copy back to wav_out_file string for ncurses display
|
||||
+ memcpy (opts->wav_out_file, newfilename, 1023);
|
||||
+ opts->wav_out_file[1023] = 0;
|
||||
+
|
||||
}
|
||||
|
||||
void closeWavOutFileR (dsd_opts * opts, dsd_state * state)
|
||||
@@ -569,6 +589,15 @@ void closeWavOutFileR (dsd_opts * opts, dsd_state * state)
|
||||
UNUSED(state);
|
||||
|
||||
sf_close(opts->wav_out_fR);
|
||||
+ char newfilename[1032];
|
||||
+ int result; UNUSED(result);
|
||||
+ sprintf (newfilename, "%s.wav", opts->wav_out_fileR);
|
||||
+ result = rename (opts->wav_out_fileR, newfilename);
|
||||
+ // fprintf (stderr, "\n Close WAV FileR %s; Result: %d \n", newfilename, result);
|
||||
+
|
||||
+ //copy back to wav_out_file string for ncurses display
|
||||
+ memcpy (opts->wav_out_fileR, newfilename, 1023);
|
||||
+ opts->wav_out_fileR[1023] = 0;
|
||||
}
|
||||
|
||||
void closeWavOutFileRaw (dsd_opts * opts, dsd_state * state)
|
||||
diff --git a/src/dsd_main.c b/src/dsd_main.c
|
||||
index 3fb0893..a6d45e5 100644
|
||||
--- a/src/dsd_main.c
|
||||
+++ b/src/dsd_main.c
|
||||
@@ -107,6 +107,32 @@ void
|
||||
noCarrier (dsd_opts * opts, dsd_state * state)
|
||||
{
|
||||
|
||||
+ //close any perCall wav files that are open
|
||||
+ if (opts->dmr_stereo_wav == 1 && opts->wav_out_f != NULL)
|
||||
+ {
|
||||
+ closeWavOutFileL (opts, state);
|
||||
+ opts->wav_out_f = NULL;
|
||||
+ }
|
||||
+ if (opts->dmr_stereo_wav == 1 && opts->wav_out_fR != NULL)
|
||||
+ {
|
||||
+ closeWavOutFileR (opts, state);
|
||||
+ opts->wav_out_fR = NULL;
|
||||
+ }
|
||||
+ //end perCall wav file close
|
||||
+
|
||||
+ //close any perCall wav files that are open
|
||||
+ if (opts->dmr_stereo_wav == 1 && opts->wav_out_f != NULL)
|
||||
+ {
|
||||
+ closeWavOutFileL (opts, state);
|
||||
+ opts->wav_out_f = NULL;
|
||||
+ }
|
||||
+ if (opts->dmr_stereo_wav == 1 && opts->wav_out_fR != NULL)
|
||||
+ {
|
||||
+ closeWavOutFileR (opts, state);
|
||||
+ opts->wav_out_fR = NULL;
|
||||
+ }
|
||||
+ //end perCall wav file close
|
||||
+
|
||||
// #ifdef AERO_BUILD //NOTE: Blame seems to be synctest8 not being initialized (will continue to test)
|
||||
// //TODO: Investigate why getSymbol needs to be run first in this context...truly confused here
|
||||
// if(opts->frame_m17 == 1) //&& opts->audio_in_type == 5
|
||||
@@ -1692,9 +1718,9 @@ main (int argc, char **argv)
|
||||
}
|
||||
|
||||
#ifdef AERO_BUILD
|
||||
- fprintf (stderr, "Build Version: AW (20231015) \n");
|
||||
+ fprintf (stderr, "Build Version: AW (20240601) G Build\n");
|
||||
#else
|
||||
- fprintf (stderr, "Build Version: AW %s \n", GIT_TAG);
|
||||
+ fprintf (stderr, "Build Version: AW %s G Build\n", GIT_TAG);
|
||||
#endif
|
||||
fprintf (stderr,"MBElib Version: %s\n", versionstr);
|
||||
|
||||
diff --git a/src/dsd_mbe.c b/src/dsd_mbe.c
|
||||
index fe71539..2702b5d 100644
|
||||
--- a/src/dsd_mbe.c
|
||||
+++ b/src/dsd_mbe.c
|
||||
@@ -1197,7 +1197,8 @@ processMbeFrame (dsd_opts * opts, dsd_state * state, char imbe_fr[8][23], char a
|
||||
if (state->dmr_encL == 0 || opts->dmr_mute_encL == 0)
|
||||
{
|
||||
//write wav to per call on left channel Slot 1
|
||||
- writeSynthesizedVoice (opts, state);
|
||||
+ if (opts->wav_out_f != NULL)
|
||||
+ writeSynthesizedVoice (opts, state);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1207,7 +1208,8 @@ processMbeFrame (dsd_opts * opts, dsd_state * state, char imbe_fr[8][23], char a
|
||||
if (state->dmr_encR == 0 || opts->dmr_mute_encR == 0)
|
||||
{
|
||||
//write wav to per call on right channel Slot 2
|
||||
- writeSynthesizedVoiceR (opts, state);
|
||||
+ if (opts->wav_out_fR != NULL)
|
||||
+ writeSynthesizedVoiceR (opts, state);
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/src/dsd_ncurses.c b/src/dsd_ncurses.c
|
||||
index a5442af..0cd538d 100644
|
||||
--- a/src/dsd_ncurses.c
|
||||
+++ b/src/dsd_ncurses.c
|
||||
@@ -1071,7 +1071,7 @@ void ncursesMenu (dsd_opts * opts, dsd_state * state)
|
||||
if (choicec == 12)
|
||||
{
|
||||
//flesh out all closewavs and sprint "" wav filenames
|
||||
- closeWavOutFile (opts, state);
|
||||
+ // closeWavOutFile (opts, state);
|
||||
closeWavOutFileL (opts, state);
|
||||
closeWavOutFileR (opts, state);
|
||||
//closeWavOutFileRaw (opts, state);
|
||||
@@ -2153,7 +2153,8 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state)
|
||||
char cs[200]; memcpy (cs, state->call_string[0], 200*sizeof(char));
|
||||
|
||||
//close old first, assign name based on time and radio, open wav file
|
||||
- closeWavOutFileL (opts, state);
|
||||
+ if (opts->wav_out_f != NULL)
|
||||
+ closeWavOutFileL (opts, state);
|
||||
|
||||
// sprintf (opts->wav_out_file, "%s/%s %s NXDN - RAN %d - DST %d - SRC %d.wav", opts->wav_out_dir, datestr, timestr, rn, tgn, src); //original
|
||||
sprintf (opts->wav_out_file, "%s/%s %s NXDN - RAN %d - %s - DST %d - SRC %d.wav", opts->wav_out_dir, datestr, timestr, rn, cs, tgn, src); //with call string
|
||||
@@ -2198,27 +2199,14 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state)
|
||||
call_matrix[9][5] = time(NULL);
|
||||
|
||||
//open wav file if enabled and both rd and tg are not 0
|
||||
- if (opts->dmr_stereo_wav == 1 && rd != 0 && tg != 0)
|
||||
- {
|
||||
- //setup a call string for the per call (group/private and/or emergency)
|
||||
- char cs[200]; memset (cs, 0, 200*sizeof(char));
|
||||
- int x = 0;
|
||||
- for (int i = 0; i < 200; i++)
|
||||
- {
|
||||
- //copy over non space and non termination values from call string
|
||||
- if (i != 0 && state->call_string[0][i] != ' ' && state->call_string[0][i] != 0)
|
||||
- cs[x++] = state->call_string[0][i];
|
||||
- }
|
||||
- cs[x] = 0; //terminate
|
||||
-
|
||||
- //close old first, assign name based on time and radio, open wav file
|
||||
- closeWavOutFileL (opts, state);
|
||||
-
|
||||
- // sprintf (opts->wav_out_file, "%s/%s %s MS - CC %d - TG %d - RD %d.wav", opts->wav_out_dir, datestr, timestr, dcc, tg, rd); //original
|
||||
- sprintf (opts->wav_out_file, "%s/%s %s MS - CC %d - %s - DST %d - SRC %d.wav", opts->wav_out_dir, datestr, timestr, dcc, cs, tg, rd); //with cs call string
|
||||
-
|
||||
- openWavOutFileL (opts, state); //testing for now, will want to move to per call later
|
||||
- }
|
||||
+ // if (opts->dmr_stereo_wav == 1 && rd != 0 && tg != 0)
|
||||
+ // {
|
||||
+ // //close old first, assign name based on time and radio, open wav file
|
||||
+ // if (opts->wav_out_f != NULL)
|
||||
+ // closeWavOutFileL (opts, state);
|
||||
+ // sprintf (opts->wav_out_file, "./%s/%s %s MS - CC %d - TG %d - RD %d.wav", opts->wav_out_dir, getDateN(), timestr, dcc, tg, rd);
|
||||
+ // openWavOutFileL (opts, state); //testing for now, will want to move to per call later
|
||||
+ // }
|
||||
|
||||
if (opts->call_alert == 1 && rd != 0 && tg != 0)
|
||||
{
|
||||
@@ -2233,7 +2221,7 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state)
|
||||
}
|
||||
|
||||
//DMR BS Slot 1 - matrix 0-4
|
||||
- if ( call_matrix[4][2] != rd && (lls == 11 || lls == 12 || lls == 10 || lls == 13 || lls == 35 || lls == 36) )
|
||||
+ if ( call_matrix[4][2] != rd && (lls == 11 || lls == 12 || lls == 10 || lls == 13 ) ) //|| lls == 35 || lls == 36
|
||||
{
|
||||
|
||||
for (short int k = 0; k < 4; k++)
|
||||
@@ -2254,27 +2242,14 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state)
|
||||
call_matrix[4][5] = time(NULL);
|
||||
|
||||
//open wav file if enabled and both rd and tg are not 0
|
||||
- if (opts->dmr_stereo_wav == 1 && rd != 0 && tg != 0)
|
||||
- {
|
||||
- //setup a call string for the per call (group/private and/or emergency)
|
||||
- char cs[200]; memset (cs, 0, 200*sizeof(char));
|
||||
- int x = 0;
|
||||
- for (int i = 0; i < 200; i++)
|
||||
- {
|
||||
- //copy over non space and non termination values from call string
|
||||
- if (i != 0 && state->call_string[0][i] != ' ' && state->call_string[0][i] != 0)
|
||||
- cs[x++] = state->call_string[0][i];
|
||||
- }
|
||||
- cs[x] = 0; //terminate
|
||||
-
|
||||
- //close old first, assign name based on time and radio, open wav file
|
||||
- closeWavOutFileL (opts, state);
|
||||
-
|
||||
- // sprintf (opts->wav_out_file, "%s/%s %s CC %d - TG %d - RD %d.wav", opts->wav_out_dir, datestr, timestr, dcc, tg, rd); //original
|
||||
- sprintf (opts->wav_out_file, "%s/%s %s CC %d - %s - DST %d - SRC %d.wav", opts->wav_out_dir, datestr, timestr, dcc, cs, tg, rd); //with call string
|
||||
-
|
||||
- openWavOutFileL (opts, state); //testing for now, will want to move to per call later
|
||||
- }
|
||||
+ // if (opts->dmr_stereo_wav == 1 && rd != 0 && tg != 0)
|
||||
+ // {
|
||||
+ // //close old first, assign name based on time and radio, open wav file
|
||||
+ // if (opts->wav_out_f != NULL)
|
||||
+ // closeWavOutFileL (opts, state);
|
||||
+ // sprintf (opts->wav_out_file, "./%s/%s %s CC %d - TG %d - RD %d", opts->wav_out_dir, getDateN(), timestr, dcc, tg, rd);
|
||||
+ // openWavOutFileL (opts, state); //testing for now, will want to move to per call later
|
||||
+ // }
|
||||
|
||||
if (opts->call_alert == 1 && rd != 0 && tg != 0)
|
||||
{
|
||||
@@ -2310,34 +2285,21 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state)
|
||||
call_matrix[9][5] = time(NULL);
|
||||
|
||||
//open wav file if enabled and both rdR and tgR are not 0
|
||||
- if (opts->dmr_stereo_wav == 1 && rdR != 0 && tgR != 0)
|
||||
- {
|
||||
- //setup a call string for the per call (group/private and/or emergency)
|
||||
- char cs[200]; memset (cs, 0, 200*sizeof(char));
|
||||
- int x = 0;
|
||||
- for (int i = 0; i < 200; i++)
|
||||
- {
|
||||
- //copy over non space and non termination values from call string
|
||||
- if (i != 0 && state->call_string[1][i] != ' ' && state->call_string[1][i] != 0)
|
||||
- cs[x++] = state->call_string[1][i];
|
||||
- }
|
||||
- cs[x] = 0; //terminate
|
||||
-
|
||||
- //close old first, assign name based on time and radio, open wav file
|
||||
- closeWavOutFileR (opts, state);
|
||||
-
|
||||
- // sprintf (opts->wav_out_fileR, "%s/%s %s CC %d - TG %d - RD %d.wav", opts->wav_out_dir, datestr, timestr, dcc, tgR, rdR); //original
|
||||
- sprintf (opts->wav_out_fileR, "%s/%s %s CC %d - %s - DST %d - SRC %d.wav", opts->wav_out_dir, datestr, timestr, dcc, cs, tgR, rdR); //with call string
|
||||
-
|
||||
- openWavOutFileR (opts, state); //testing for now, will want to move to per call later
|
||||
- }
|
||||
+ // if (opts->dmr_stereo_wav == 1 && rdR != 0 && tgR != 0)
|
||||
+ // {
|
||||
+ // //close old first, assign name based on time and radio, open wav file
|
||||
+ // if (opts->wav_out_fR != NULL)
|
||||
+ // closeWavOutFileR (opts, state);
|
||||
+ // sprintf (opts->wav_out_fileR, "./%s/%s %s CC %d - TG %d - RD %d", opts->wav_out_dir, getDateN(), timestr, dcc, tgR, rdR);
|
||||
+ // openWavOutFileR (opts, state); //testing for now, will want to move to per call later
|
||||
+ // }
|
||||
|
||||
- if (opts->call_alert == 1 && rdR != 0 && tgR != 0)
|
||||
- {
|
||||
- //fprintf (stderr, "BEEP 1 BS RIGHT\n");
|
||||
- beeper (opts, state, 1);
|
||||
- state->dmr_end_alert[1] = 0; //new voice frame, okay to beep at the end of it
|
||||
- }
|
||||
+ // if (opts->call_alert == 1 && rdR != 0 && tgR != 0)
|
||||
+ // {
|
||||
+ // //fprintf (stderr, "BEEP 1 BS RIGHT\n");
|
||||
+ // beeper (opts, state, 1);
|
||||
+ // state->dmr_end_alert[1] = 0; //new voice frame, okay to beep at the end of it
|
||||
+ // }
|
||||
|
||||
memset(state->dmr_alias_block_segment[1], 0, sizeof(state->dmr_alias_block_segment[1]));
|
||||
sprintf (state->dmr_embedded_gps[1], "%s", "");
|
||||
@@ -2423,8 +2385,8 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state)
|
||||
if (opts->ncurses_compact == 1)
|
||||
{
|
||||
printw ("------------------------------------------------------------------------------\n");
|
||||
- printw ("| Digital Speech Decoder: Florida Man Edition - Aero %s \n", "AW (20231015)");
|
||||
- printw ("------------------------------------------------------------------------------\n");
|
||||
+ printw ("| Digital Speech Decoder: Florida Man Edition - Aero %s \n", "AW (20240601)");
|
||||
+ printw ("------------------------------------------------------------------------------\n");
|
||||
}
|
||||
#elif LIMAZULUTWEAKS
|
||||
if (opts->ncurses_compact == 1)
|
||||
@@ -2462,13 +2424,13 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state)
|
||||
if (i == 4 && opts->frame_m17 == 1) printw (" CODEC2");
|
||||
#endif
|
||||
#ifdef AERO_BUILD
|
||||
- if (i == 5) printw (" %s ", "Aero Build");
|
||||
- if (i == 6) printw (" AW (20231015) \n");
|
||||
+ if (i == 5) printw (" %s ", "G Build");
|
||||
+ if (i == 6) printw (" AW (20240601) \n");
|
||||
#elif ZDEV_BUILD
|
||||
- if (i == 5) printw (" %s ", "AW ");
|
||||
+ if (i == 5) printw (" %s ", "AW G Build");
|
||||
if (i == 6) printw (" %s \n", GIT_TAG);
|
||||
- #else
|
||||
- if (i == 5) printw (" %s ", "AW ");
|
||||
+ #else
|
||||
+ if (i == 5) printw (" %s ", "AW G Build");
|
||||
if (i == 6) printw (" %s \n", GIT_TAG);
|
||||
#endif
|
||||
else printw ("\n");
|
||||
@@ -4426,7 +4388,7 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state)
|
||||
if (c == 112) //'p' key - stop all per call wav files
|
||||
{
|
||||
//hope this one doesn't cause random crashing or garbage writing
|
||||
- closeWavOutFile (opts, state);
|
||||
+ // closeWavOutFile (opts, state);
|
||||
closeWavOutFileL (opts, state);
|
||||
closeWavOutFileR (opts, state);
|
||||
sprintf (opts->wav_out_file, "%s", "");
|
||||
Reference in New Issue
Block a user