ccc 5 mesiacov pred
rodič
commit
67d930826a

+ 1 - 1
module_backstage/src/main/java/com/module/backstage/activity/setting/SettingViewModel.kt

@@ -278,7 +278,7 @@ class SettingViewModel @Inject constructor(private val mRepo: SettingRepository)
                 while (allParam) {
                     delay(1000)
                     VboxSerialPortSendQueue.getInstance()
-                        .sendCommand(VboxWriteCommand(VboxCommand.CMD_IO, VboxCommand.GET_PARAM_ID))
+                        .sendCommand(VboxWriteCommand(VboxCommand.CMD_IO, VboxCommand.GET_PARAM_ID+"00"))
                     Log.d(TAG, "getAllParam0: ")
                 }
             }

+ 2 - 1
module_home/src/main/java/com/quyunshuo/module/home/fragment/vm/MakeFragmentVM.kt

@@ -11,6 +11,7 @@ import com.hboxs.serialport.plc.util.AdvacedUtil
 import com.hboxs.serialport.plc.util.AsciiUtils
 import com.hboxs.serialport.plc.util.HexUtils
 import com.hboxs.serialport.plc.util.HexadecimalUtil
+import com.hboxs.serialport.sbc.frame.VboxCommand
 import com.quyunshuo.androidbaseframemvvm.base.addressenum.PlcHomeAddressEnum
 import com.quyunshuo.androidbaseframemvvm.base.addressenum.ProTypeEnum
 import com.quyunshuo.androidbaseframemvvm.base.mvvm.vm.BaseViewModel
@@ -101,7 +102,7 @@ class MakeFragmentVM @Inject constructor(private val mRepo: MakeFragmentRepo) :
     fun startSendMake(selectPro: String) {
        val data= ProTypeEnum.getEnumByValue(selectPro)
         //我想将 AA+01+
-        val hexStr = "00FC"+ data +"00"
+        val hexStr = VboxCommand.MAKE_ID+ data +"00"
         threadHomeParam.startMake(hexStr)
     }
 

+ 3 - 7
serialport-api/src/main/java/com/hboxs/serialport/sbc/frame/VboxCommand.java

@@ -17,10 +17,7 @@ public class VboxCommand {
      * 调试按钮指令
      */
     public final static String DEBUG_ID = "00FB";
-    /**
-     * 查询后台所有参数指令
-     */
-    public final static String GET_PARAM_ID = "00FF00";
+
     /**
      * 制作指令
      */
@@ -34,10 +31,9 @@ public class VboxCommand {
      */
     public final static String PARAM_ID = "00FE";
     /**
-     * 所有后台参数查询指令
+     * 查询后台所有参数指令
      */
-    public final static String ALL_PARAM_ID = "00FF";
-
+    public final static String GET_PARAM_ID = "00FF";
 
     /**
      * CMD指令:查询设备ID