Browse Source

ttn listener:Delete debug lines

master
Starbeamrainbowlabs 3 years ago
parent
commit
7469d4c1bf
  1. 2
      iot/main/settings.h
  2. 4
      server/ttn-app-server/DecodePayload.mjs

2
iot/main/settings.h

@ -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).
// 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_LNG 0.0002

4
server/ttn-app-server/DecodePayload.mjs

@ -10,12 +10,12 @@ function decode_payload(payload_base64, key_hex) {
let payload_buffer_enc = Buffer.from(payload_base64, "base64");
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 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(`Message hex: ${payload_buffer.toString("hex")}`)

Loading…
Cancel
Save