diff --git a/app/src/main/java/com/casic/br/operationsite/utils/LocaleConstant.kt b/app/src/main/java/com/casic/br/operationsite/utils/LocaleConstant.kt
index 642eb6f..1d808e7 100644
--- a/app/src/main/java/com/casic/br/operationsite/utils/LocaleConstant.kt
+++ b/app/src/main/java/com/casic/br/operationsite/utils/LocaleConstant.kt
@@ -81,7 +81,7 @@
//劳保检测
val START_SUPPLIES_COMMAND =
- byteArrayOf(0xAA.toByte(), 0x01, 0x00, 0x93.toByte(), 0x01, 0x00, 0x93.toByte())
+ byteArrayOf(0xAA.toByte(), 0x01, 0x00, 0x93.toByte(), 0x0A, 0x00, 0x9E.toByte())
val START_VIDEO_COMMAND =
- byteArrayOf(0xAA.toByte(), 0x01, 0x00, 0x93.toByte(), 0x0B, 0x00, 0x9F.toByte())
+ byteArrayOf(0xAA.toByte(), 0x01, 0x00, 0x93.toByte(), 0x11, 0x00, 0xA5.toByte())
}
\ No newline at end of file
diff --git a/app/src/main/java/com/casic/br/operationsite/utils/LocaleConstant.kt b/app/src/main/java/com/casic/br/operationsite/utils/LocaleConstant.kt
index 642eb6f..1d808e7 100644
--- a/app/src/main/java/com/casic/br/operationsite/utils/LocaleConstant.kt
+++ b/app/src/main/java/com/casic/br/operationsite/utils/LocaleConstant.kt
@@ -81,7 +81,7 @@
//劳保检测
val START_SUPPLIES_COMMAND =
- byteArrayOf(0xAA.toByte(), 0x01, 0x00, 0x93.toByte(), 0x01, 0x00, 0x93.toByte())
+ byteArrayOf(0xAA.toByte(), 0x01, 0x00, 0x93.toByte(), 0x0A, 0x00, 0x9E.toByte())
val START_VIDEO_COMMAND =
- byteArrayOf(0xAA.toByte(), 0x01, 0x00, 0x93.toByte(), 0x0B, 0x00, 0x9F.toByte())
+ byteArrayOf(0xAA.toByte(), 0x01, 0x00, 0x93.toByte(), 0x11, 0x00, 0xA5.toByte())
}
\ No newline at end of file
diff --git a/app/src/main/java/com/casic/br/operationsite/view/ConstructionCheckActivity.kt b/app/src/main/java/com/casic/br/operationsite/view/ConstructionCheckActivity.kt
index a631579..f7e7d34 100644
--- a/app/src/main/java/com/casic/br/operationsite/view/ConstructionCheckActivity.kt
+++ b/app/src/main/java/com/casic/br/operationsite/view/ConstructionCheckActivity.kt
@@ -58,8 +58,8 @@
/**
* 1 - 确认现场
- * 2 - 确认鼓风机
- * 3 -
+ * 2 - 环境监测-确认鼓风机
+ * 3 - 劳保用品-确认鼓风机
* */
private var type = 1
@@ -73,7 +73,7 @@
}
binding.startCheckButton.setOnClickListener {
- if (isConnected) {
+ if (!isConnected) {
"指令发送失败,请确认是否处于同一网段".show(this)
return@setOnClickListener
}
@@ -87,7 +87,7 @@
}
binding.endCheckButton.setOnClickListener {
- if (isConnected) {
+ if (!isConnected) {
"指令发送失败,请确认是否处于同一网段".show(this)
return@setOnClickListener
}
@@ -102,7 +102,7 @@
return@setOnClickListener
}
- if (isConnected) {
+ if (!isConnected) {
"指令发送失败,请确认是否处于同一网段".show(this)
return@setOnClickListener
}
@@ -125,7 +125,7 @@
return@setOnClickListener
}
- if (isConnected) {
+ if (!isConnected) {
"指令发送失败,请确认是否处于同一网段".show(this)
return@setOnClickListener
}
@@ -138,7 +138,7 @@
return@setOnClickListener
}
- if (isConnected) {
+ if (!isConnected) {
"指令发送失败,请确认是否处于同一网段".show(this)
return@setOnClickListener
}
@@ -152,7 +152,7 @@
return@setOnClickListener
}
- if (isConnected) {
+ if (!isConnected) {
"指令发送失败,请确认是否处于同一网段".show(this)
return@setOnClickListener
}
@@ -173,6 +173,7 @@
return@setOnClickListener
}
constructionCheckViewModel.setCurrentPhase(this, "before_operation_protection")
+ type = 3
captureImage()
isCompletedThird = true
}
@@ -262,8 +263,9 @@
when (type) {
1 -> Glide.with(this).load(url).into(binding.disclosureImageView)
2 -> Glide.with(this).load(url).into(binding.envImageView)
+ 3 -> Glide.with(this).load(url).into(binding.suppliesImageView)
}
- "完成确认".show(this)
+ "请点击完成确认".show(this)
}
}
}
diff --git a/app/src/main/java/com/casic/br/operationsite/utils/LocaleConstant.kt b/app/src/main/java/com/casic/br/operationsite/utils/LocaleConstant.kt
index 642eb6f..1d808e7 100644
--- a/app/src/main/java/com/casic/br/operationsite/utils/LocaleConstant.kt
+++ b/app/src/main/java/com/casic/br/operationsite/utils/LocaleConstant.kt
@@ -81,7 +81,7 @@
//劳保检测
val START_SUPPLIES_COMMAND =
- byteArrayOf(0xAA.toByte(), 0x01, 0x00, 0x93.toByte(), 0x01, 0x00, 0x93.toByte())
+ byteArrayOf(0xAA.toByte(), 0x01, 0x00, 0x93.toByte(), 0x0A, 0x00, 0x9E.toByte())
val START_VIDEO_COMMAND =
- byteArrayOf(0xAA.toByte(), 0x01, 0x00, 0x93.toByte(), 0x0B, 0x00, 0x9F.toByte())
+ byteArrayOf(0xAA.toByte(), 0x01, 0x00, 0x93.toByte(), 0x11, 0x00, 0xA5.toByte())
}
\ No newline at end of file
diff --git a/app/src/main/java/com/casic/br/operationsite/view/ConstructionCheckActivity.kt b/app/src/main/java/com/casic/br/operationsite/view/ConstructionCheckActivity.kt
index a631579..f7e7d34 100644
--- a/app/src/main/java/com/casic/br/operationsite/view/ConstructionCheckActivity.kt
+++ b/app/src/main/java/com/casic/br/operationsite/view/ConstructionCheckActivity.kt
@@ -58,8 +58,8 @@
/**
* 1 - 确认现场
- * 2 - 确认鼓风机
- * 3 -
+ * 2 - 环境监测-确认鼓风机
+ * 3 - 劳保用品-确认鼓风机
* */
private var type = 1
@@ -73,7 +73,7 @@
}
binding.startCheckButton.setOnClickListener {
- if (isConnected) {
+ if (!isConnected) {
"指令发送失败,请确认是否处于同一网段".show(this)
return@setOnClickListener
}
@@ -87,7 +87,7 @@
}
binding.endCheckButton.setOnClickListener {
- if (isConnected) {
+ if (!isConnected) {
"指令发送失败,请确认是否处于同一网段".show(this)
return@setOnClickListener
}
@@ -102,7 +102,7 @@
return@setOnClickListener
}
- if (isConnected) {
+ if (!isConnected) {
"指令发送失败,请确认是否处于同一网段".show(this)
return@setOnClickListener
}
@@ -125,7 +125,7 @@
return@setOnClickListener
}
- if (isConnected) {
+ if (!isConnected) {
"指令发送失败,请确认是否处于同一网段".show(this)
return@setOnClickListener
}
@@ -138,7 +138,7 @@
return@setOnClickListener
}
- if (isConnected) {
+ if (!isConnected) {
"指令发送失败,请确认是否处于同一网段".show(this)
return@setOnClickListener
}
@@ -152,7 +152,7 @@
return@setOnClickListener
}
- if (isConnected) {
+ if (!isConnected) {
"指令发送失败,请确认是否处于同一网段".show(this)
return@setOnClickListener
}
@@ -173,6 +173,7 @@
return@setOnClickListener
}
constructionCheckViewModel.setCurrentPhase(this, "before_operation_protection")
+ type = 3
captureImage()
isCompletedThird = true
}
@@ -262,8 +263,9 @@
when (type) {
1 -> Glide.with(this).load(url).into(binding.disclosureImageView)
2 -> Glide.with(this).load(url).into(binding.envImageView)
+ 3 -> Glide.with(this).load(url).into(binding.suppliesImageView)
}
- "完成确认".show(this)
+ "请点击完成确认".show(this)
}
}
}
diff --git a/app/src/main/res/layout/activity_construction_check.xml b/app/src/main/res/layout/activity_construction_check.xml
index 8f85baa..2e163a6 100644
--- a/app/src/main/res/layout/activity_construction_check.xml
+++ b/app/src/main/res/layout/activity_construction_check.xml
@@ -296,32 +296,53 @@
android:background="#CCCCCC" />
-
+ android:orientation="horizontal">
-
+
-
+
+
+
+
+
+
+
+
+