liurunyu
4 天以前 e7efb53cd598bef3413944f294bfffcb1f65f5e9
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1/CommonV1.java
@@ -7,10 +7,12 @@
public class CommonV1 {
   /**
    * 检查头
    * @param bs 上行字节数组
    * @return [rt1->true:是本协议P206,false:不是本协议;  rt2->true:是水资源协议,false:是升级协议]
    * @return [【0】->true:是本协议P206,false:不是本协议;  【1】->true:是水资源协议,false:是升级协议]
    * @throws Exception  异常
    */
   public Boolean[] isThisProtocolHead(byte[] bs) throws Exception{
@@ -176,8 +178,9 @@
            return "计算CRC是:" + crcCompute + ",上传CRC是" + crcInBs ;
         }
      }else{
         int crcCompute = (byte)new CRC16().CRC(bs, ProtocolConstantV206V1.ctrlIndex, bs.length - 3) ;
         int crcInBs = ByteUtilUnsigned.bytes2Short_BE(bs, bs.length - 3) ;
         short crcCompute = new CRC16().CRC(bs, 0, bs.length - 4) ;
         short crcInBs = ByteUtil.bytes2Short_BE(bs,bs.length - 3) ;
         //int crcInBs = ByteUtilUnsigned.bytes2Short_BE(bs, bs.length - 3) ;
         if(crcCompute == crcInBs){
            return null ;
         }else{