corrected errors

This commit is contained in:
MaximZaitsev
2016-07-14 15:25:14 +03:00
parent 1d10baf578
commit afc351604b
2 changed files with 7 additions and 6 deletions
+1 -1
View File
@@ -11,7 +11,7 @@ function loadBin(httpContent, response) {
var uploadClass = main.protoConstructorCarkot.Upload;
var uploadObject = uploadClass.decode(httpContent);
fs.writeFile(main.binFilePath, uploadObject.data.buffer, "binary", function (error) {
var uploadResultClass = main.protoConstructor.UploadResult;
var uploadResultClass = main.protoConstructorCarkot.UploadResult;
var code = 0;
var stdErr = "";
if (error) {
+6 -5
View File
@@ -1,7 +1,6 @@
import client.Client
import com.martiansoftware.jsap.FlaggedOption
import com.martiansoftware.jsap.JSAP
import java.util.*
/**
* Created by user on 7/14/16.
@@ -17,7 +16,6 @@ fun main(args: Array<String>) {
println(jsap.getHelp())
return
}
val host = config.getString("host")
val port = config.getInt("port")
val direction = config.getChar("direction")
@@ -37,9 +35,12 @@ fun main(args: Array<String>) {
fun initTextInterface(carControl: CarControl) {
val helpMessage = "type f, b, l, r, s for command forward, backward, left, right, stop. to exit type q or quit ";
println(helpMessage)
val scanner = Scanner(System.`in`)
while (scanner.hasNext()) {
val nextLine = scanner.nextLine()
while (true) {
val nextLine = readLine()
if (nextLine == null) {
return
}
if (nextLine.equals("q", true) || nextLine.equals("quit", true)) {
return
} else if (nextLine.length != 1) {