Removed debug logging
Added verification of broadcast response message size Added clearer handling of message types I'm sure there's a better way to do debug logging, but I don't really feel like adding a dependency on another module just for that.
This commit is contained in:
@ -1,8 +1,10 @@
|
||||
const SLMessage = require('./SLMessage.js').SLMessage;
|
||||
|
||||
const MSG_ID = 12592;
|
||||
|
||||
exports.SLChemDataMessage = class SLChemDataMessage extends SLMessage {
|
||||
constructor(buf) {
|
||||
super(0, 12592);
|
||||
super(0, MSG_ID);
|
||||
if (!buf) {
|
||||
this.writeInt32LE(0); // controller index
|
||||
} else {
|
||||
@ -45,4 +47,8 @@ exports.SLChemDataMessage = class SLChemDataMessage extends SLMessage {
|
||||
this.error = (salt & 128) !== 0;
|
||||
}
|
||||
}
|
||||
|
||||
static getResponseId() {
|
||||
return MSG_ID + 1;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user