From 87bf997b6e472fb26d118924246d9cdb0bf30f9f Mon Sep 17 00:00:00 2001 From: lwvmobile Date: Sat, 1 Jul 2023 18:44:14 -0400 Subject: [PATCH] Add YSF to default decoding class; #143 --- examples/Example_Usage.md | 3 ++- src/dsd_frame_sync.c | 2 +- src/dsd_main.c | 16 ++++++++-------- src/dsd_ncurses.c | 10 +++++----- 4 files changed, 16 insertions(+), 15 deletions(-) diff --git a/examples/Example_Usage.md b/examples/Example_Usage.md index 127fb99..a6c20fc 100644 --- a/examples/Example_Usage.md +++ b/examples/Example_Usage.md @@ -3,7 +3,7 @@ `dsd-fme` is all you need to run for pulse input, pulse output, and auto detect for DMR BS/MS, and P25. To use other decoding methods which cannot be auto detected, please use the following command line switches. Make sure to route audio into and out of DSD-FME using pavucontrol and virtual sinks as needed. ``` --ft XDMA decoder class (P25 1 and 2, and DMR Stereo) +-ft XDMA decoder class (P25p1 and p2, YSF, and DMR Stereo) -fs DMR Stereo, also may need to use -xr if inverted DMR -fa Legacy Auto (not recommended) -fi NXDN48 @@ -14,6 +14,7 @@ -f1 P25P1 -f2 P25P2 (may need to specify wacn/sys/nac manually) -fx X2-TDMA +-fy YSF ``` ## Conventional Frequency "Fast Scanner" diff --git a/src/dsd_frame_sync.c b/src/dsd_frame_sync.c index 7103e59..be8ed58 100644 --- a/src/dsd_frame_sync.c +++ b/src/dsd_frame_sync.c @@ -233,7 +233,7 @@ getFrameSync (dsd_opts * opts, dsd_state * state) { t_max = 12; //based on Frame_Sync_2 pattern } - else if (opts->frame_ysf == 1) + else if (state->lastsynctype == 30 || state->lastsynctype == 31 ) { t_max = 20; //20 on YSF } diff --git a/src/dsd_main.c b/src/dsd_main.c index e26dfde..e4723c2 100644 --- a/src/dsd_main.c +++ b/src/dsd_main.c @@ -536,7 +536,7 @@ initOpts (dsd_opts * opts) opts->frame_dmr = 1; opts->frame_dpmr = 0; opts->frame_provoice = 0; - opts->frame_ysf = 0; //forgot to init this, and Cygwin treated as it was turned on. + opts->frame_ysf = 1; opts->mod_c4fm = 1; opts->mod_qpsk = 0; opts->mod_gfsk = 0; @@ -1126,11 +1126,11 @@ usage () printf (" -f2 Decode only P25 Phase 2 (6000 sps) **\n"); printf (" -fd Decode only D-STAR\n"); printf (" -fx Decode only X2-TDMA\n"); + printf (" -fy Decode only YSF\n"); printf (" -fi Decode only NXDN48* (6.25 kHz) / IDAS*\n"); printf (" -fn Decode only NXDN96* (12.5 kHz)\n"); printf (" -fp Decode only EDACS/ProVoice*\n"); printf (" -fm Decode only dPMR*\n"); - printf (" -fy Decode only YSF*\n"); printf (" -l Disable DMR, dPMR, and NXDN input filtering\n"); printf (" -u Unvoiced speech quality (default=3)\n"); printf (" -xx Expect non-inverted X2-TDMA signal\n"); @@ -1152,8 +1152,8 @@ usage () printf (" (default=36)\n"); printf (" -M Min/Max buffer size for QPSK decision point tracking\n"); printf (" (default=15)\n"); - printf (" -ma Auto-select modulation optimizations (default)\n"); - printf (" -mc Use only C4FM modulation optimizations\n"); + printf (" -ma Auto-select modulation optimizations\n"); + printf (" -mc Use only C4FM modulation optimizations (default)\n"); printf (" -mg Use only GFSK modulation optimizations\n"); printf (" -mq Use only QPSK modulation optimizations\n"); printf (" -m2 Use P25p2 6000 sps QPSK modulation optimizations\n"); @@ -1774,11 +1774,11 @@ main (int argc, char **argv) opts.frame_dmr = 1; opts.frame_dpmr = 0; opts.frame_provoice = 0; - opts.frame_ysf = 0; + opts.frame_ysf = 1; opts.pulse_digi_rate_out = 48000; // /dev/dsp does need this set to 48000 to properly process the upsampling opts.pulse_digi_out_channels = 1; - opts.dmr_stereo = 1; //switching in 'stereo' for 'mono' - opts.dmr_mono = 0; + opts.dmr_stereo = 0; //switching in 'stereo' for 'mono' + opts.dmr_mono = 1; state.dmr_stereo = 0; //opts.setmod_bw = 7000; sprintf (opts.output_name, "Legacy Auto"); @@ -2000,7 +2000,7 @@ main (int argc, char **argv) opts.frame_dmr = 1; opts.frame_dpmr = 0; opts.frame_provoice = 0; - opts.frame_ysf = 0; + opts.frame_ysf = 1; opts.mod_c4fm = 1; opts.mod_qpsk = 0; opts.mod_gfsk = 0; diff --git a/src/dsd_ncurses.c b/src/dsd_ncurses.c index c848d21..680ce8d 100644 --- a/src/dsd_ncurses.c +++ b/src/dsd_ncurses.c @@ -543,7 +543,7 @@ void ncursesMenu (dsd_opts * opts, dsd_state * state) info_win = newwin(6, WIDTH+18, starty, startx+20); box (info_win, 0, 0); mvwprintw(info_win, 2, 2, " Legacy Auto can only detect the following:"); - mvwprintw(info_win, 3, 2, " P25-P1, D-STAR, DMR Mono, and X2-TDMA"); + mvwprintw(info_win, 3, 2, " P25p1, D-STAR, DMR Mono, YSF, and X2-TDMA"); wrefresh(info_win); } @@ -552,8 +552,8 @@ void ncursesMenu (dsd_opts * opts, dsd_state * state) info_win = newwin(7, WIDTH+18, starty, startx+20); box (info_win, 0, 0); mvwprintw(info_win, 2, 2, " XDMA Decoding Class Supports the following:"); - mvwprintw(info_win, 3, 2, " P25-P1, P25-P2, and DMR Stereo BS/MS"); - mvwprintw(info_win, 4, 2, " --C4FM / FSK4 only, and OP25 P2 Capture Bins"); + mvwprintw(info_win, 3, 2, " P25p1, P25p2, YSF, and DMR BS/MS"); + mvwprintw(info_win, 4, 2, " C4FM, FSK4, QPSK only (no H8D-QPSK)"); wrefresh(info_win); } @@ -1260,7 +1260,7 @@ void ncursesMenu (dsd_opts * opts, dsd_state * state) opts->frame_dmr = 1; opts->frame_dpmr = 0; opts->frame_provoice = 0; - opts->frame_ysf = 0; + opts->frame_ysf = 1; opts->mod_c4fm = 1; opts->mod_qpsk = 0; opts->mod_gfsk = 0; @@ -1393,7 +1393,7 @@ void ncursesMenu (dsd_opts * opts, dsd_state * state) opts->frame_nxdn96 = 0; opts->frame_dpmr = 0; opts->frame_provoice = 0; - opts->frame_ysf = 0; + opts->frame_ysf = 1; opts->mod_c4fm = 1; opts->mod_qpsk = 0; opts->mod_gfsk = 0;