5 Commits bea8b74abb ... 04e1bc931b

Tác giả SHA1 Thông báo Ngày
  wbspool 04e1bc931b 010Dapk问题点: 10 tháng trước cách đây
  wbspool 8b25c502a8 解决西班牙语翻译出现占位符的问题 10 tháng trước cách đây
  wbspool c44c51a88c 解决西班牙语翻译出现占位符的问题 10 tháng trước cách đây
  wbspool 332f5b5c28 解决010d酸奶程序0温度0速的时候自动停止问题 10 tháng trước cách đây
  wbspool c7f22e5150 解决 10 tháng trước cách đây

+ 8 - 1
BusinessCommon/src/main/java/com/develop/common/food_sdk/FoodSdkUtils.kt

@@ -1,6 +1,8 @@
 package com.develop.common.food_sdk
 
+import com.develop.common.data_repo.db.ModesType
 import com.kuyuntech.cofarcooking.device.sdk.constant.core.DevStatus
+import com.kuyuntech.cofarcooking.device.sdk.devmode.core.Ferment010D
 import com.kuyuntech.cofarcooking.device.sdk.util.core.CofarSDK
 
 object FoodSdkUtils {
@@ -11,7 +13,12 @@ object FoodSdkUtils {
 
     fun parseTemp(temp: Short): Short {
         return if (temp <= 35 && temp.toInt() != 0) {
-            37
+            if(CofarSDK.devInfo().mode is Ferment010D){
+                0
+            }else{
+                37
+            }
+
         } else {
             CofarSDK.parseTemp(temp)
         }

+ 3 - 1
BusinessCommon/src/main/java/com/develop/common/food_sdk/SerialPortUtils.kt

@@ -26,7 +26,9 @@ object SerialPortUtils {
             val serialPort =
                 SerialPort(File(serialPortPath), baudRate, dataBits, parity, stopBits, flags)
             val dev2McuEventListener = Dev2McuEventListener { event: Dev2McuDataEvent ->
-                Log.i("dev2mcu:", event.data)
+                if(!event.data.startsWith("7E07")){
+                    Log.i("dev2mcu:", event.data)
+                }
                 val data = Converter.hexStringToBytes(event.data)
                 try {
                     serialPort.outputStream.write(data)

+ 1 - 1
BusinessCommon/src/main/java/com/develop/common/ui/CommonBindingActivity.kt

@@ -282,7 +282,7 @@ abstract class CommonBindingActivity<T : ViewBinding> : BaseBindingActivity<T>()
         }
 
         //称重模式下,非电子称重异常的提示,都不用提示
-        if (CofarSDK.devInfo().isWeightStatus && event.msg != "dian_zi_cheng_tong_xin_yi_chan") {
+        if (CofarSDK.devInfo().isWeightStatus && event.msg != "dian_zi_cheng_tong_xin_yi_chan" && event.msg != "weight_overload_tips") {
             return
         }
 

+ 29 - 6
BusinessCommon/src/main/java/com/develop/common/utils/AppVersionUtil.kt

@@ -176,6 +176,14 @@ object AppVersionUtil {
 
     var updateRecipe = false
 
+
+    private fun saveRecipeUpdateTime(recipeUpdateTime: Long?) {
+        val v =
+            FoodDataProvider.getUserDatabase().devConfigDao().recipeVersion() ?: DevVersion(0, 0)
+        v.recipeUpdateTime = recipeUpdateTime
+        FoodDataProvider.getUserDatabase().devConfigDao().saveDevVersion(v)
+    }
+
     @SuppressLint("InvalidWakeLockTag")
     private fun downloadRecipes(
         newRecipes: LinkedList<String>,
@@ -202,8 +210,25 @@ object AppVersionUtil {
 
         TopResumedAtyHolder.getCurrentActivity()?.apply {
             if (newRecipes.isEmpty()) {
-                recipeUpdateDialog.removeSelf()
-                showRecipesUpdateDialog(recipeUpdateTime)
+                saveRecipeUpdateTime(recipeUpdateTime)
+                scopeNetLife {
+                    //判断是否还有新菜谱
+                    val result = Post<DevInfoResult>(Api.DEV_INFO) {
+                        body = DeviceInfoBody.genDeviceInfoBody()
+                    }.await()
+
+                    val ut = result.recipeUpdateTime
+                    val nr = LinkedList(result.newRecipes)
+                    if (!nr.isEmpty()) {
+                        downloadRecipes(nr,recipeUpdateDialog,
+                            nr.size.toLong(),downloadDir,downloadName,ut)
+                        return@scopeNetLife
+                    }else{
+                        recipeUpdateDialog.removeSelf()
+                        showRecipesUpdateDialog(recipeUpdateTime)
+                    }
+                }
+
                 return
             }
 
@@ -324,10 +349,8 @@ object AppVersionUtil {
             RecipeUpdateDialog().apply {
                 onDialogClickListener = object : RecipeUpdateDialog.OnDialogClickListener {
                     override fun onConfirm() {
-                        val v = FoodDataProvider.getUserDatabase().devConfigDao().recipeVersion()
-                            ?: DevVersion(0, 0)
-                        v.recipeUpdateTime = recipeUpdateTime
-                        FoodDataProvider.getUserDatabase().devConfigDao().saveDevVersion(v)
+                        saveRecipeUpdateTime(recipeUpdateTime)
+
                         removeSelf()
                     }
 

+ 9 - 3
BusinessCommon/src/main/java/com/develop/common/widget/TimePickerView.kt

@@ -32,6 +32,9 @@ class TimePickerView : ConstraintLayout {
     private var maxTime = 8 * 60 * 60
     private var minTime = 0
 
+    private var firstUnit:String? = null
+    private var secondUnit:String? = null
+
     var onTimePickerCallback: OnTimePickerCallback? = null
     private var firstManager: ScrollLinearManager
     private var secondManager: ScrollLinearManager
@@ -160,6 +163,9 @@ class TimePickerView : ConstraintLayout {
         if (secondUnit != binding.tvSecondBottom.text) {
             binding.tvSecondBottom.text = secondUnit
         }
+
+        this.firstUnit = firstUnit;
+        this.secondUnit =  secondUnit;
     }
 
     private fun updateDisplayTime() {
@@ -251,10 +257,10 @@ class TimePickerView : ConstraintLayout {
         val maxMinutes = (maxTime / 60 % 60)
         val maxHours = (maxTime / 3600)
         val maxSeconds = maxTime % 60
-        val currentSeconds: Int = if (firstTimePos >= 60) {
-            val hours = firstTimePos - 60 + 1
+        val currentSeconds: Int =  if(firstUnit === "hour"){
+            val hours = firstTimePos
             hours * 60 * 60 + secondTimePos * 60
-        } else {
+        }else{
             firstTimePos * 60 + secondTimePos
         }
         if (currentSeconds < minTime) {

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

@@ -191,9 +191,9 @@ El cliente Southern plus es una plataforma de información en línea desarrollad
     <string name="score">Puntuación</string>
     <string name="share">Comunión</string>
     <string name="delete">Eliminar</string>
-    <string name="recipe_update_tips">Un total de {{número}} recetas se han encontrado. ¿¿ quieres descargarlos?</string>
+    <string name="recipe_update_tips">Un total de {{num}} recetas se han encontrado. ¿¿ quieres descargarlos?</string>
     <string name="no_recipe_update_tips">No hay nuevos paquetes de datos de fórmula, actualmente la última versión</string>
-    <string name="recipe_update_process_tips">({{progreso}})se están descargando los datos de la fórmula...</string>
+    <string name="recipe_update_process_tips">({{progress}})se están descargando los datos de la fórmula...</string>
     <string name="recipe_update_finish">Se completa la actualización de los datos de la fórmula</string>
     <string name="update_recipe_title">Actualización de la fórmula</string>
     <string name="restore_confirm_tips">¿Estás seguro de que quieres volver a la configuración de fábrica?</string>

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

@@ -725,7 +725,8 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
 
 
                 viewModel.changeStep(CookSettingType.TEMP_SETTING)
-
+                this@ModesDetailActivity.isMotorDirectionGearChange =
+                    baseMode.isMotorDirectionChange
                 if (CofarSDK.devInfo().status != DevStatus.PAUSE.toInt() && CofarSDK.devInfo().status != DevStatus.RUNNING.toInt()) {
 
                     var targetTemp = baseMode.defaultTemp.toShort()
@@ -787,8 +788,7 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
                             isMotorGearChange,
                             focusUpdate = true
                         )
-                        this@ModesDetailActivity.isMotorDirectionGearChange =
-                            isMotorDirectionChange
+
                         updateMotorDirectionUI(motorDirection.toInt(), isMotorDirectionChange)
 
                         updateWeightUI(currDevInfo.weight.toFloat())

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

@@ -402,7 +402,7 @@ abstract class CookStepBaseActivity :
         binding.controller.jianhao.setVisible()
         binding.controller.jiahao.setVisible()
         binding.controller.steamFire.visibility = View.GONE;
-        binding.controller.steamFireSmall.visibility = View.GONE;
+//        binding.controller.steamFireSmall.visibility = View.GONE;
         binding.controller.waterRingView.visibility = View.GONE
         binding.controller.waterSprayShow.visibility = View.GONE
         binding.llWeightView.visibility = View.GONE
@@ -424,7 +424,7 @@ abstract class CookStepBaseActivity :
         binding.controller.jianhao.setVisible()
         binding.controller.jiahao.setVisible()
         binding.controller.steamFire.visibility = View.GONE;
-        binding.controller.steamFireSmall.visibility = View.GONE;
+//        binding.controller.steamFireSmall.visibility = View.GONE;
         binding.controller.waterRingView.visibility = View.GONE
         binding.controller.waterSprayShow.visibility = View.GONE
         binding.llWeightView.visibility = View.GONE
@@ -447,7 +447,7 @@ abstract class CookStepBaseActivity :
         binding.controller.jianhao.setVisible()
         binding.controller.jiahao.setVisible()
         binding.controller.steamFire.visibility = View.GONE;
-        binding.controller.steamFireSmall.visibility = View.GONE;
+//        binding.controller.steamFireSmall.visibility = View.GONE;
         binding.llWeightView.visibility = View.GONE
         isWidget = false
         binding.controller.root.visibility = View.VISIBLE
@@ -471,7 +471,7 @@ abstract class CookStepBaseActivity :
         binding.controller.jianhao.setGone()
         binding.controller.jiahao.setGone()
         binding.controller.steamFire.visibility = View.GONE;
-        binding.controller.steamFireSmall.visibility = View.GONE;
+//        binding.controller.steamFireSmall.visibility = View.GONE;
         binding.controller.waterRingView.visibility = View.GONE
         binding.controller.waterSprayShow.visibility = View.GONE
         binding.llWeightView.visibility = View.GONE
@@ -496,6 +496,7 @@ abstract class CookStepBaseActivity :
             tvTitleTemp.text_color = R.color.panel_unselected
             tvSetTime.text_color = R.color.panel_unselected
             tvTitleTime.text_color = R.color.panel_unselected
+            tvCookingTimeTarget.text_color = R.color.panel_unselected
             tvSetSpeed.text_color = R.color.panel_unselected
             tvTitleSpeed.text_color = R.color.panel_unselected
             tvSetDirection.text_color = R.color.panel_unselected
@@ -524,6 +525,8 @@ abstract class CookStepBaseActivity :
                     tvCookingTimeTarget.text_color = R.color.panel_selected
                     tvSetTime.text_color = R.color.panel_selected
                     tvTitleTime.text_color = R.color.panel_selected
+                    tvCookingTimeTarget.text_color = R.color.panel_selected
+
                     viewBackgroundTime.isSelected = true
                     viewIconTime.isSelected = true
                 }

+ 1 - 1
app/build.gradle

@@ -12,7 +12,7 @@ ext{
 
     versionCode=Integer.parseInt(new SimpleDateFormat("yyMMddHH").format(new Date()) + 1)
 //    versionCode=230617180
-    brandCode="002D"
+    brandCode="017A"
     model="1039"
 
 }

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

@@ -189,8 +189,6 @@ fun getBrandNum(): String {
 fun getSN(): String {
     var serial: String
 
-
-
     //通过反射获取sn号
     try {
         val c = Class.forName("android.os.SystemProperties")

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