Selaa lähdekoodia

033 温度转速处理

zhangshenjie 2 päivää sitten
vanhempi
commit
68e811f69b

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

@@ -809,12 +809,13 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
 
             if (CommonEventTypes.MOTOR_GEAR_RATHER_THEN_3_WITH_TEMP == event.type) {
                 if (sn.startsWith("033G") || sn.startsWith("033H")) {
+                    currentMotorGer = 3
                     CofarSDK.cfgMotorGear(3)
                     currDevInfo.mode.apply {
                         updateMotorGearUI(
                             minMotorGear.toFloat(),
                             maxMotorGear.toFloat(),
-                            3,
+                            currentMotorGer,
                             isMotorGearChange,
                             true
                         )
@@ -826,13 +827,13 @@ 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(),
-                        3,
+                        currentMotorGer,
                         isMotorGearChange,
                         true
                     )

+ 4 - 0
BusinessStep/src/main/java/com/develop/step/ui/cook_step/CookStepActivity.kt

@@ -173,6 +173,9 @@ class CookStepActivity : CookStepBaseActivity() {
 
     override fun onCreate(savedInstanceState: Bundle?) {
         super.onCreate(savedInstanceState)
+
+
+
         //做食谱步骤判断  由于可能对应的 cofig 缺少程序,故用总文件来 config.json
         configJson = ConfigUtils.loadCookConfig()
         isModelNum = getModelNum()
@@ -1808,6 +1811,7 @@ class CookStepActivity : CookStepBaseActivity() {
             }
 
             if (CommonEventTypes.MOTOR_GEAR_RATHER_THEN_4_WITH_TEMP == event.type) {
+                currentMotorGer = 4
                 CofarSDK.cfgMotorGear(4)
                 viewModel.cookingStep?.let { updateUiSetting(it, true) }
             }

+ 7 - 0
BusinessStep/src/main/java/com/develop/step/ui/cook_step/CookStepBaseActivity.kt

@@ -51,6 +51,7 @@ import com.develop.common.widget.BCustomerLinearLayout
 import com.develop.common.widget.PwdLayout
 import com.develop.step.databinding.ActivityCookStepBaseBinding
 import com.develop.step.viewmodel.CookStepViewModel
+import com.kuyuntech.cofarcooking.device.sdk.constant.core.CookScenes
 import com.kuyuntech.cofarcooking.device.sdk.constant.core.DevStatus
 import com.kuyuntech.cofarcooking.device.sdk.eventbus.core.DevInfo
 import com.kuyuntech.cofarcooking.device.sdk.eventbus.event.DevStatusEvent
@@ -140,6 +141,9 @@ abstract class CookStepBaseActivity :
     @SuppressLint("ClickableViewAccessibility")
     override fun onCreate(savedInstanceState: Bundle?) {
         super.onCreate(savedInstanceState)
+        if (baseSn.startsWith("033G")||baseSn.startsWith("033H")){
+            CofarSDK.updateScene(CookScenes.RECIPE)
+        }
         is062 = isBrand062()
         is011 = isBrand011A()
         hasShowScreenSaver = true
@@ -762,6 +766,9 @@ abstract class CookStepBaseActivity :
 
 
     override fun onDestroy() {
+        if (baseSn.startsWith("033G")||baseSn.startsWith("033H")){
+            CofarSDK.updateScene("");
+        }
         super.onDestroy()
         isWidget = false
         turboTimer?.cancel()

+ 1 - 0
BusinessStep/src/main/res/layout/activity_cook_detail.xml

@@ -418,6 +418,7 @@
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
                 android:layout_marginTop="@dimen/convert_40px"
+                android:visibility="gone"
                 android:drawableStart="@drawable/ic_more_translate"
                 android:drawablePadding="@dimen/convert_13px"
                 android:gravity="center_vertical"

+ 9 - 9
app/build.gradle

@@ -20,7 +20,7 @@ ext {
     versionCode = Integer.parseInt(new SimpleDateFormat("yyMMddHH").format(new Date()) + 1)
 //    versionCode=230617180
 //    brandCode="000B"
-    brandCode = "033G"
+    brandCode = "033H"
 //    model = "5037"
     model = "1039"
 
@@ -940,14 +940,14 @@ android {
 //            //appCode 1.01 指向bug修复,2.01指向功能变更
 //            buildConfigField("String", "appCode", "\"1.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\"")
+//            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\"")

+ 1 - 1
app/src/main/java/com/develop/foodcooking/FoodCookingApp.kt

@@ -171,7 +171,7 @@ class FoodCookingApp : BaseApp() {
             BaseConfig.TEMP_OF_LIMIT_MOTOR = 0
             CofarSDK.initDevice(getBrandNum(),getDeviceNum())
         }else{
-            CofarSDK.init(getBrandNum())
+            CofarSDK.init(getBrandNum());
         }
 
 //        val powerManager = getSystemService(POWER_SERVICE) as PowerManager

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

@@ -250,7 +250,7 @@ fun getSN(): String {
 //    return  "017A20060020123010190001"
 //        return  "017A10390020123010190001"
 //    return "010D10390020123010190001"
-//        return "010I10390020123010190001"
+        return "010I10390020123010190001"
 //        return "010D10390020123010190001"
 //    return "000A10390020123010190009"
 //        return "032E21060020123010190001"
@@ -259,7 +259,7 @@ fun getSN(): String {
 //         return  "030A10390020123010190002"
 //        return  "033F20020020123010190001"
 //        return  "033I20020020123010190001"
-        return "033G20020020123010190001"
+//        return "033G20020020123010190001"
 //        return  "014A19050020123010190002"
 //        return "029C21010020123010190002"
 //        return "029C21010030424071900612"