|
@@ -56,6 +56,7 @@ import com.kuyuntech.cofarcooking.device.sdk.eventbus.event.DevStatusEvent
|
|
|
import com.kuyuntech.cofarcooking.device.sdk.util.core.CofarSDK
|
|
|
import org.greenrobot.eventbus.EventBus
|
|
|
import org.greenrobot.eventbus.Subscribe
|
|
|
+import java.util.Objects
|
|
|
|
|
|
/**
|
|
|
* 模式详情页
|
|
@@ -96,6 +97,7 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
|
|
|
private var canStart = true
|
|
|
private var whereIndex = -1
|
|
|
private var modeName = ""
|
|
|
+ private var opMode = "HAND"
|
|
|
lateinit var ctx: Context
|
|
|
|
|
|
private val backRequestDialog by lazy {
|
|
@@ -153,6 +155,7 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
|
|
|
turnDevModeUI();
|
|
|
viewModel.modeType = intent.extras?.getString(MODE_TYPE, ModesType.CHOP.name) ?: ""
|
|
|
modeName = intent.extras?.getString("mode_name", "") ?: ""
|
|
|
+ opMode = intent.extras?.getString("OP_MODE", "HAND") ?: "HAND"
|
|
|
viewModel.lastModeType = viewModel.modeType
|
|
|
lastModeType = viewModel.modeType
|
|
|
modeType = lastModeType
|
|
@@ -394,9 +397,8 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
|
|
|
CofarSDK.confirm()
|
|
|
resumeClick()
|
|
|
}else{
|
|
|
- startClick()
|
|
|
+ startClick(false)
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
|
|
|
if("stop" == event.type){
|
|
@@ -1610,14 +1612,16 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
|
|
|
/**
|
|
|
* 点击开始操作
|
|
|
*/
|
|
|
- private fun startClick() {
|
|
|
+ private fun startClick(showStopTips:Boolean=true) {
|
|
|
if (mRunningInstId != mSettingInstId) {
|
|
|
overrideModeDialog.showDialog(supportFragmentManager, "overrideModeDialog")
|
|
|
} else {
|
|
|
userChanging = false
|
|
|
CofarSDK.cancel()
|
|
|
CofarSDK.devInfo().runningRecipeId = null
|
|
|
- CofarSDK.start(viewModel.modeType)
|
|
|
+ var startConfig = HashMap<String, Any>()
|
|
|
+ startConfig.put("stopTips",showStopTips)
|
|
|
+ CofarSDK.startWithConfig(viewModel.modeType,startConfig)
|
|
|
whereIndex = -1
|
|
|
binding.clSetTime.stopAlphaAnim()
|
|
|
}
|