|
@@ -139,6 +139,8 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
|
|
|
private var sn = getSN()
|
|
|
private var keep: Boolean = false
|
|
|
private var mWeightTime: Long = 0 //防止客户重复点击称重
|
|
|
+
|
|
|
+
|
|
|
private var isWeightNum: Float = -50F
|
|
|
private lateinit var baseMode: BaseDevMode
|
|
|
|
|
@@ -273,6 +275,7 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
|
|
|
keep = intent.extras?.getBoolean("keep", false) ?: false
|
|
|
if (keep){
|
|
|
startMotorGer = intent.extras?.getInt("startMotorGer", 0) ?: 0
|
|
|
+ currentMotorGer = startMotorGer
|
|
|
}
|
|
|
viewModel.lastModeType = viewModel.modeType
|
|
|
lastModeType = viewModel.modeType
|
|
@@ -1949,9 +1952,9 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
|
|
|
focusUpdate: Boolean = false
|
|
|
) {
|
|
|
|
|
|
- if (CofarSDK.devInfo().devMode != DevModes.SOUP) {
|
|
|
- return
|
|
|
- }
|
|
|
+// if (CofarSDK.devInfo().devMode != DevModes.SOUP) {
|
|
|
+// return
|
|
|
+// }
|
|
|
|
|
|
this.minMotorGear = minMotorGear.toInt()
|
|
|
this.maxMotorGear = maxMotorGear.toInt()
|
|
@@ -1965,7 +1968,13 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
|
|
|
* 处理慢炖开5停25逻辑,因为SDK 停的时候 设置挡速为0,客户那边说不能显示0挡速估在这UI处理
|
|
|
*
|
|
|
* */
|
|
|
- if ((sn.startsWith("010") || sn.startsWith("033")) && (modeType == WorkModes.SLOW_COOKING || modeType == WorkModes.SLOW_COOK) && currentMotorGer == 0) {
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 各个平台的揉面 需要处理
|
|
|
+ *
|
|
|
+ * */
|
|
|
+ if (((modeType == WorkModes.KNEAD || modeType == WorkModes.KNEAD_TOUGH)&& currentMotorGer == 0)
|
|
|
+ ||((sn.startsWith("010") || sn.startsWith("033")) && (modeType == WorkModes.SLOW_COOKING || modeType == WorkModes.SLOW_COOK)&& currentMotorGer == 0) ) {
|
|
|
/**
|
|
|
* 后台运行,点击回来,会导致挡速度,因为开5停25 的原因 currentMotorGer 是0
|
|
|
* 客户那边说不能显示0挡速估在这UI处理,估另外处理后台运行,点击回来挡速
|
|
@@ -1981,6 +1990,7 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
|
|
|
speedRingView.updateProgress(current)
|
|
|
speedRingText.text = current.toString()
|
|
|
}
|
|
|
+
|
|
|
return@apply
|
|
|
}
|
|
|
return@apply
|
|
@@ -2257,7 +2267,7 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
|
|
|
CofarSDK.cancel()
|
|
|
CofarSDK.devInfo().runningRecipeId = null
|
|
|
//处理010 033 后台后回来的显示转速问题
|
|
|
- startMotorGer = if (CofarSDK.devInfo().motorGearBuffer.toInt()!=-1) CofarSDK.devInfo().motorGearBuffer.toInt() else CofarSDK.devInfo().motorGear.toInt()
|
|
|
+ startMotorGer = if (CofarSDK.devInfo().motorGearBuffer.toInt()!=-1) CofarSDK.devInfo().motorGearBuffer.toInt() else if (CofarSDK.devInfo().motorGear.toInt()!=0) CofarSDK.devInfo().motorGear.toInt() else currentMotorGer
|
|
|
var startConfig = HashMap<String, Any>()
|
|
|
startConfig.put("stopTips", showStopTips)
|
|
|
CofarSDK.startWithConfig(viewModel.modeType, startConfig)
|
|
@@ -2350,7 +2360,7 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
|
|
|
userChanging = false
|
|
|
|
|
|
//处理010 033 后台后回来的显示转速问题
|
|
|
- startMotorGer = if (CofarSDK.devInfo().motorGearBuffer.toInt()!=-1) CofarSDK.devInfo().motorGearBuffer.toInt() else CofarSDK.devInfo().motorGear.toInt()
|
|
|
+ startMotorGer = if (CofarSDK.devInfo().motorGearBuffer.toInt()!=-1) CofarSDK.devInfo().motorGearBuffer.toInt() else if (CofarSDK.devInfo().motorGear.toInt()!=0) CofarSDK.devInfo().motorGear.toInt() else currentMotorGer
|
|
|
//配置
|
|
|
CofarSDK.confirm()
|
|
|
binding.btnCancel.visibility = View.GONE
|
|
@@ -2914,7 +2924,7 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
|
|
|
|
|
|
private fun setKneadMotorGear(isStop: Boolean) {
|
|
|
//处理5/7/10寸屏,默认转速不同
|
|
|
- if (baseMode is Knead && !sn.startsWith("011")) {
|
|
|
+ if (modeType == WorkModes.KNEAD || modeType == WorkModes.KNEAD_TOUGH ) {
|
|
|
var defMotorGear = when (StringUtils.getWindowsScreen(this@ModesDetailActivity)) {
|
|
|
5 -> {
|
|
|
1
|
|
@@ -2948,8 +2958,6 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
|
|
|
//程序运行完以后回调
|
|
|
override fun onDevStop() {
|
|
|
setKneadMotorGear(true)
|
|
|
-
|
|
|
-
|
|
|
}
|
|
|
|
|
|
private fun getRecipe(number: String) {
|