diff options
author | Jakob Odersky <jakob@odersky.com> | 2016-04-15 02:11:19 -0700 |
---|---|---|
committer | Jakob Odersky <jakob@odersky.com> | 2016-04-15 02:11:19 -0700 |
commit | 8290d53a83a0f02142753870be1b38bf740ff204 (patch) | |
tree | 6a3eb68cc75368d44396aafe59ad41cbf23051d7 | |
parent | c3cfe2ef0e21703d880db63cdc3109574f1052c7 (diff) | |
download | sbt-mavlink-8290d53a83a0f02142753870be1b38bf740ff204.tar.gz sbt-mavlink-8290d53a83a0f02142753870be1b38bf740ff204.tar.bz2 sbt-mavlink-8290d53a83a0f02142753870be1b38bf740ff204.zip |
Fix endianness issue and update build
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | mavlink-library/src/main/twirl/org/mavlink/messages/messages.scala.txt | 5 | ||||
-rw-r--r-- | project/Build.scala | 4 | ||||
-rw-r--r-- | project/build.properties | 2 |
4 files changed, 8 insertions, 5 deletions
@@ -75,7 +75,7 @@ can be guaranteed when generating messages.* Add the following to your plugins: ```scala - addSbtPlugin("com.github.jodersky" % "sbt-mavlink" % "0.5.2")` + addSbtPlugin("com.github.jodersky" % "sbt-mavlink" % "0.6.0")` ``` Enable the plugin diff --git a/mavlink-library/src/main/twirl/org/mavlink/messages/messages.scala.txt b/mavlink-library/src/main/twirl/org/mavlink/messages/messages.scala.txt index 7a60c0a..7290d4c 100644 --- a/mavlink-library/src/main/twirl/org/mavlink/messages/messages.scala.txt +++ b/mavlink-library/src/main/twirl/org/mavlink/messages/messages.scala.txt @@ -2,6 +2,7 @@ package org.mavlink.messages import java.nio.ByteBuffer +import java.nio.ByteOrder import java.nio.charset.Charset @__scalaMessageType(message: Message) = {@StringUtils.Camelify(message.name)} @@ -89,6 +90,7 @@ object Message { */ def unpack(id: Byte, payload: Array[Byte]): Message = { val buffer = ByteBuffer.wrap(payload) + buffer.order(ByteOrder.LITTLE_ENDIAN) id match { @for(__msg <- __messages) { case @__msg.id => @@ -110,6 +112,7 @@ object Message { case m: @__scalaMessageType(__msg) => val arr = new Array[Byte](@__msg.length) val buffer = ByteBuffer.wrap(arr) + buffer.order(ByteOrder.LITTLE_ENDIAN) @for(__field <- __msg.orderedFields) {@__bufferWriteMethod("buffer", "m." + __scalaFieldName(__field), __field.tpe) } @@ -118,4 +121,4 @@ object Message { case u: Unknown => (u.id, u.payload) } -}
\ No newline at end of file +} diff --git a/project/Build.scala b/project/Build.scala index 66be73d..e522654 100644 --- a/project/Build.scala +++ b/project/Build.scala @@ -8,10 +8,10 @@ import bintray.BintrayPlugin.autoImport._ object ApplicationBuild extends Build { val common = Seq( - scalaVersion := "2.10.5", + scalaVersion := "2.10.6", scalacOptions ++= Seq("-feature", "-deprecation"), organization := "com.github.jodersky", - version := "0.5.2", + version := "0.6.0", licenses := Seq(("LGPL", url("http://opensource.org/licenses/LGPL-3.0"))) ) diff --git a/project/build.properties b/project/build.properties index 176a863..59e7c05 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=0.13.9
\ No newline at end of file +sbt.version=0.13.11
\ No newline at end of file |