diff --git a/messages/SLControllerConfigMessage.js b/messages/SLControllerConfigMessage.js index 738141d..535bbcb 100755 --- a/messages/SLControllerConfigMessage.js +++ b/messages/SLControllerConfigMessage.js @@ -127,4 +127,16 @@ exports.SLControllerConfigMessage = class SLControllerConfigMessage extends SLMe isChem2() { return this.controllerType === 252 && this.hwType === 2; } + + getCircuitByDeviceId(deviceId) { + if (this.bodyArray) { + for (var i = 0; i < this.bodyArray.length; i++) { + if (this.bodyArray[i].deviceId === deviceId) { + return this.bodyArray[i]; + } + } + } + + return null; + } };