do not compare values if they are implausible
This commit is contained in:
parent
46e2fb725b
commit
1264f4678a
|
|
@ -341,6 +341,7 @@ func WriteDatapoint(mytime int64, deveui string, devaddr string, v uint8, h uint
|
|||
WriteStringToFile(s, deveui, implausible)
|
||||
|
||||
w_gram := uint32(w) * 5
|
||||
if !implausible {
|
||||
addValue(deveui, w_gram)
|
||||
w_loss := getMaxValue(deveui) - w_gram
|
||||
if w_loss > 750 && IsDayTime() {
|
||||
|
|
@ -351,6 +352,7 @@ func WriteDatapoint(mytime int64, deveui string, devaddr string, v uint8, h uint
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func WriteStringToFile(s string, deveui string, implausible bool) {
|
||||
if !implausible {
|
||||
|
|
|
|||
Loading…
Reference in New Issue