|
@@ -400,6 +400,9 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
|
|
|
viewModel.stopTurbo()
|
|
|
viewModel.cancelAnimator()
|
|
|
hasShowScreenSaver = false
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
// TuyaUtilsSo.getInstance().sendDevReady(1) // 1表示设备不就绪
|
|
|
|
|
|
|
|
@@ -686,6 +689,16 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
|
|
|
}
|
|
|
|
|
|
if ("stop" == event.type) {
|
|
|
+ /**
|
|
|
+ * 测出一个BUG ,在DIY模式中,先是反转运行,1速度,运行后点击暂停,然后换成正转
|
|
|
+ * 然后关闭页面,重新进来会默认是正转然后切换反转会导致反转也可以选择12速度
|
|
|
+ * 估在这,多加一个 CofarSDK.cancel()
|
|
|
+ * 和下面onCancel方法也加上
|
|
|
+ *
|
|
|
+ * 设备上暂停也会出现此问题,估在这多加cancel()
|
|
|
+ * **/
|
|
|
+ CofarSDK.cancel()
|
|
|
+
|
|
|
stopClick()
|
|
|
}
|
|
|
|
|
@@ -1503,6 +1516,14 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
|
|
|
title = ctx.getString(com.develop.common.R.string.keep_cooking_in_the_background)
|
|
|
onDialogClickListener = object : CancelConfirmDialog.OnDialogClickListener {
|
|
|
override fun onConfirm() {
|
|
|
+ //先把缓存清了
|
|
|
+ /**
|
|
|
+ * 测出一个BUG ,在DIY模式中,先是反转运行,1速度,运行后点击暂停,然后换成正转
|
|
|
+ * 然后关闭页面,重新进来会默认是正转然后切换反转会导致反转也可以选择12速度
|
|
|
+ * 估在这,多加一个 CofarSDK.cancel()
|
|
|
+ * 和下面onCancel方法也加上
|
|
|
+ * **/
|
|
|
+ CofarSDK.cancel()
|
|
|
if (CofarSDK.devInfo().status == DevStatus.STOP.toInt()) {
|
|
|
FloatWindowManager.hideStepFlowWindow()
|
|
|
finish()
|
|
@@ -1538,6 +1559,7 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
|
|
|
override fun onCancel() {
|
|
|
runOnMainThread {
|
|
|
FloatWindowManager.hideStepFlowWindow()
|
|
|
+ CofarSDK.cancel()
|
|
|
CofarSDK.stop()
|
|
|
finish()
|
|
|
TuyaUtilsSo.getInstance().setDpCurrentActivity()
|
|
@@ -2904,12 +2926,12 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
|
|
|
)
|
|
|
|
|
|
if (direction != DirectionView.Direction.RIGHT) {
|
|
|
- CofarSDK.cfgMotorDirection(MotorDirections.REVERSE);
|
|
|
+ CofarSDK.cfgMotorDirectionNative(MotorDirections.REVERSE);
|
|
|
updateMotorDirectionUI(MotorDirections.REVERSE.toInt(), true);
|
|
|
|
|
|
|
|
|
} else {
|
|
|
- CofarSDK.cfgMotorDirection(MotorDirections.FORWARD);
|
|
|
+ CofarSDK.cfgMotorDirectionNative(MotorDirections.FORWARD);
|
|
|
updateMotorDirectionUI(MotorDirections.FORWARD.toInt(), true);
|
|
|
|
|
|
}
|