Skip to content

Commit

Permalink
Missed property name changes, fixed typos
Browse files Browse the repository at this point in the history
  • Loading branch information
istnv committed Mar 12, 2023
1 parent 486f182 commit e79b38f
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 19 deletions.
34 changes: 17 additions & 17 deletions buildStripDefs.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use strict'
import { defStrip } from './defStrip.js'
import { combineRgb, Regex } from '@companion-module/base'
import { pad0, unSlash, setToggle, fadeTo } from './helpers.js'
Expand Down Expand Up @@ -153,7 +154,7 @@ export function buildStripDefs(self) {
const opt = action.options
const nVal = opt.type == '/ch/' ? pad0(opt.num) : opt.num
const cmd =
action.actionId == 'lr' ? opt.type + nVal + '/mix/lr' : opt.type + nval + '/' + action.actionId + '/on'
action.actionId == 'lr' ? opt.type + nVal + '/mix/lr' : opt.type + nVal + '/' + action.actionId + '/on'
const arg = {
type: 'i',
value: setToggle(self.xStat[cmd].isOn, opt.set),
Expand Down Expand Up @@ -425,7 +426,7 @@ export function buildStripDefs(self) {
if (opt.type == '/ch/') {
nVal = pad0(nVal)
}
const strip = opt.type + nVal
let strip = opt.type + nVal
strip += opt.type == '/dca/' ? '/fader' : '/mix/fader'
fadeTo(action.actionId, strip, opt, self)
},
Expand Down Expand Up @@ -463,7 +464,7 @@ export function buildStripDefs(self) {
if (opt.type == '/ch/') {
nVal = pad0(nVal)
}
const strip = opt.type + nVal
let strip = opt.type + nVal
strip += opt.type == '/dca/' ? '/fader' : '/mix/fader'
let fVal = fadeTo(action.actionId, strip, opt, self)
const arg = {
Expand Down Expand Up @@ -526,8 +527,8 @@ export function buildStripDefs(self) {

fadeActions[fadeID + '_a'].options.push({
type: 'number',
tooltip: 'Move fader +/- percent.\nFader Percent:\n0 = -oo, 75 = 0db, 100 = +10db',
label: 'Adjust',
tooltip: 'Move fader +/- percent.',
label: 'Adjust By',
id: 'ticks',
min: -100,
max: 100,
Expand Down Expand Up @@ -671,9 +672,8 @@ export function buildStripDefs(self) {
nVal = parseInt(opt.chNum) + '/'
}
const bVal = pad0(opt.busNum)
const strip = opt.type + nval + 'mix/' + bVal + '/level'
let fVal = fadeTo(action.actionId, strip, opt, self)
self.sendOSC(strip, { type: 'f', value: fVal })
const strip = opt.type + nVal + 'mix/' + bVal + '/level'
fadeTo(action.actionId, strip, opt, self)
},
}

Expand Down Expand Up @@ -711,8 +711,8 @@ export function buildStripDefs(self) {
},
{
type: 'number',
title: 'Move fader +/- percent.\nFader percent:\n0 = -oo, 75 = 0db, 100 = +10db',
label: 'Adjust',
title: 'Move fader +/- percent.',
label: 'Adjust by',
id: 'ticks',
min: -100,
max: 100,
Expand All @@ -728,7 +728,7 @@ export function buildStripDefs(self) {
nVal = parseInt(opt.chNum) + '/'
}
const bVal = pad0(opt.busNum)
const strip = opt.type + nval + 'mix/' + bVal + '/level'
let strip = opt.type + nVal + 'mix/' + bVal + '/level'
let fVal = fadeTo(action.actionId, strip, opt, self)
self.sendOSC(strip, { type: 'f', value: fVal })
},
Expand All @@ -747,7 +747,7 @@ export function buildStripDefs(self) {
}

storeActions[sendID + '_s'] = {
label: 'Store Send Level',
name: 'Store Send Level',
options: [
{
type: 'dropdown',
Expand Down Expand Up @@ -787,7 +787,7 @@ export function buildStripDefs(self) {
choices: [
{
id: 'me',
label: 'Channel',
label: 'Channel Send',
},
...self.STORE_LOCATION,
],
Expand All @@ -802,13 +802,13 @@ export function buildStripDefs(self) {
nVal = parseInt(opt.chNum) + '/'
}
const bVal = pad0(opt.busNum)
const strip = opt.type + nval + 'mix/' + bVal + '/level'
const strip = opt.type + nVal + 'mix/' + bVal + '/level'
fadeTo(action.actionId, strip, opt, self)
},
}

storeActions[sendID + '_r'] = {
label: 'Recall Send Level',
name: 'Recall Send Level',
options: [
{
type: 'dropdown',
Expand Down Expand Up @@ -848,7 +848,7 @@ export function buildStripDefs(self) {
choices: [
{
id: 'me',
label: 'Channel',
label: 'Channel Send',
},
...self.STORE_LOCATION,
],
Expand All @@ -863,7 +863,7 @@ export function buildStripDefs(self) {
nVal = parseInt(opt.chNum) + '/'
}
const bVal = pad0(opt.busNum)
const strip = opt.type + nval + 'mix/' + bVal + '/level'
const strip = opt.type + nVal + 'mix/' + bVal + '/level'
let fVal = fadeTo(action.actionId, strip, opt, self)
self.sendOSC(strip, { type: 'f', value: fVal })
},
Expand Down
10 changes: 8 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@ class BAirInstance extends InstanceBase {
this.blinkingFB = {}
this.crossFades = {}

if (process.env.DEVELOPER) {
this.PollCount = 125
this.PollTimeout = 100
} else {
this.PollCount = 30
this.PollTimeout = 25
}

buildConstants(this)
}

Expand All @@ -55,8 +63,6 @@ class BAirInstance extends InstanceBase {

// cross-fade steps per second
this.fadeResolution = 20
this.PollCount = 30
this.PollTimeout = 25
this.needStats = true
this.hostResponse = false
this.blinkOn = false
Expand Down

0 comments on commit e79b38f

Please sign in to comment.