re-enable data with no GPS position

This commit is contained in:
Joerg Lehmann 2021-04-19 17:24:09 +02:00
parent 28981f3411
commit 4960fc86e9
1 changed files with 1 additions and 5 deletions

View File

@ -95,11 +95,7 @@ func DecodePayload(s string, deveui string) {
mystring := fmt.Sprintf("measurement,deveui=%s lat=%.5f,lon=%.5f,vbat=%d,fw=%d %d\n", deveui, float32(pl.Latitude)/1000000.0, float32(pl.Longitude)/1000000.0, vbat, fw, (time.Now().Unix() * 1000 * 1000 * 1000)) mystring := fmt.Sprintf("measurement,deveui=%s lat=%.5f,lon=%.5f,vbat=%d,fw=%d %d\n", deveui, float32(pl.Latitude)/1000000.0, float32(pl.Longitude)/1000000.0, vbat, fw, (time.Now().Unix() * 1000 * 1000 * 1000))
if pl.Longitude == 0 { WriteStringToFile(mystring, deveui)
fmt.Printf("Meaurement without GPS Position: %s", mystring)
} else {
WriteStringToFile(mystring, deveui)
}
} else { } else {
log.Printf("Payload is not >= 11 bytes (22 chars): %s", s) log.Printf("Payload is not >= 11 bytes (22 chars): %s", s)