Skip to content

Commit

Permalink
Rebase m20mod
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Jessop authored and Mark Jessop committed Aug 23, 2024
1 parent efe9918 commit a86f210
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions demod/mod/m20mod.c
Original file line number Diff line number Diff line change
Expand Up @@ -1098,7 +1098,8 @@ int main(int argc, char **argv) {
spike = 1;
}
else if (strcmp(*argv, "--ch2") == 0) { sel_wavch = 1; } // right channel (default: 0=left)
else if (strcmp(*argv, "--softin") == 0) { option_softin = 1; } // float32 soft input
else if (strcmp(*argv, "--softin") == 0) { option_softin = 1; } // float32 soft input
else if (strcmp(*argv, "--softinv") == 0) { option_softin = 2; } // float32 inverted soft input
else if (strcmp(*argv, "--silent") == 0) { gpx.option.slt = 1; }
else if (strcmp(*argv, "--ths") == 0) {
++argv;
Expand Down Expand Up @@ -1301,7 +1302,7 @@ int main(int argc, char **argv) {
while ( 1 )
{
if (option_softin) {
header_found = find_softbinhead(fp, &hdb, &_mv);
header_found = find_softbinhead(fp, &hdb, &_mv, option_softin == 2);
}
else { // FM-audio:
header_found = find_header(&dsp, thres, 2, bitofs, dsp.opt_dc); // optional 2nd pass: dc=0
Expand All @@ -1328,9 +1329,9 @@ int main(int argc, char **argv) {
float s1 = 0.0;
float s2 = 0.0;
float s = 0.0;
bitQ = f32soft_read(fp, &s1);
bitQ = f32soft_read(fp, &s1, option_softin == 2);
if (bitQ != EOF) {
bitQ = f32soft_read(fp, &s2);
bitQ = f32soft_read(fp, &s2, option_softin == 2);
if (bitQ != EOF) {
s = s2-s1; // integrate both symbols // only 2nd Manchester symbol: s2
bit = (s>=0.0); // no soft decoding
Expand Down Expand Up @@ -1364,7 +1365,7 @@ int main(int argc, char **argv) {
while ( bitpos < 5*BITFRAME_LEN ) {
if (option_softin) {
float s = 0.0;
bitQ = f32soft_read(fp, &s);
bitQ = f32soft_read(fp, &s, option_softin == 2);
}
else {
bitQ = read_slbit(&dsp, &bit, 0, bitofs, bitpos, -1, 0); // symlen=2
Expand Down

0 comments on commit a86f210

Please sign in to comment.