kopia lustrzana https://github.com/rs1729/RS
minor bug fixes
rodzic
15262dcf2c
commit
c4ed09cfbb
|
@ -775,7 +775,7 @@ int init_buffers(char hdr[], int hLen, float BT, int opt_iq) {
|
|||
b += b0*pulse(t+1, sigma);
|
||||
}
|
||||
|
||||
if (pos < hLen) {
|
||||
if (pos < hLen-1) {
|
||||
b2 = ((hdr[pos+1] & 0x1) - 0.5)*2.0;
|
||||
b += b2*pulse(t-1, sigma);
|
||||
}
|
||||
|
|
|
@ -906,8 +906,8 @@ int main(int argc, char **argv) {
|
|||
herrs = headcmp(1, rawheader, headerlen, mv_pos, mv<0, option_dc); // header nicht manchester!
|
||||
herr1 = 0;
|
||||
if (herrs <= 3 && herrs > 0) {
|
||||
herr1 = headcmp(1, rawheader, headerlen, mv_pos+1, mv<0, option_dc);
|
||||
//int herr2 = headcmp(1, rawheader, headerlen, mv_pos-1, mv<0, option_dc);
|
||||
herr1 = headcmp(1, rawheader, headerlen, mv_pos+1, mv<0, 0); // nur 1x dc
|
||||
//int herr2 = headcmp(1, rawheader, headerlen, mv_pos-1, mv<0, 0);
|
||||
if (herr1 < herrs) {
|
||||
herrs = herr1;
|
||||
herr1 = 1;
|
||||
|
|
|
@ -1334,11 +1334,11 @@ int main(int argc, char *argv[]) {
|
|||
ft_len = frmlen;
|
||||
|
||||
while ( byte_count < frmlen ) {
|
||||
if (option_iq) {
|
||||
bitQ = read_IDsbit(fp, symlen, &bit, option_inv, bitofs, bit_count==0, 0); // symlen=1, return: zeroX/bit
|
||||
if (option_iq >= 2) {
|
||||
bitQ = read_IDsbit(fp, symlen, &bit, option_inv, bitofs, bit_count==0, 0); // symlen=1
|
||||
}
|
||||
else {
|
||||
bitQ = read_sbit(fp, symlen, &bit, option_inv, bitofs, bit_count==0, 0); // symlen=1, return: zeroX/bit
|
||||
bitQ = read_sbit(fp, symlen, &bit, option_inv, bitofs, bit_count==0, 0); // symlen=1
|
||||
}
|
||||
if ( bitQ == EOF) break;
|
||||
bit_count += 1;
|
||||
|
|
|
@ -594,7 +594,7 @@ static int init_buffers() {
|
|||
b += b0*pulse(t+1, sigma);
|
||||
}
|
||||
|
||||
if (pos < hLen) {
|
||||
if (pos < hLen-1) {
|
||||
b2 = ((bits[pos+1] & 0x1) - 0.5)*2.0;
|
||||
b += b2*pulse(t-1, sigma);
|
||||
}
|
||||
|
@ -682,9 +682,7 @@ int main(int argc, char **argv) {
|
|||
else if ( (strcmp(*argv, "-v") == 0) || (strcmp(*argv, "--verbose") == 0) ) {
|
||||
option_verbose = 1;
|
||||
}
|
||||
else if ( (strcmp(*argv, "--dc") == 0) ) {
|
||||
option_dc = 1;
|
||||
}
|
||||
//else if ( (strcmp(*argv, "--dc") == 0) ) { option_dc = 1; }
|
||||
else if ( (strcmp(*argv, "-s") == 0) || (strcmp(*argv, "--silent") == 0) ) {
|
||||
option_silent = 1;
|
||||
}
|
||||
|
@ -754,7 +752,7 @@ int main(int argc, char **argv) {
|
|||
if (mp[j] > 0 && (mv[j] > rs_hdr[j].thres || mv[j] < -rs_hdr[j].thres)) {
|
||||
if (mv_pos[j] > mv0_pos[j]) {
|
||||
|
||||
herrs = headcmp(1, rs_hdr[j].header, rs_hdr[j].hLen, mv_pos[j], mv[j]<0, option_dc, rs_hdr[j].spb);
|
||||
herrs = headcmp(1, rs_hdr[j].header, rs_hdr[j].hLen, mv_pos[j], mv[j]<0, 0, rs_hdr[j].spb);
|
||||
if (herrs < 2) { // max 1 bitfehler in header
|
||||
|
||||
if ( strncmp(rs_hdr[j].type, "IMET", 4) == 0 )
|
||||
|
|
Ładowanie…
Reference in New Issue