Skip to content

Commit

Permalink
Merge pull request #110 from istnv/bug/startup
Browse files Browse the repository at this point in the history
Fix crash on new connection startup
  • Loading branch information
istnv authored Oct 19, 2024
2 parents 79e14da + 01854b1 commit ac2d378
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
3 changes: 0 additions & 3 deletions buildHADefs.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ export function buildHADefs(self) {
if (self.HA_CONFIG[s][mc].has) {
let haName = self.HA_CONFIG[s][mc].name + 'Gain'




haVariables.push({
name: haName + ' %',
variableId: vID + '_p',
Expand Down
5 changes: 5 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ class BAirInstance extends InstanceBase {

async init(config) {
this.config = config

if (!this.config.channels) {
this.config.channels = parseInt(this.config.model.replace(/\D/g, ''))
this.saveConfig(this.config)
}
this.snapshot = []

this.currentSnapshot = 0
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "behringer-xair",
"version": "2.4.1",
"version": "2.4.2",
"type": "module",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit ac2d378

Please sign in to comment.