Browse Source

处理反转bug,只显示063亮度

zhangshenjie 2 months ago
parent
commit
d6136bf853

+ 9 - 0
BusinessSetting/src/main/java/com/develop/setting/ui/BrightnessActivity.kt

@@ -56,6 +56,15 @@ class BrightnessActivity : CommonBindingActivity<ActivityBirghtnessBinding>() {
                 resources.getDrawable(com.develop.common.R.drawable.home_bg_011_f)
         }
 
+
+        if (sn.startsWith("063B")){
+            binding.tvSound.visibility = View.VISIBLE
+            binding.sbBrightness.visibility = View.VISIBLE
+            binding.ivSoundOne.visibility = View.VISIBLE
+            binding.ivSoundTwo.visibility = View.VISIBLE
+        }
+
+
         binding.rb3Min.text = "   " + resources.getString(com.develop.common.R.string.time_5min)
         binding.rb10Min.text = "   " + resources.getString(com.develop.common.R.string.time_10min)
         binding.rb30Min.text = "   " + resources.getString(com.develop.common.R.string.time_20min)

+ 6 - 0
BusinessSetting/src/main/res/layout/activity_birghtness.xml

@@ -27,6 +27,7 @@
 
     <androidx.appcompat.widget.AppCompatTextView
         android:id="@+id/tv_sound"
+        android:visibility="gone"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:layout_centerHorizontal="true"
@@ -41,6 +42,7 @@
         android:layout_marginStart="@dimen/convert_340px"
         android:layout_marginEnd="@dimen/convert_340px"
         android:id="@+id/sb_brightness"
+        android:visibility="gone"
         android:layout_width="match_parent"
         android:layout_height="@dimen/convert_60px"
         android:layout_below="@id/tv_sound"
@@ -52,6 +54,8 @@
         android:thumb="@null" />
 
     <ImageView
+        android:id="@+id/iv_sound_one"
+        android:visibility="gone"
         android:layout_marginStart="@dimen/convert_272px"
         android:layout_marginTop="@dimen/convert_65px"
         android:layout_below="@id/tv_sound"
@@ -60,12 +64,14 @@
         android:layout_height="@dimen/convert_59px"/>
 
     <ImageView
+        android:id="@+id/iv_sound_two"
         android:layout_alignParentEnd="true"
         android:layout_marginEnd="@dimen/convert_272px"
         android:layout_marginTop="@dimen/convert_65px"
         android:layout_below="@id/tv_sound"
         android:background="@drawable/ic_brightness_day"
         android:layout_width="@dimen/convert_59px"
+        android:visibility="gone"
         android:layout_height="@dimen/convert_59px"/>
 
     <androidx.appcompat.widget.AppCompatTextView

+ 15 - 13
BusinessStep/src/main/java/com/develop/step/ui/ModesDetailActivity.kt

@@ -823,17 +823,21 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
 
 
             if (CommonEventTypes.MOTOR_REVERSE_CAN_NOT_RATHER_THEN_3 == event.type) {
-                currentMotorGer = 3
-                CofarSDK.cfgMotorGear(3)
-                currDevInfo.mode.apply {
-                    updateMotorGearUI(
-                        minMotorGear.toFloat(),
-                        maxMotorGear.toFloat(),
-                        currentMotorGer,
-                        isMotorGearChange,
-                        true
-                    )
+                ///当用户操作的时候,不需要设置3速 且如果选中方向是反方向的的时候需要设置3速,其他就略过
+                if (userChanging&&MotorDirections.REVERSE == CofarSDK.devInfo().motorDirectionBuffer){
+                    currentMotorGer = 3
+                    CofarSDK.cfgMotorGear(3)
+                    currDevInfo.mode.apply {
+                        updateMotorGearUI(
+                            minMotorGear.toFloat(),
+                            maxMotorGear.toFloat(),
+                            currentMotorGer,
+                            isMotorGearChange,
+                            true
+                        )
+                    }
                 }
+
             }
         }, 500)
 
@@ -2497,10 +2501,8 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
         if (CofarSDK.devInfo().potStatus.toInt() == 1) {
             if (baseSn.startsWith("011")) {
                 showErrMsgDialog("mei_fang_guo_yi_chan_011")
-
             } else {
                 showErrMsgDialog("mei_fang_guo_yi_chan")
-
             }
             return
         }
@@ -2780,7 +2782,7 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
     private fun motorGearSpeedEvent(progress: Int) {
         userChanging = true
         binding.speedRingText.text = "$progress"
-        CofarSDK.cfgMotorGear(progress.toByte());
+        CofarSDK.cfgMotorGear(progress.toByte())
         showConfirmAndCancelBtn()
     }
 

+ 1 - 1
app/build.gradle

@@ -20,7 +20,7 @@ ext {
     versionCode = Integer.parseInt(new SimpleDateFormat("yyMMddHH").format(new Date()) + 1)
 //    versionCode=230617180
 //    brandCode="000B"
-    brandCode = "063B"
+    brandCode = "011A"
 //    model = "5037"
     model = "1039"