Explorar o código

011代码上传

zhangshenjie hai 10 meses
pai
achega
1d23a98fdd

+ 2 - 0
BusinessCommon/src/main/res/values-en/strings.xml

@@ -186,6 +186,8 @@ Nanfang plus client is an online information platform developed and operated by
     <string name="dev_end_of_run_tips">Finish!</string>
     <string name="dev_not_orange_parts">Please install the Twisted Orange accessory to start the Twisted Orange program。</string>
     <string name="dev_remove_orange_parts">The machine is in twisted orange mode, please remove the current accessory.</string>
+    <string name="dev_dice_and_peel_tips">In order to use the program, it is necessary to have and install the appropriate attachment.</string>
+
     <string name="hight_temp_warning_tips">The current temperature exceeds 60, and the motor speed exceeds the third gear. Are you sure to continue?</string>
     <string name="hight_temp_turbo_tips">The current temperature exceeds 60, turbo function cannot be operated</string>
     <string name="update_msg">System updating, please wait~</string>

+ 1 - 0
BusinessCommon/src/main/res/values-pl/strings.xml

@@ -139,6 +139,7 @@
     <string name="pmpt_cancel">Anuluj</string>
     <string name="pmpt_msg">Wskazówki</string>
     <string name="dev_end_of_run_tips">Zakończ!</string>
+    <string name="dev_dice_and_peel_tips">W celu użycia programu niezbędne jest posiadanie i zamontowanie odpowiedniej przystawki.</string>
     <string name="hight_temp_warning_tips">Aktualna temperatura przekracza 60, a prędkość silnika przekracza trzeci bieg. Czy na pewno kontynuować?</string>
     <string name="hight_temp_turbo_tips">Bieżąca temperatura przekracza 60, funkcja turbo nie może być używana</string>
     <string name="update_msg">Aktualizacja systemu, proszę czekać~</string>

+ 2 - 0
BusinessCommon/src/main/res/values-uk/strings.xml

@@ -139,6 +139,8 @@ Nanfang plus client is an online information platform developed and operated by
     <string name="pmpt_cancel">Cancel</string>
     <string name="pmpt_msg">Tips</string>
     <string name="dev_end_of_run_tips">Finish!</string>
+    <string name="dev_dice_and_peel_tips">Для того, щоб користуватися програмою, необхідно мати та встановити відповідний додаток.</string>
+
     <string name="hight_temp_warning_tips">The current temperature exceeds 60, and the motor speed exceeds the third gear. Are you sure to continue?</string>
     <string name="hight_temp_turbo_tips">The current temperature exceeds 60, turbo function cannot be operated</string>
     <string name="update_msg">System updating, please wait~</string>

+ 2 - 0
BusinessCommon/src/main/res/values/strings.xml

@@ -154,6 +154,8 @@ Nanfang plus client is an online information platform developed and operated by
     <string name="dev_end_of_run_tips">Finish!</string>
     <string name="dev_not_orange_parts">Please install the Twisted Orange accessory to start the Twisted Orange program.</string>
     <string name="dev_remove_orange_parts">The machine is in twisted orange mode, please remove the current accessory.</string>
+    <string name="dev_dice_and_peel_tips">In order to use the program, it is necessary to have and install the appropriate attachment.</string>
+
     <string name="hight_temp_warning_tips">The current temperature exceeds 60, and the motor speed exceeds the third gear. Are you sure to continue?</string>
     <string name="hight_temp_turbo_tips">The current temperature exceeds 60, turbo function cannot be operated</string>
     <string name="update_msg">System updating, please wait~</string>

+ 5 - 1
BusinessMain/src/main/java/com/develop/main/ui/ModeEntranceActivity.kt

@@ -79,6 +79,7 @@ class ModeEntranceActivity : CommonBindingActivity<ActivityModeEntranceBinding>(
     private var isModelNum = ""
     private var devMode = ""
     private var isResetZero = -1  //初始扭橙的值
+    private var sn = getSN()
     override fun onCreate(savedInstanceState: Bundle?) {
         super.onCreate(savedInstanceState)
         MMkvUtils.save(FIRST_IN, true)
@@ -104,10 +105,13 @@ class ModeEntranceActivity : CommonBindingActivity<ActivityModeEntranceBinding>(
 //            }
         }
 
-        if (getSN().startsWith("002D")) {
+        if (sn.startsWith("002D")) {
             binding.ivTab.setImageResource(com.develop.common.R.drawable.ic_more_002d)
             binding.homeLayout.setBackgroundResource(com.develop.common.R.drawable.home_entrance_bg_002d)
         }
+        if (sn.startsWith("011")){
+            binding.ivTab.setImageResource(com.develop.common.R.drawable.ic_tab_011)
+        }
 
         if (isNightTheme()) {
             binding.entranceRecycle.apply {

+ 36 - 0
BusinessStep/src/main/java/com/develop/step/ui/ModesDetailActivity.kt

@@ -68,6 +68,7 @@ import com.kuyuntech.cofarcooking.device.sdk.constant.core.DevStatus
 import com.kuyuntech.cofarcooking.device.sdk.constant.core.HeatModes
 import com.kuyuntech.cofarcooking.device.sdk.constant.core.MotorDirections
 import com.kuyuntech.cofarcooking.device.sdk.constant.core.WorkModes
+import com.kuyuntech.cofarcooking.device.sdk.devmode.core.Kettle
 import com.kuyuntech.cofarcooking.device.sdk.devmode.core.Knead
 import com.kuyuntech.cofarcooking.device.sdk.eventbus.core.DevInfo
 import com.kuyuntech.cofarcooking.device.sdk.eventbus.event.DevCommonEvent
@@ -131,6 +132,8 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
     private var is062 = false
     private var is011 = false
     private var isResetZero = -1  //初始扭橙的值
+    private var sn = getSN()
+
     private val deviceStateDialog by lazy {
         CancelConfirmDialog()
     }
@@ -274,6 +277,14 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
             showMsgDialog(resources.getString(com.develop.common.R.string.dev_remove_orange_parts))
         }
 
+        /**
+         * 需求 切丁/去皮程序逻辑是点击进入程序界面时弹窗提示
+         *
+         * */
+        if (modeType == WorkModes.DICING || modeType == WorkModes.POTATO_PEELER) {
+            showMsgDialog(resources.getString(com.develop.common.R.string.dev_dice_and_peel_tips))
+        }
+
 
         if (!isNightTheme()) {
             if (workMode == null) {
@@ -980,6 +991,11 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
                 }
                 baseMode.defaultMotorGear = defMotorGear
             }
+            if (sn.startsWith("011")){
+                //处理011程序兼容
+                init011Mode(baseMode)
+            }
+
 
 
             //显示对应模式UI
@@ -2358,6 +2374,26 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
         viewModel.stopTurbo()
     }
 
+    private fun init011Mode(obj :Any){
+        /**
+         * 由于 011客户给了自动程序参数改动,所以才有些在 程序上改,有些在SDK上改
+         * */
+        //揉面
+        if (obj is Knead){
+            //处理揉面 011 都是默认挡速 3
+            obj.defaultMotorGear = 3
+        }
+
+        //煮水
+        if (obj is Kettle){
+            //60-100度
+            obj.minTemp = 60
+            obj.isTempChange = true
+        }
+
+
+    }
+
     private fun setEggTime(size: Int, hardness: Int) {
         var time: Int = 0
         when (size) {

BIN=BIN
libThirdPart/libs/cofar-cooking-device-sdk-0.0.1-SNAPSHOT.jar