Browse Source

解决010d酸奶程序0温度0速的时候自动停止问题

wbspool 1 year ago
parent
commit
332f5b5c28

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

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

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

@@ -26,7 +26,9 @@ object SerialPortUtils {
             val serialPort =
             val serialPort =
                 SerialPort(File(serialPortPath), baudRate, dataBits, parity, stopBits, flags)
                 SerialPort(File(serialPortPath), baudRate, dataBits, parity, stopBits, flags)
             val dev2McuEventListener = Dev2McuEventListener { event: Dev2McuDataEvent ->
             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)
                 val data = Converter.hexStringToBytes(event.data)
                 try {
                 try {
                     serialPort.outputStream.write(data)
                     serialPort.outputStream.write(data)

+ 1 - 1
app/build.gradle

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

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