We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ad45242 commit f695916Copy full SHA for f695916
1 file changed
controller/comms/messages/Messages.ts
@@ -263,7 +263,8 @@ export class Message {
263
public get chkLo(): number { return this.protocol === Protocol.Chlorinator || this.protocol === Protocol.AquaLink || this.protocol === Protocol.Jandy ? this.term[0] : this.term[1]; }
264
public get checksum(): number {
265
var sum = 0;
266
- for (let i = 0; i < this.header.length; i++) sum += this.header[i];
+ let start = this.protocol === Protocol.Jandy ? 2 : 0;
267
+ for (let i = start; i < this.header.length; i++) sum += this.header[i];
268
for (let i = 0; i < this.payload.length; i++) sum += this.payload[i];
269
return sum;
270
}
0 commit comments