do not compare values if they are implausible
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user