|
@@ -359,10 +359,10 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
|
|
|
CofarSDK.startWeight()
|
|
|
}
|
|
|
|
|
|
- //2023.12.11 000A客户需要隐藏电磁阀
|
|
|
+ //2023.12.11 000A客户需要隐藏电磁阀 2024.10.08.电磁阀改成弹窗显示,估在这里隐藏
|
|
|
if (sn.startsWith("063") && viewModel.modeType != ModesType.WIGHT.name) {
|
|
|
- binding.tvCount.setVisible()
|
|
|
- binding.ivPotCover.setVisible()
|
|
|
+// binding.tvCount.setVisible()
|
|
|
+// binding.ivPotCover.setVisible()
|
|
|
} else {
|
|
|
binding.tvCount.setGone()
|
|
|
binding.ivPotCover.setGone()
|
|
@@ -864,7 +864,6 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
|
|
|
|
|
|
@Subscribe(threadMode = ThreadMode.MAIN)
|
|
|
fun onDevStateEvent(event: DevStatusEvent) {
|
|
|
- Log.e("TAG onDevStateEvent","Modes onDevStateEvent Modes Modes ")
|
|
|
if (!initModeData) {
|
|
|
return
|
|
|
}
|
|
@@ -876,7 +875,9 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
|
|
|
return
|
|
|
}
|
|
|
|
|
|
- Log.d("TAG DevStateEvent", "event:" + event.devInfo.toString())
|
|
|
+// Log.d("TAG DevStateEvent", "event:" + event.devInfo.toString())
|
|
|
+
|
|
|
+
|
|
|
//由于sdk没有判断E7到E16 需要判断运行和暂停过程中,设备发生故障弹出窗口告知故障
|
|
|
//sdk 会把 E6-15的回调到 base DevPromptEvent方法里面,这里就不需要在做弹窗
|
|
|
|
|
@@ -994,48 +995,48 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
|
|
|
mRunningInstId = currDevInfo.runningInstId
|
|
|
mSettingInstId = currDevInfo.settingInstId
|
|
|
|
|
|
- //之前是000 需要做电磁阀,现在单独判断063
|
|
|
+ //之前是000 需要做电磁阀,现在单独判断063 2024.10.08.电磁阀改成弹窗显示,估在这里隐藏
|
|
|
//sn.startsWith("000")
|
|
|
- if (sn.startsWith("063")) {
|
|
|
- //之前的判断是判断是否称重,和点动,现在把点动去掉
|
|
|
- //!CofarSDK.devInfo().isWeightStatus && currDevInfo.mode.mode != "TURBO"
|
|
|
- if (!CofarSDK.devInfo().isWeightStatus) {
|
|
|
- //电磁阀在非称重/切碎下显示开锁和上锁
|
|
|
- if (currDevInfo.potCloverEleStatus.toInt() == 0 && potCloverEleStatus != 0) {
|
|
|
- potCloverEleStatus = 0
|
|
|
- potCloverInterval?.cancel()
|
|
|
- if (currentBgId == com.develop.common.R.drawable.pot_clover_ele_unlock) {
|
|
|
- binding.tvCount.setGone()
|
|
|
- } else {
|
|
|
- binding.tvCount.setVisible()
|
|
|
- potCloverInterval = Interval(0, 1, TimeUnit.SECONDS, 5).life(this)
|
|
|
- .subscribe {
|
|
|
- binding.tvCount.updateText(it.toString())
|
|
|
- }.finish {
|
|
|
- binding.tvCount.setGone()
|
|
|
- currentBgId =
|
|
|
- com.develop.common.R.drawable.pot_clover_ele_unlock
|
|
|
- binding.ivPotCover.setBackgroundResource(com.develop.common.R.drawable.pot_clover_ele_unlock)
|
|
|
- }
|
|
|
- .start()
|
|
|
- }
|
|
|
- } else if (currDevInfo.potCloverEleStatus.toInt() == 1 && potCloverEleStatus != 1) {
|
|
|
- potCloverEleStatus = 1
|
|
|
- potCloverInterval?.cancel()
|
|
|
- if (currentBgId == com.develop.common.R.drawable.pot_clover_ele_lock) {
|
|
|
- binding.tvCount.setGone()
|
|
|
- } else {
|
|
|
- binding.tvCount.setGone()
|
|
|
- currentBgId = com.develop.common.R.drawable.pot_clover_ele_lock
|
|
|
- binding.ivPotCover.setBackgroundResource(com.develop.common.R.drawable.pot_clover_ele_lock)
|
|
|
- }
|
|
|
-
|
|
|
- } else if (currDevInfo.potCloverEleStatus.toInt() == 2 && potCloverEleStatus != 2) {
|
|
|
- potCloverEleStatus = 2
|
|
|
- binding.tvCount.setGone()
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+// if (sn.startsWith("063")) {
|
|
|
+// //之前的判断是判断是否称重,和点动,现在把点动去掉
|
|
|
+// //!CofarSDK.devInfo().isWeightStatus && currDevInfo.mode.mode != "TURBO"
|
|
|
+// if (!CofarSDK.devInfo().isWeightStatus) {
|
|
|
+// //电磁阀在非称重/切碎下显示开锁和上锁
|
|
|
+// if (currDevInfo.potCloverEleStatus.toInt() == 0 && potCloverEleStatus != 0) {
|
|
|
+// potCloverEleStatus = 0
|
|
|
+// potCloverInterval?.cancel()
|
|
|
+// if (currentBgId == com.develop.common.R.drawable.pot_clover_ele_unlock) {
|
|
|
+// binding.tvCount.setGone()
|
|
|
+// } else {
|
|
|
+// binding.tvCount.setVisible()
|
|
|
+// potCloverInterval = Interval(0, 1, TimeUnit.SECONDS, 5).life(this)
|
|
|
+// .subscribe {
|
|
|
+// binding.tvCount.updateText(it.toString())
|
|
|
+// }.finish {
|
|
|
+// binding.tvCount.setGone()
|
|
|
+// currentBgId =
|
|
|
+// com.develop.common.R.drawable.pot_clover_ele_unlock
|
|
|
+// binding.ivPotCover.setBackgroundResource(com.develop.common.R.drawable.pot_clover_ele_unlock)
|
|
|
+// }
|
|
|
+// .start()
|
|
|
+// }
|
|
|
+// } else if (currDevInfo.potCloverEleStatus.toInt() == 1 && potCloverEleStatus != 1) {
|
|
|
+// potCloverEleStatus = 1
|
|
|
+// potCloverInterval?.cancel()
|
|
|
+// if (currentBgId == com.develop.common.R.drawable.pot_clover_ele_lock) {
|
|
|
+// binding.tvCount.setGone()
|
|
|
+// } else {
|
|
|
+// binding.tvCount.setGone()
|
|
|
+// currentBgId = com.develop.common.R.drawable.pot_clover_ele_lock
|
|
|
+// binding.ivPotCover.setBackgroundResource(com.develop.common.R.drawable.pot_clover_ele_lock)
|
|
|
+// }
|
|
|
+//
|
|
|
+// } else if (currDevInfo.potCloverEleStatus.toInt() == 2 && potCloverEleStatus != 2) {
|
|
|
+// potCloverEleStatus = 2
|
|
|
+// binding.tvCount.setGone()
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }
|
|
|
currDevInfo.mode.apply {
|
|
|
|
|
|
|
|
@@ -1173,7 +1174,7 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
|
|
|
|
|
|
private fun initModeData(type: String, keep: Boolean? = false) {
|
|
|
|
|
|
- Log.d("TAG initModeData", "viewModel.modeType:" + viewModel.modeType + " keep:" + keep)
|
|
|
+// Log.d("TAG initModeData", "viewModel.modeType:" + viewModel.modeType + " keep:" + keep)
|
|
|
viewModel.modeType.apply {
|
|
|
baseMode = CofarSDK.devMode(this)
|
|
|
setKneadMotorGear(false)
|
|
@@ -1212,7 +1213,7 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
|
|
|
this@ModesDetailActivity.isMotorDirectionGearChange =
|
|
|
baseMode.isMotorDirectionChange
|
|
|
if (CofarSDK.devInfo().status != DevStatus.PAUSE.toInt() && CofarSDK.devInfo().status != DevStatus.RUNNING.toInt()) {
|
|
|
- Log.d("TAG initModeData", "baseMode :" + baseMode.toString())
|
|
|
+// Log.d("TAG initModeData", "baseMode :" + baseMode.toString())
|
|
|
var targetTemp = baseMode.defaultTemp.toShort()
|
|
|
var motorDirection = baseMode.motorDirection.toByte()
|
|
|
var motorGear = baseMode.defaultMotorGear.toByte()
|
|
@@ -1596,13 +1597,14 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
|
|
|
}
|
|
|
|
|
|
} else {
|
|
|
+ //2024.10.08.电磁阀改成弹窗显示,估在这里隐藏
|
|
|
if (sn.startsWith("063")) {
|
|
|
- if (binding.tvCount.text == "0") {
|
|
|
- binding.tvCount.setGone()
|
|
|
- } else {
|
|
|
- binding.tvCount.setVisible()
|
|
|
- }
|
|
|
- binding.ivPotCover.setVisible()
|
|
|
+// if (binding.tvCount.text == "0") {
|
|
|
+// binding.tvCount.setGone()
|
|
|
+// } else {
|
|
|
+// binding.tvCount.setVisible()
|
|
|
+// }
|
|
|
+// binding.ivPotCover.setVisible()
|
|
|
} else {
|
|
|
binding.tvCount.setGone()
|
|
|
binding.ivPotCover.setGone()
|
|
@@ -2020,10 +2022,10 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
|
|
|
var hours = 0
|
|
|
var minute = 0
|
|
|
var sec = 0
|
|
|
- Log.d(
|
|
|
- "TAG updateTimeUI",
|
|
|
- "minTime:$minTime maxTime:$maxTime dev:${currDevInfo.remainTime.toLong()} remainTime:$remainTime targetTime:$targetTime isTimeChange:$isTimeChange focusUpdate$focusUpdate type :$type"
|
|
|
- )
|
|
|
+// Log.d(
|
|
|
+// "TAG updateTimeUI",
|
|
|
+// "minTime:$minTime maxTime:$maxTime dev:${currDevInfo.remainTime.toLong()} remainTime:$remainTime targetTime:$targetTime isTimeChange:$isTimeChange focusUpdate$focusUpdate type :$type"
|
|
|
+// )
|
|
|
/**
|
|
|
* 由于速度大于7或等于7的时候 ,SDK会回调onDevCommonEvent方法,这个方法focusUpdate传入true,
|
|
|
* 就会调用下面if方法,故下面clSetTime.setTimeInternal,由于之前的minute sec 方法计算错误,现特殊处理minute sec 计算
|
|
@@ -2232,7 +2234,7 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
|
|
|
}
|
|
|
|
|
|
private fun updateBtn(status: Byte) {
|
|
|
- Log.d("TAG updateBtn", "status:" + status)
|
|
|
+// Log.d("TAG updateBtn", "status:" + status)
|
|
|
when (status) {
|
|
|
DevStatus.RUNNING -> {
|
|
|
binding.apply {
|
|
@@ -2410,7 +2412,7 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
|
|
|
} else {
|
|
|
userChanging = false
|
|
|
isClickType = 1
|
|
|
- Log.e("TAG mode", "Start:" + currTime)
|
|
|
+// Log.e("TAG mode", "Start:" + currTime)
|
|
|
CofarSDK.cancel()
|
|
|
CofarSDK.devInfo().runningRecipeId = null
|
|
|
var startConfig = HashMap<String, Any>()
|
|
@@ -2802,10 +2804,10 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
|
|
|
hours: Int, minute: Int, second: Int, time: String, setByUser: Boolean, type: String
|
|
|
) {
|
|
|
|
|
|
- Log.e(
|
|
|
- "TAG rollTimeEvent",
|
|
|
- "currentMotorGer:$currentMotorGer hours:$hours minute:$minute second:$second time:$time setByUser:$setByUser"
|
|
|
- )
|
|
|
+// Log.e(
|
|
|
+// "TAG rollTimeEvent",
|
|
|
+// "currentMotorGer:$currentMotorGer hours:$hours minute:$minute second:$second time:$time setByUser:$setByUser"
|
|
|
+// )
|
|
|
if (setByUser) {
|
|
|
var cifTime = second + (minute + hours * 60) * 60
|
|
|
var times = time
|