fix unrealistic measurement

This commit is contained in:
Joerg Lehmann 2020-02-29 13:13:52 +01:00
parent 406282fe2c
commit 46de03d671
1 changed files with 2 additions and 1 deletions

View File

@ -223,7 +223,8 @@ func DecodePayload(s string, deveui string, devaddr string, lrrlat float32, lrrl
if (w32 < 0) { if (w32 < 0) {
w = 0 w = 0
} else if (w32 > 65535) { } else if (w32 > 65535) {
w = 65535 // this is not realistic (>320 kg), we set this to 0 as well...
w = 0
} else { } else {
w = uint16(w32) w = uint16(w32)
} }