We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 886669b commit ae839adCopy full SHA for ae839ad
1 file changed
src/response/exception.ts
@@ -64,7 +64,9 @@ export default class ExceptionResponseBody extends ModbusResponseBody {
64
65
public createPayload () {
66
const payload = Buffer.alloc(2)
67
- payload.writeUInt8(this._fc, 0)
+ // This is a exception Response
68
+ // Add 0x80 for compatibility (crc check)
69
+ payload.writeUInt8(this._fc + 0x80, 0)
70
payload.writeUInt8(this._code, 1)
71
return payload
72
}
0 commit comments