From 7a3654aaebf1d75303a90f3dc574881b0199779c Mon Sep 17 00:00:00 2001 From: riku <risaku@163.com> Date: 星期一, 01 三月 2021 14:27:04 +0800 Subject: [PATCH] 1. 更新数据查询接口 --- src/test/kotlin/com/flightfeather/uav/Test.kt | 23 +++++++++++++++++++++++ 1 files changed, 23 insertions(+), 0 deletions(-) diff --git a/src/test/kotlin/com/flightfeather/uav/Test.kt b/src/test/kotlin/com/flightfeather/uav/Test.kt index 6152cdb..7927e80 100644 --- a/src/test/kotlin/com/flightfeather/uav/Test.kt +++ b/src/test/kotlin/com/flightfeather/uav/Test.kt @@ -1,10 +1,33 @@ package com.flightfeather.uav +import org.junit.Test +import java.text.SimpleDateFormat +import java.util.* + /** * @author riku * Date: 2019/9/12 */ class Test { + @Test + fun foo1() { + val s = SimpleDateFormat.getDateTimeInstance().format(Date()) + println(s) + } + @Test + fun foo2() { + val b = arrayOf("41", "79", "24", "04", "0B", "45") + val i = 0 + val valid = b[i].toInt(16).toChar()//缁忕含搴︽槸鍚︽湁鏁堬紙鏈夋晥: A; 鏃犳晥: V锛� + val a1 = b[i + 1].toInt(16) + val b1 = b[i + 2].toInt(16) + var b2 = "${b[i + 3]}${b[i + 4]}".toInt(16).toDouble() + while (b2 >= 1) { + b2 /= 10 + } + val lng = a1 + (b1 + b2) / 60 + val s = b[i + 5].toInt(16).toChar() + } } \ No newline at end of file -- Gitblit v1.9.3