ttn listener:Delete debug lines
This commit is contained in:
parent
5f5a4382a3
commit
7469d4c1bf
2 changed files with 3 additions and 3 deletions
|
@ -63,7 +63,7 @@
|
||||||
|
|
||||||
// Uncomment to cause the system to check the newest GPS value against the last one, and only transmit a reading if they differ by more than (0.0003, 0.0002) - ~(20m, 14m).
|
// Uncomment to cause the system to check the newest GPS value against the last one, and only transmit a reading if they differ by more than (0.0003, 0.0002) - ~(20m, 14m).
|
||||||
// Unhelpful for debugging, but useful in production to reduce the number of messages sent when stationary.
|
// Unhelpful for debugging, but useful in production to reduce the number of messages sent when stationary.
|
||||||
#define GPS_DELTA_CHECK
|
// #define GPS_DELTA_CHECK
|
||||||
|
|
||||||
#define GPS_DELTA_MIN_LAT 0.0003
|
#define GPS_DELTA_MIN_LAT 0.0003
|
||||||
#define GPS_DELTA_MIN_LNG 0.0002
|
#define GPS_DELTA_MIN_LNG 0.0002
|
||||||
|
|
|
@ -10,12 +10,12 @@ function decode_payload(payload_base64, key_hex) {
|
||||||
let payload_buffer_enc = Buffer.from(payload_base64, "base64");
|
let payload_buffer_enc = Buffer.from(payload_base64, "base64");
|
||||||
let key_buffer = Buffer.from(key_hex, "hex");
|
let key_buffer = Buffer.from(key_hex, "hex");
|
||||||
|
|
||||||
console.log(payload_buffer_enc);
|
// console.log(payload_buffer_enc);
|
||||||
|
|
||||||
let aes_ecb = new aes.ModeOfOperation.ecb(key_buffer);
|
let aes_ecb = new aes.ModeOfOperation.ecb(key_buffer);
|
||||||
let payload_buffer = Buffer.from(aes_ecb.decrypt(payload_buffer_enc).buffer);
|
let payload_buffer = Buffer.from(aes_ecb.decrypt(payload_buffer_enc).buffer);
|
||||||
|
|
||||||
console.debug(payload_buffer);
|
// console.debug(payload_buffer);
|
||||||
// console.debug(`Offsets: ${offset_id}, ${offset_lat}, ${offset_lng}`);
|
// console.debug(`Offsets: ${offset_id}, ${offset_lat}, ${offset_lng}`);
|
||||||
// console.debug(`Message hex: ${payload_buffer.toString("hex")}`)
|
// console.debug(`Message hex: ${payload_buffer.toString("hex")}`)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue