소스 검색

no message

wzh 5 년 전
부모
커밋
4c086f8d8b
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      websocket/idcolWss.php

+ 1 - 1
websocket/idcolWss.php

@@ -210,7 +210,7 @@ $ws_worker->onMessage = function($connection, $data)
 // modbus crc 16 校验码计算
 function crc16($string) {
   $crc = 0xFFFF;
-  for ($x = 0; $x < strlen ($string); $x++) {
+  for ($x = 0; $x < strlen($string); $x++) {
     $crc = $crc ^ ord($string[$x]);
     for ($y = 0; $y < 8; $y++) {
       if (($crc & 0x0001) == 0x0001) {