Skip to content

Commit

Permalink
Fix model property name to reflect naming in the server application
Browse files Browse the repository at this point in the history
  • Loading branch information
PopescuStefanRadu authored and pires committed May 18, 2017
1 parent e9eb925 commit 5333b25
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/main/java/com/github/pires/obd/reader/net/ObdReading.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,20 @@
public class ObdReading {
private double latitude, longitude, altitude;
private long timestamp;
private String vehicleid; // vehicle id
private String vin; // vehicle id
private Map<String, String> readings;

public ObdReading() {
readings = new HashMap<>();
}

public ObdReading(double latitude, double longitude, double altitude, long timestamp,
String vehicleid, Map<String, String> readings) {
String vin, Map<String, String> readings) {
this.latitude = latitude;
this.longitude = longitude;
this.altitude = altitude;
this.timestamp = timestamp;
this.vehicleid = vehicleid;
this.vin = vin;
this.readings = readings;
}

Expand Down Expand Up @@ -72,11 +72,11 @@ public void setTimestamp(long timestamp) {
}

public String getVin() {
return vehicleid;
return vin;
}

public void setVin(String vehicleid) {
this.vehicleid = vehicleid;
this.vin = vehicleid;
}

public Map<String, String> getReadings() {
Expand All @@ -92,7 +92,7 @@ public String toString() {
return "lat:" + latitude + ";" +
"long:" + longitude + ";" +
"alt:" + altitude + ";" +
"vehicleid:" + vehicleid + ";" +
"vin:" + vin + ";" +
"readings:" + readings.toString().substring(10).replace("}", "").replace(",", ";");
}

Expand Down

0 comments on commit 5333b25

Please sign in to comment.