mirror of
https://github.com/KubaPro010/fm-dx-webserver.git
synced 2026-07-29 16:29:19 +02:00
debug
This commit is contained in:
+4
-2
@@ -289,7 +289,7 @@ class RDSDecoder {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(d_error < 2) {
|
if(d_error < 2) {
|
||||||
const offset = (multiplier == 2) ? 0 : 2;
|
const offset = multiplier - 2;
|
||||||
const err = Math.ceil(d_error * (10/3));
|
const err = Math.ceil(d_error * (10/3));
|
||||||
const old_err = this.rt1_errors[idx * multiplier + offset];
|
const old_err = this.rt1_errors[idx * multiplier + offset];
|
||||||
if(err < old_err) {
|
if(err < old_err) {
|
||||||
@@ -320,6 +320,7 @@ class RDSDecoder {
|
|||||||
if(c_error < 2 && multiplier !== 2) {
|
if(c_error < 2 && multiplier !== 2) {
|
||||||
const err = Math.ceil(c_error * (10/3));
|
const err = Math.ceil(c_error * (10/3));
|
||||||
const old_err = this.rt0_errors[idx * multiplier];
|
const old_err = this.rt0_errors[idx * multiplier];
|
||||||
|
console.log(err, old_err);
|
||||||
if(err < old_err) {
|
if(err < old_err) {
|
||||||
this.rt0[idx * multiplier] = decode_charset(blockC >> 8);
|
this.rt0[idx * multiplier] = decode_charset(blockC >> 8);
|
||||||
this.rt0[idx * multiplier + 1] = decode_charset(blockC & 0xFF);
|
this.rt0[idx * multiplier + 1] = decode_charset(blockC & 0xFF);
|
||||||
@@ -328,9 +329,10 @@ class RDSDecoder {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(d_error < 2) {
|
if(d_error < 2) {
|
||||||
const offset = (multiplier == 2) ? 0 : 2;
|
const offset = multiplier - 2; // 2 or 0
|
||||||
const err = Math.ceil(d_error * (10/3));
|
const err = Math.ceil(d_error * (10/3));
|
||||||
const old_err = this.rt0_errors[idx * multiplier + offset];
|
const old_err = this.rt0_errors[idx * multiplier + offset];
|
||||||
|
console.log(err, old_err, offset);
|
||||||
if(err < old_err) {
|
if(err < old_err) {
|
||||||
this.rt0[idx * multiplier + offset] = decode_charset(blockD >> 8);
|
this.rt0[idx * multiplier + offset] = decode_charset(blockD >> 8);
|
||||||
this.rt0[idx * multiplier + offset + 1] = decode_charset(blockD & 0xFF);
|
this.rt0[idx * multiplier + offset + 1] = decode_charset(blockD & 0xFF);
|
||||||
|
|||||||
Reference in New Issue
Block a user