|
@@ -218,7 +218,8 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
|
|
|
isModelNum = getModelNum()
|
|
|
|
|
|
if (!isNightTheme()) {
|
|
|
- var color = if (is062) com.develop.common.R.color.white else com.develop.common.R.color.view_change
|
|
|
+ var color =
|
|
|
+ if (is062) com.develop.common.R.color.white else com.develop.common.R.color.view_change
|
|
|
binding.ivBack.drawable?.apply {
|
|
|
DrawableCompat.setTint(
|
|
|
this,
|
|
@@ -691,12 +692,13 @@ 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 需要判断运行和暂停过程中,设备发生故障弹出窗口告知故障
|
|
|
if ((isClickType == DevStatus.RUNNING.toInt() || isClickType == DevStatus.PAUSE.toInt()
|
|
|
- || isClickType == DevStatus.STOP.toInt())&& viewModel.modeType!=ModesType.WIGHT.name) {
|
|
|
+ || isClickType == DevStatus.STOP.toInt()) && viewModel.modeType != ModesType.WIGHT.name
|
|
|
+ ) {
|
|
|
|
|
|
- if (ConfigUtils.getBooleanErrCode(event.devInfo.errCode.toInt())&&event.devInfo.devMode==DevModes.AIR_FRYER) {
|
|
|
+ if (ConfigUtils.getBooleanErrCode(event.devInfo.errCode.toInt()) && event.devInfo.devMode == DevModes.AIR_FRYER) {
|
|
|
showErrCodeDialog(event.devInfo.errCode.toInt())
|
|
|
isClickType = event.devInfo.status
|
|
|
return
|
|
@@ -706,13 +708,13 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
|
|
|
////devInfo.potStatus 0是有锅 1是没锅
|
|
|
//处理换锅问题
|
|
|
if (isModelNum == "5037" && event.devInfo.potStatus.toInt() == 1) {
|
|
|
- // isDevModes 避免重复刷新
|
|
|
+ // isDevModes 避免重复刷新
|
|
|
// if (isDevModes && workMode?.devMode!=DevModes.SOUP) {
|
|
|
// isDevModes = false
|
|
|
// CofarSDK.changeDevModeFocus(DevModes.SOUP)
|
|
|
// return
|
|
|
// }
|
|
|
- } else if (isModelNum == "5037" && event.devInfo.potStatus.toInt() == 0 && workMode?.type != "WIGHT") {
|
|
|
+ } else if (isModelNum == "5037" && event.devInfo.potStatus.toInt() == 0 && workMode?.type != "WIGHT") {
|
|
|
/**
|
|
|
* 由于客户无锅状态下是默认汤锅列表,但是在一进来是空炸锅,拿出来(无锅的时候已经换了汤锅模式),
|
|
|
* 但重新放空炸锅,onDevModeChange 是不会回调的,固需要用potCoverType 锅盖协议来判断是否需要重新换模式
|
|
@@ -721,7 +723,7 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
|
|
|
if (event.devInfo.potCloverType.toInt() == 1 && devMode == DevModes.SOUP) {
|
|
|
CofarSDK.changeDevModeFocus(DevModes.AIR_FRYER)
|
|
|
return
|
|
|
- }else if (event.devInfo.potCloverType.toInt() == 0 && devMode == DevModes.AIR_FRYER){
|
|
|
+ } else if (event.devInfo.potCloverType.toInt() == 0 && devMode == DevModes.AIR_FRYER) {
|
|
|
CofarSDK.changeDevModeFocus(DevModes.SOUP)
|
|
|
return
|
|
|
}
|
|
@@ -730,7 +732,6 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
//处理中途换换锅问题
|
|
|
if (sdkDevMode != event.devInfo.devMode) {
|
|
|
return
|
|
@@ -1290,13 +1291,8 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
|
|
|
|
|
|
/**切换到温度*/
|
|
|
private fun changeTempSettingStep() {
|
|
|
- if (is062){
|
|
|
- binding.jianhao.setGone()
|
|
|
- binding.jiahao.setGone()
|
|
|
- }else{
|
|
|
- binding.jianhao.setVisible()
|
|
|
- binding.jiahao.setVisible()
|
|
|
- }
|
|
|
+ binding.jianhao.setVisible()
|
|
|
+ binding.jiahao.setVisible()
|
|
|
|
|
|
binding.steamFire.visibility = View.GONE
|
|
|
binding.llWeightView.visibility = View.GONE
|
|
@@ -1327,13 +1323,8 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
|
|
|
/**切换到时间*/
|
|
|
private fun changeTimeSettingStep() {
|
|
|
binding.steamFire.visibility = View.GONE
|
|
|
- if (is062){
|
|
|
- binding.jianhao.setGone()
|
|
|
- binding.jiahao.setGone()
|
|
|
- }else{
|
|
|
- binding.jianhao.setVisible()
|
|
|
- binding.jiahao.setVisible()
|
|
|
- }
|
|
|
+ binding.jianhao.setVisible()
|
|
|
+ binding.jiahao.setVisible()
|
|
|
binding.llWeightView.visibility = View.GONE
|
|
|
binding.functionLayout.visibility = View.VISIBLE
|
|
|
binding.tempRingView.visibility = View.INVISIBLE
|
|
@@ -1354,13 +1345,8 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
|
|
|
whereIndex = -1
|
|
|
binding.clSetTime.stopAlphaAnim()
|
|
|
binding.steamFire.visibility = View.GONE
|
|
|
- if (is062){
|
|
|
- binding.jianhao.setGone()
|
|
|
- binding.jiahao.setGone()
|
|
|
- }else{
|
|
|
- binding.jianhao.setVisible()
|
|
|
- binding.jiahao.setVisible()
|
|
|
- }
|
|
|
+ binding.jianhao.setVisible()
|
|
|
+ binding.jiahao.setVisible()
|
|
|
binding.llWeightView.visibility = View.GONE
|
|
|
binding.functionLayout.visibility = View.VISIBLE
|
|
|
binding.tempRingView.visibility = View.INVISIBLE
|
|
@@ -1403,13 +1389,8 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
|
|
|
whereIndex = -1
|
|
|
binding.clSetTime.stopAlphaAnim()
|
|
|
binding.steamFire.visibility = View.GONE
|
|
|
- if (is062){
|
|
|
- binding.jianhao.setGone()
|
|
|
- binding.jiahao.setGone()
|
|
|
- }else{
|
|
|
- binding.jianhao.setVisible()
|
|
|
- binding.jiahao.setVisible()
|
|
|
- }
|
|
|
+ binding.jianhao.setVisible()
|
|
|
+ binding.jiahao.setVisible()
|
|
|
binding.llWeightView.visibility = View.GONE
|
|
|
binding.functionLayout.visibility = View.VISIBLE
|
|
|
binding.tempRingView.visibility = View.INVISIBLE
|
|
@@ -1926,8 +1907,8 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
|
|
|
private fun startClick(showStopTips: Boolean = true) {
|
|
|
var devInfo = CofarSDK.devInfo()
|
|
|
//判断是否是空炸错误,由于汤锅错误SDK 已经做了
|
|
|
- if (ConfigUtils.getBooleanErrCode(devInfo.errCode.toInt())&&devInfo.devMode==DevModes.AIR_FRYER) {
|
|
|
- lastMsg=""
|
|
|
+ if (ConfigUtils.getBooleanErrCode(devInfo.errCode.toInt()) && devInfo.devMode == DevModes.AIR_FRYER) {
|
|
|
+ lastMsg = ""
|
|
|
showErrCodeDialog(devInfo.errCode.toInt())
|
|
|
} else {
|
|
|
|
|
@@ -2406,7 +2387,7 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
|
|
|
//在当前页面,换了模式以后 重新启动
|
|
|
if (CommonEventTypes.DEV_MODE_CHANGE == event.type) {
|
|
|
//针对DIY处理
|
|
|
- if (workMode?.devMode!=CofarSDK.devInfo().devMode &&(lastModeType == WorkModes.ADAPTED_COOKING || lastModeType == WorkModes.AF_DIY)) {
|
|
|
+ if (workMode?.devMode != CofarSDK.devInfo().devMode && (lastModeType == WorkModes.ADAPTED_COOKING || lastModeType == WorkModes.AF_DIY)) {
|
|
|
// isWidget = false
|
|
|
// viewModel.stopTurbo()
|
|
|
// viewModel.cancelAnimator()
|
|
@@ -2430,9 +2411,9 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
|
|
|
finish()
|
|
|
} else {
|
|
|
//称重留在当前页面
|
|
|
- if (workMode?.devMode==CofarSDK.devInfo().devMode || workMode?.type == "WIGHT" ){
|
|
|
+ if (workMode?.devMode == CofarSDK.devInfo().devMode || workMode?.type == "WIGHT") {
|
|
|
return
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
finish()
|
|
|
|
|
|
}
|