|
@@ -331,9 +331,9 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
|
|
|
// ).into(binding.ivBanner)
|
|
|
}
|
|
|
} else {
|
|
|
- if (sn.startsWith("054A")||sn.startsWith("053A")) {
|
|
|
+ if (sn.startsWith("054A") || sn.startsWith("053A")) {
|
|
|
workMode?.let {
|
|
|
- if (!(it.bg==null ||""==it.bg|| "null"==it.bg)){
|
|
|
+ if (!(it.bg == null || "" == it.bg || "null" == it.bg)) {
|
|
|
binding.ivBanner.setImageResource(
|
|
|
resources.getIdentifier(
|
|
|
workMode?.bg,
|
|
@@ -383,11 +383,12 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
|
|
|
|
|
|
//用于涂鸦指令上报
|
|
|
Handler().postDelayed({
|
|
|
- TuyaUtilsSo.getInstance().autoMaticType = TuyaUtilsSo.getInstance().getAutoMaticModes(modeType)
|
|
|
+ TuyaUtilsSo.getInstance().autoMaticType =
|
|
|
+ TuyaUtilsSo.getInstance().getAutoMaticModes(modeType)
|
|
|
TuyaUtilsSo.getInstance().mapClean()
|
|
|
TuyaUtilsSo.getInstance().isUser = true
|
|
|
// TuyaUtilsSo.getInstance().uploadDataBuffer(baseMode)
|
|
|
- },1500)
|
|
|
+ }, 1500)
|
|
|
|
|
|
// TuyaUtilsSo.getInstance().sendDevReady(2) // 1表示已就绪
|
|
|
|
|
@@ -682,7 +683,6 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
}
|
|
|
|
|
|
if ("stop" == event.type) {
|
|
@@ -768,7 +768,7 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
|
|
|
}
|
|
|
|
|
|
|
|
|
- if ("remain_time" == event.type){
|
|
|
+ if ("remain_time" == event.type) {
|
|
|
ThreadUtils.runOnMainThread {
|
|
|
//当前调节时间
|
|
|
var targetTime = event.time
|
|
@@ -848,32 +848,30 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
|
|
|
}, 500)
|
|
|
|
|
|
}
|
|
|
- if ("change_direction"== event.type){
|
|
|
+ if ("change_direction" == event.type) {
|
|
|
ThreadUtils.runOnMainThread({
|
|
|
binding.clCookDirection.updateChangeValue(
|
|
|
viewModel.getDirectionStr(
|
|
|
- currDevInfo.motorDirection.toInt() == MotorDirections.REVERSE.toInt(), resources
|
|
|
+ currDevInfo.motorDirection.toInt() == MotorDirections.REVERSE.toInt(),
|
|
|
+ resources
|
|
|
)
|
|
|
)
|
|
|
binding.flDirection.updateDirectionView(
|
|
|
- if (currDevInfo.motorDirection.toInt() == MotorDirections.FORWARD.toInt()) DirectionView.Direction.RIGHT
|
|
|
+ if (currDevInfo.motorDirection.toInt() == MotorDirections.FORWARD.toInt()) DirectionView.Direction.RIGHT
|
|
|
else DirectionView.Direction.LEFT
|
|
|
)
|
|
|
|
|
|
}, 500)
|
|
|
|
|
|
|
|
|
-
|
|
|
}
|
|
|
- if ("weight_clear"==event.type){
|
|
|
+ if ("weight_clear" == event.type) {
|
|
|
if (CofarSDK.devInfo().isWeightStatus) {
|
|
|
weightClearClick()
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
}
|
|
|
|
|
|
//======================================烹饪设备回调监听==================================\\
|
|
@@ -1128,7 +1126,8 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
|
|
|
potCloverInterval = Interval(0, 1, TimeUnit.SECONDS, 5).life(this)
|
|
|
.subscribe {
|
|
|
}.finish {
|
|
|
- currentBgId = com.develop.common.R.drawable.pot_clover_ele_unlock
|
|
|
+ currentBgId =
|
|
|
+ com.develop.common.R.drawable.pot_clover_ele_unlock
|
|
|
binding.ivPotCover.setBackgroundResource(com.develop.common.R.drawable.pot_clover_ele_unlock)
|
|
|
}
|
|
|
.start()
|
|
@@ -3251,29 +3250,37 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
|
|
|
recipeNumber = numbers
|
|
|
}
|
|
|
|
|
|
-
|
|
|
- val recipeBean = queryRecipe(recipeNumber)
|
|
|
- if (recipeBean != null) {
|
|
|
-
|
|
|
+ //新版本涂鸦,需要SOURCE_TAG 都传 local ,不然 开始按钮会变 下载
|
|
|
+ if (baseSn.startsWith("011D")) {
|
|
|
navigateTo(Screens.Cook.COOK_DETAIL) {
|
|
|
withString(
|
|
|
SOURCE_TAG, "local"
|
|
|
)
|
|
|
withString(NUMBER_TAG, number)
|
|
|
}
|
|
|
+
|
|
|
} else {
|
|
|
- navigateTo(Screens.Cook.COOK_DETAIL) {
|
|
|
- withString(
|
|
|
- SOURCE_TAG, "remote"
|
|
|
- )
|
|
|
- withString(NUMBER_TAG, number)
|
|
|
- }
|
|
|
+ val recipeBean = queryRecipe(recipeNumber)
|
|
|
+ if (recipeBean != null) {
|
|
|
+ navigateTo(Screens.Cook.COOK_DETAIL) {
|
|
|
+ withString(
|
|
|
+ SOURCE_TAG, "local"
|
|
|
+ )
|
|
|
+ withString(NUMBER_TAG, number)
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ navigateTo(Screens.Cook.COOK_DETAIL) {
|
|
|
+ withString(
|
|
|
+ SOURCE_TAG, "remote"
|
|
|
+ )
|
|
|
+ withString(NUMBER_TAG, number)
|
|
|
+ }
|
|
|
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
}
|