Browse Source

解决两个模式问题

wbspool 1 year ago
parent
commit
d04870cc20

+ 1 - 1
BusinessAirFryer/src/main/assets/config_010.json

@@ -39,7 +39,7 @@
       "bg": "ic_mode_chop",
       "icon": "ic_grid_ferment",
       "devMode": "SOUP",
-      "listShow": false
+      "listShow": true
     },
     {
       "type": "MULSIFY",

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

@@ -13,6 +13,7 @@ import com.blankj.utilcode.util.PathUtils
 import com.blankj.utilcode.util.ResourceUtils
 import com.blankj.utilcode.util.Utils
 import com.develop.base.app.BaseApp
+import com.develop.base.ext.getBrandNum
 import com.develop.base.ext.isNightTheme
 import com.develop.base.ext.setNightTheme
 import com.develop.base.util.MMkvUtils
@@ -78,6 +79,7 @@ class FoodCookingApp : BaseApp() {
         //切换主题,theme=0 night= false 是0000的主题,而且需要AndroidManifest.xml主题设置为  android:theme="@style/SplashTheme"
         ThemeSkinService.getInstance().switchThemeSkin(1)
         setNightTheme(true)
+        CofarSDK.init(getBrandNum())
         SerialPortUtils.init()
         CofarSDK.register(this)
         CofarSDK.stopNative()

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

@@ -173,6 +173,15 @@ fun getWifiMacAddress(context: Context): String {
     return if (wifiInfo != null) wifiInfo.macAddress else ""
 }
 
+
+/**
+ * 获取SN
+ * @return
+ */
+fun getBrandNum(): String {
+    return getSN().substring(0,3)
+}
+
 /**
  * 获取SN
  * @return
@@ -191,7 +200,7 @@ fun getSN(): String {
 //    try {
 //        serial = getWifiMacAddress(globalApp().applicationContext).uppercase()
 //        return if (serial != "" && serial != "unknown") "${append}${
-//            serial.replace(
+//            serial.replace3
 //                ":",
 //                ""
 //            )

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