Added support for controlling the salt cell generator output levels

Closes #17
This commit is contained in:
2020-02-08 15:33:13 -06:00
parent c310885598
commit 0397e8ad8f
4 changed files with 57 additions and 4 deletions

View File

@ -0,0 +1,29 @@
'use strict';
const SLMessage = require('./SLMessage.js').SLMessage;
const MSG_ID = 12576;
exports.SLSetSaltCellConfigMessage = class SLSetSaltCellConfigMessage extends SLMessage {
constructor(controllerIndex, poolOutput, spaOutput) {
super(0, MSG_ID);
this.controllerIndex = controllerIndex;
this.poolOutput = poolOutput;
this.spaOutput = spaOutput;
}
encode() {
this.writeInt32LE(this.controllerIndex || 0);
this.writeInt32LE(this.poolOutput || 0);
this.writeInt32LE(this.spaOutput || 0);
this.writeInt32LE(0);
this.writeInt32LE(0);
super.encode();
}
static getResponseId() {
return MSG_ID + 1;
}
};