diff --git a/src/dmr_bs.c b/src/dmr_bs.c index b22c5b0..a8e2f59 100644 --- a/src/dmr_bs.c +++ b/src/dmr_bs.c @@ -702,8 +702,8 @@ void dmrBS (dsd_opts * opts, dsd_state * state) } else if (state->payload_algid == 0x02) { - hytera_enhanced_alg_refresh(state); state->currentslot = 0; + hytera_enhanced_alg_refresh(state); dmr_alg_refresh (opts, state); } if (state->payload_algidR >= 0x21) @@ -713,8 +713,8 @@ void dmrBS (dsd_opts * opts, dsd_state * state) } else if (state->payload_algidR == 0x02) { - hytera_enhanced_alg_refresh(state); state->currentslot = 1; + hytera_enhanced_alg_refresh(state); dmr_alg_refresh (opts, state); } @@ -1069,10 +1069,10 @@ void dmrBSBootstrap (dsd_opts * opts, dsd_state * state) state->currentslot = 1; dmr_alg_refresh (opts, state); } - else if (state->payload_algid == 0x02) + else if (state->payload_algidR == 0x02) { - hytera_enhanced_alg_refresh(state); state->currentslot = 1; + hytera_enhanced_alg_refresh(state); dmr_alg_refresh (opts, state); } diff --git a/src/dsd_alias.c b/src/dsd_alias.c index 5b2086f..ec70e56 100644 --- a/src/dsd_alias.c +++ b/src/dsd_alias.c @@ -581,11 +581,15 @@ void tait_iso7_embedded_alias_decode (dsd_opts * opts, dsd_state * state, uint8_ for (uint8_t i = 0; i < len; i++) { alias[i] = (uint8_t)ConvertBitIntoBytes(&input[16+(i*7)], 7); - fprintf (stderr, "%c", alias[i]); + + // fprintf (stderr, "%X,", alias[i]); //debug + if (alias[i] == 0x2C) //change a comma to a dot alias[i] = 0x2E; else if (alias[i] < 0x20) //change any garble / control chars to a space alias[i] = 0x20; + + fprintf (stderr, "%c", alias[i]); } //flag to indicate this already exists in import or group struct diff --git a/src/rtl_sdr_fm.cpp b/src/rtl_sdr_fm.cpp index 4e5c2f4..8667475 100644 --- a/src/rtl_sdr_fm.cpp +++ b/src/rtl_sdr_fm.cpp @@ -465,27 +465,27 @@ void dc_block_filter(struct demod_state *fm) } long int rms(int16_t *samples, int len, int step) -/* largely lifted from rtl_power */ { int i; - long int rms; - long p, t, s; - double dc, err; + long int rms_val; + int64_t p = 0, t = 0; + int64_t s; - p = t = 0L; - for (i=0; i