Changes for page 08 Communication
Last modified by Iris on 2025/07/24 15:23
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -101,7 +101,6 @@ 101 101 The servo uses a 16-bit CRC check, and the host computer must also use the same check rule, otherwise the CRC check will make mistake. When transmitting, the low bit is in the front and the high bit is at the back. The CRC code are as follows: 102 102 103 103 {{code language="LUA"}} 104 -Uint16 CRC16_Calc(Uint8 *pBuf, Uint16 uLen) 105 105 { 106 106 107 107 Uint16 crc = 0xffff; ... ... @@ -136,8 +136,8 @@ 136 136 137 137 } 138 138 139 - } 140 140 139 + 141 141 } 142 142 143 143 } ... ... @@ -146,6 +146,9 @@ 146 146 147 147 } 148 148 148 +return crc; 149 + 150 +} 149 149 {{/code}} 150 150 151 151 == **Error response frame** ==