Skip to content
This repository has been archived by the owner on Sep 27, 2018. It is now read-only.

Commit

Permalink
Replace Log usage with println
Browse files Browse the repository at this point in the history
  • Loading branch information
whymarrh committed Mar 25, 2018
1 parent 834a9be commit d6e02c8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package microcontrollers

import log.Log

internal sealed class MessageState {
class Started : MessageState() {
fun next(recv: () -> Byte, buffer: (Byte) -> Unit): MessageState {
Expand All @@ -11,7 +9,7 @@ internal sealed class MessageState {
buffer(byte)
return MessageState.Command()
} else {
Log.d { "Skipping 0x${byte.hex()} in search of message start byte" }
println("Skipping 0x${byte.hex()} in search of message start byte")
return MessageState.Started()
}
}
Expand All @@ -22,7 +20,7 @@ internal sealed class MessageState {
buffer(command)

if (!payloadSizes.containsKey(command)) {
Log.w { "Received Invalid command byte 0x${command.hex()}" }
println("Received Invalid command byte 0x${command.hex()}")
return MessageState.Started()
} else {
val payloadSize = payloadSizes[command]!!
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package microcontrollers

import log.Log

import java.nio.ByteBuffer
import java.util.Arrays
import java.util.concurrent.locks.Lock
Expand Down Expand Up @@ -40,7 +38,7 @@ internal interface Microcontroller {
return message
}

Log.w { "Received incorrect checksum 0x${nextTwoBytes.hex()} for $message" }
println("Received incorrect checksum 0x${nextTwoBytes.hex()} for $message")
MessageState.Started()
}
}
Expand Down

0 comments on commit d6e02c8

Please sign in to comment.