Skip to content

Commit

Permalink
Merge branch 'next' into addPlatformCommand
Browse files Browse the repository at this point in the history
  • Loading branch information
Zac Nelson committed Sep 14, 2016
2 parents c11a035 + a38d3bd commit 093ff7a
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 7 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.mkd
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@

## v6.1.7-dev

* Fix: Evented messages will now show on the dashboard in enabler.
* Improvement: App will now pull and display the VI platform.
* Fix: Evented messages will now show on the dashboard in enabler.
* Fix: mKey is stripped from the message before it is written to the tracefile (#253).
* Fix: Allow 2-byte PIDs in diagnostic request screen.

## v6.1.6

Expand Down
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:1.2.3'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
classpath 'com.android.tools.build:gradle:2.1.3'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.2'
classpath 'com.github.triplet.gradle:play-publisher:1.1.2'
classpath 'com.bugsnag:bugsnag-android-gradle-plugin:+'
classpath 'com.bugsnag:bugsnag-android-gradle-plugin:2.0.2'
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@

<EditText
android:id="@+id/diag_request_pid"
android:maxLength="2"
android:maxLength="4"
style="@style/HexTextField">

<requestFocus />
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
3 changes: 2 additions & 1 deletion library/src/main/java/com/openxc/messages/KeyedMessage.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
* message ID and bus ID form a unique key for a CAN message.
*/
public abstract class KeyedMessage extends VehicleMessage {
private MessageKey mKey;
//the transient designation prevents this from being serialized when we write to a tracefile
private transient MessageKey mKey;

public KeyedMessage() {
super();
Expand Down
10 changes: 10 additions & 0 deletions library/src/test/java/com/openxc/sinks/FileRecorderSinkTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@
import org.json.JSONException;
import org.json.JSONObject;

import com.openxc.messages.KeyedMessage;
import com.openxc.messages.SimpleVehicleMessage;
import com.openxc.messages.VehicleMessage;
import com.openxc.messages.formatters.JsonFormatter;
import com.openxc.util.FileOpener;

@RunWith(RobolectricTestRunner.class)
Expand Down Expand Up @@ -55,6 +57,14 @@ public void testOutputFormat() throws JSONException, DataSinkException {
assertTrue(message.getString("value").equals(value));
}

@Test
public void testSerialize() throws DataSinkException {
KeyedMessage measurement = new SimpleVehicleMessage(measurementId, value);
measurement.asKeyedMessage().getKey();
String serializedMessage = JsonFormatter.serialize(measurement);
assertTrue(!serializedMessage.contains("mKey"));
}

@Test
public void testCounts() throws JSONException, DataSinkException {
VehicleMessage measurement = new SimpleVehicleMessage("first", true);
Expand Down

0 comments on commit 093ff7a

Please sign in to comment.