diff options
author | Jan-Piet Mens <jpmens@gmail.com> | 2017-06-13 22:27:52 +0200 |
---|---|---|
committer | Jan-Piet Mens <jpmens@gmail.com> | 2017-06-14 07:57:40 +0200 |
commit | c9ba2fc87382a5a872cc7a34410f9be31bac6cfe (patch) | |
tree | 15811b1e7dea4d18dc76830fbb33bccd91558783 /src/org/traccar/protocol | |
parent | 96f37bd4206ad2f2034c026881230ca40436253d (diff) | |
download | trackermap-server-c9ba2fc87382a5a872cc7a34410f9be31bac6cfe.tar.gz trackermap-server-c9ba2fc87382a5a872cc7a34410f9be31bac6cfe.tar.bz2 trackermap-server-c9ba2fc87382a5a872cc7a34410f9be31bac6cfe.zip |
indentation
Diffstat (limited to 'src/org/traccar/protocol')
-rw-r--r-- | src/org/traccar/protocol/OwnTracksProtocolDecoder.java | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/org/traccar/protocol/OwnTracksProtocolDecoder.java b/src/org/traccar/protocol/OwnTracksProtocolDecoder.java index 60f94db96..4baafc118 100644 --- a/src/org/traccar/protocol/OwnTracksProtocolDecoder.java +++ b/src/org/traccar/protocol/OwnTracksProtocolDecoder.java @@ -56,7 +56,7 @@ public class OwnTracksProtocolDecoder extends BaseProtocolDecoder { HttpRequest request = (HttpRequest) msg; JsonObject root = Json.createReader( - new StringReader(request.getContent().toString(StandardCharsets.US_ASCII))).readObject(); + new StringReader(request.getContent().toString(StandardCharsets.US_ASCII))).readObject(); Position position = new Position(); position.setProtocol(getProtocolName()); @@ -66,22 +66,22 @@ public class OwnTracksProtocolDecoder extends BaseProtocolDecoder { position.setLongitude(root.getJsonNumber("lon").doubleValue()); if (root.containsKey("vel")) { - position.setSpeed(UnitsConverter.knotsFromCps(root.getInt("vel"))); + position.setSpeed(UnitsConverter.knotsFromCps(root.getInt("vel"))); } if (root.containsKey("alt")) { - position.setAltitude(root.getInt("alt")); + position.setAltitude(root.getInt("alt")); } if (root.containsKey("cog")) { - position.setCourse(root.getInt("cog")); + position.setCourse(root.getInt("cog")); } if (root.containsKey("acc")) { - position.setAccuracy(root.getInt("acc")); + position.setAccuracy(root.getInt("acc")); } if (root.containsKey("t")) { - position.set("t", root.getString("t")); + position.set("t", root.getString("t")); } if (root.containsKey("batt")) { - position.set(Position.KEY_BATTERY, root.getInt("batt")); + position.set(Position.KEY_BATTERY, root.getInt("batt")); } long timestamp = root.getJsonNumber("tst").longValue(); @@ -92,8 +92,8 @@ public class OwnTracksProtocolDecoder extends BaseProtocolDecoder { DeviceSession deviceSession = getDeviceSession(channel, remoteAddress, root.getString("tid")); if (deviceSession == null) { - sendResponse(channel, HttpResponseStatus.BAD_REQUEST); - return null; + sendResponse(channel, HttpResponseStatus.BAD_REQUEST); + return null; } position.setDeviceId(deviceSession.getDeviceId()); |