Bläddra i källkod

处理涂鸦连接,温度调整

zhangshenjie 4 dagar sedan
förälder
incheckning
e6272f6272

+ 24 - 4
BusinessStep/src/main/java/com/develop/step/ui/ModesDetailActivity.kt

@@ -331,9 +331,9 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
 //                ).into(binding.ivBanner)
             }
         } else {
-            if (sn.startsWith("054A")||sn.startsWith("053A")||sn.startsWith("000B")) {
+            if (sn.startsWith("054A") || sn.startsWith("053A") || sn.startsWith("000B")) {
                 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,
@@ -807,15 +807,34 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
             }
 
 
+//            if (CommonEventTypes.MOTOR_GEAR_RATHER_THEN_3_WITH_TEMP == event.type) {
+//                if (sn.startsWith("033G") || sn.startsWith("033H")) {
+//                    CofarSDK.cfgMotorGear(3)
+//                    currDevInfo.mode.apply {
+//                        updateMotorGearUI(
+//                            minMotorGear.toFloat(),
+//                            maxMotorGear.toFloat(),
+//                            3,
+//                            isMotorGearChange,
+//                            true
+//                        )
+//
+//
+//                    }
+//                }
+//            }
+
 
             if (CommonEventTypes.MOTOR_REVERSE_CAN_NOT_RATHER_THEN_3 == event.type) {
+
                 CofarSDK.cfgMotorGear(3)
                 currDevInfo.mode.apply {
                     updateMotorGearUI(
                         minMotorGear.toFloat(),
                         maxMotorGear.toFloat(),
                         3,
-                        isMotorGearChange
+                        isMotorGearChange,
+                        true
                     )
                 }
             }
@@ -1017,7 +1036,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()

+ 17 - 17
app/build.gradle

@@ -20,7 +20,7 @@ ext {
     versionCode = Integer.parseInt(new SimpleDateFormat("yyMMddHH").format(new Date()) + 1)
 //    versionCode=230617180
 //    brandCode="000B"
-    brandCode = "000A"
+    brandCode = "033G"
 //    model = "5037"
     model = "1039"
 
@@ -931,14 +931,14 @@ android {
 //            //appCode 1.01 指向bug修复,2.01指向功能变更
 //            buildConfigField("String", "appCode", "\"1.01\"")
 
-//                        manifestPlaceholders = [channelName: "brand033ITuya"]
-//            buildConfigField("String", "UpdatePlatform", "\"normal\"")
-//            resValue("string", "app_theme", "@style/SplashThemeNotLogo")
-//            buildConfigField("String", "model", "\"1039\"")
-//            buildConfigField("String", "brandCode", "\"033I\"")
-//            //appCode 1.01 指向bug修复,2.01指向功能变更
-//            buildConfigField("String", "appCode", "\"1.01\"")
-//            buildConfigField("String", "appCode", "\"2.01\"")
+                        manifestPlaceholders = [channelName: "brand033GTuya"]
+            buildConfigField("String", "UpdatePlatform", "\"normal\"")
+            resValue("string", "app_theme", "@style/SplashThemeNotLogo")
+            buildConfigField("String", "model", "\"1039\"")
+            buildConfigField("String", "brandCode", "\"033G\"")
+            //appCode 1.01 指向bug修复,2.01指向功能变更
+            buildConfigField("String", "appCode", "\"1.01\"")
+            buildConfigField("String", "appCode", "\"2.01\"")
 
 
 //            buildConfigField("String", "UpdatePlatform", "\"normal\"")
@@ -997,14 +997,14 @@ android {
 //            buildConfigField("String", "time","\"${getCurrentTime()}\"" )
 ////
 
-            manifestPlaceholders = [channelName: "brand063BTuya"]
-            buildConfigField("String", "UpdatePlatform", "\"normal\"")
-            resValue("string", "app_theme", "@style/SplashThemeNotLogo")
-            buildConfigField("String", "model", "\"1039\"")
-            buildConfigField("String", "brandCode", "\"063B\"")
-            //appCode 1.01 指向bug修复,2.01指向功能变更
-            buildConfigField("String", "appCode", "\"1.01\"")
-            buildConfigField("String", "time","\"${getCurrentTime()}\"" )
+//            manifestPlaceholders = [channelName: "brand063BTuya"]
+//            buildConfigField("String", "UpdatePlatform", "\"normal\"")
+//            resValue("string", "app_theme", "@style/SplashThemeNotLogo")
+//            buildConfigField("String", "model", "\"1039\"")
+//            buildConfigField("String", "brandCode", "\"063B\"")
+//            //appCode 1.01 指向bug修复,2.01指向功能变更
+//            buildConfigField("String", "appCode", "\"1.01\"")
+//            buildConfigField("String", "time","\"${getCurrentTime()}\"" )
 //
 //            manifestPlaceholders = [channelName: "brand053A"]
 //            buildConfigField("String", "UpdatePlatform", "\"night\"")

+ 14 - 2
libBase/src/main/java/com/develop/base/ext/GlobaExt.kt

@@ -184,6 +184,14 @@ fun getBrandNum(): String {
     return getSN().substring(0, 3)
 }
 
+/**
+ * 获取SN  设备型号
+ * @return
+ */
+fun getDeviceNum(): String {
+    return getSN().substring(0, 4)
+}
+
 /**
  * 获取模式
  * @return
@@ -218,6 +226,10 @@ fun getSN(): String {
 //     return "000A10390020123010170001"
 //     return "000A10390020123010190001"
 //        return "000B50370020123010190001"
+
+
+
+
 //        return "000B10390020123010190001"
 //        return "025A10390020123010190001"
 //        return "054A50370020123010190001"
@@ -246,7 +258,7 @@ fun getSN(): String {
 //         return  "030A10390020123010190002"
 //        return  "033F20020020123010190001"
 //        return  "033I20020020123010190001"
-//        return "033G20020020123010190001"
+        return "033G20020020123010190001"
 //        return  "014A19050020123010190002"
 //        return "029C21010020123010190002"
 //        return "029C21010030424071900612"
@@ -256,7 +268,7 @@ fun getSN(): String {
 //        return  "062A20030020123010190003"
 //        return "062A20030020123010190004"
 //        return  "063A10390020123010190015"
-        return  "063B10390020123010190002"
+//        return  "063B10390020123010190002"
 //        return  "063B10390020123010190001"
 //        return  "063B20030020123010190015"
 //        return "063B21050020123010190001"