From 46de03d67110a7f26124697545d1194864fcbcc8 Mon Sep 17 00:00:00 2001 From: Joerg Lehmann Date: Sat, 29 Feb 2020 13:13:52 +0100 Subject: [PATCH] fix unrealistic measurement --- lorahandler.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lorahandler.go b/lorahandler.go index 47902af..89b4ff0 100644 --- a/lorahandler.go +++ b/lorahandler.go @@ -223,7 +223,8 @@ func DecodePayload(s string, deveui string, devaddr string, lrrlat float32, lrrl if (w32 < 0) { w = 0 } else if (w32 > 65535) { - w = 65535 + // this is not realistic (>320 kg), we set this to 0 as well... + w = 0 } else { w = uint16(w32) }