diff options
Diffstat (limited to 'vfd-uav/src/main/scala/org/mavlink')
-rw-r--r-- | vfd-uav/src/main/scala/org/mavlink/BufferPayloadReader.scala | 2 | ||||
-rw-r--r-- | vfd-uav/src/main/scala/org/mavlink/package.scala | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/vfd-uav/src/main/scala/org/mavlink/BufferPayloadReader.scala b/vfd-uav/src/main/scala/org/mavlink/BufferPayloadReader.scala index c552a96..9f13bff 100644 --- a/vfd-uav/src/main/scala/org/mavlink/BufferPayloadReader.scala +++ b/vfd-uav/src/main/scala/org/mavlink/BufferPayloadReader.scala @@ -19,7 +19,7 @@ class BufferedPayloadReader(payload: Array[Byte]) extends PayloadReader { } -class BufferedPayloadBuilder(payload: Array[Byte]) extends PayloadBuilder { +class BufferedPayloadWriter(payload: Array[Byte]) extends PayloadWriter { private val buffer = ByteBuffer.wrap(payload) //mavlink uses little endian diff --git a/vfd-uav/src/main/scala/org/mavlink/package.scala b/vfd-uav/src/main/scala/org/mavlink/package.scala index 080648d..87a8add 100644 --- a/vfd-uav/src/main/scala/org/mavlink/package.scala +++ b/vfd-uav/src/main/scala/org/mavlink/package.scala @@ -1,7 +1,9 @@ package org +import scala.language.implicitConversions + package object mavlink { - + implicit def mkReader(bytes: Seq[Byte]): PayloadReader = new BufferedPayloadReader(bytes.toArray) }
\ No newline at end of file |