更新钛方科技sdk

This commit is contained in:
tongchenfei
2020-09-17 21:40:34 +08:00
parent a71b8f735e
commit cef6858c75
4 changed files with 25 additions and 16 deletions

View File

@@ -3,18 +3,9 @@
<JetCodeStyleSettings>
<option name="PACKAGES_TO_USE_STAR_IMPORTS">
<value>
<package name="java.util" alias="false" withSubpackages="false" />
<package name="kotlinx.android.synthetic" alias="false" withSubpackages="true" />
<package name="io.ktor" alias="false" withSubpackages="true" />
</value>
</option>
<option name="PACKAGES_IMPORT_LAYOUT">
<value>
<package name="" alias="false" withSubpackages="true" />
<package name="java" alias="false" withSubpackages="true" />
<package name="javax" alias="false" withSubpackages="true" />
<package name="kotlin" alias="false" withSubpackages="true" />
<package name="" alias="true" withSubpackages="true" />
<package name="java.util" withSubpackages="false" static="false" />
<package name="kotlinx.android.synthetic" withSubpackages="true" static="false" />
<package name="io.ktor" withSubpackages="true" static="false" />
</value>
</option>
</JetCodeStyleSettings>

2
.idea/misc.xml generated
View File

@@ -4,7 +4,7 @@
<asm skipDebug="false" skipFrames="false" skipCode="false" expandFrames="false" />
<groovy codeStyle="LEGACY" />
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="JDK" project-jdk-type="JavaSDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
</project>

View File

@@ -36,16 +36,28 @@ class CrashWarningProvider:IMogoCrashWarnProvider {
override fun onBoxSelfCheckChanged(p0: TsSensorChannel?) {
}
override fun onTsCleanFlashChanged(p0: Int) {
}
override fun onTsUpdateChanged(p0: Int) {
}
override fun onBoxThresholdChanged(threshold: TsThreshold?) {
threshold?.let {
Logger.d(TAG, "获取到当前阈值: $threshold")
Logger.d(TAG, "获取到当前阈值==: $threshold")
crashThreshold.copy(threshold)
}
}
override fun onTsReadFlashCountChanged(p0: Int) {
}
override fun onTimeChanged(p0: Int, p1: Int, p2: Int, p3: Int, p4: Int, p5: Int) {
}
override fun onTsRestoreBackupDataChanged(p0: Int) {
}
override fun onVersionChanged(p0: String?) {
}
@@ -70,8 +82,14 @@ class CrashWarningProvider:IMogoCrashWarnProvider {
override fun onSerialNumChanged(p0: String?) {
}
})
override fun onTsReadFlashDataChanged(p0: Int, p1: String?) {
}
})
val initResult = ZDPowerManager.getInstance().initTsDevice()
Logger.d(TAG, "initDevice: $initResult")
// 默认开启报警
ZDPowerManager.getInstance().setTsAlarmSwitch(1)
val getThresholdResult = ZDPowerManager.getInstance().tsBoxStatus
Logger.d(TAG, "获取当前碰撞阈值: $getThresholdResult")
}

View File

@@ -42,7 +42,7 @@ dependencies {
annotationProcessor rootProject.ext.dependencies.aroutercompiler
api rootProject.ext.dependencies.fresco
api rootProject.ext.dependencies.obusdk
api 'com.mogo.module:module-crash-warning:1'
api 'com.mogo.module:module-crash-warning:1.1.0'
if (Boolean.valueOf(RELEASE)) {
api rootProject.ext.dependencies.mogomapapi
api rootProject.ext.dependencies.skinsupport