Closed RodionGork closed 2 years ago
Dear Friends, @brocaar and @sagar-patel-sls please have a look at this, if possible. Sorry for disturbing, but of course it would be nice if we can amend it here "in upstream".
Dear Friends, @brocaar and @sagar-patel-sls please have a look at this, if possible. Sorry for disturbing, but of course it would be nice if we can amend it here "in upstream".
Hi @RodionGork thank you for your efforts. Let's wait for @brocaar confirmation/suggestions.
It is very small fix - when processing
push data
received fromudp
insemtech_udp
backend, the location is lost.in
backend.go
- location just is not copied between two data objects when copying other fields, inhandleStats
. we can clone it here rather than assign, but since it was freshly created, this makes no difference.in
push_data.go
we obviously wanted to check if the whole structure was decoded from JSON and has any non-zero fields, we needOR
aggregation here rather thanAND
- otherwise location is not copied for example ifAltitude = 0
which may happen in gateway simulator or even in real device if the field is ignored.