Skip to content

Commit

Permalink
Merge pull request #4 from bitfocus/v3.0
Browse files Browse the repository at this point in the history
Update for v3.0
  • Loading branch information
istnv authored Aug 6, 2023
2 parents dcf26ec + 076d22b commit 663a912
Show file tree
Hide file tree
Showing 7 changed files with 2,506 additions and 320 deletions.
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
node_modules/
.eslintrc
/pkg
/pkg.tgz
DEBUG-INSPECT
DEBUG-PACKAGED
DEBUG-PACKAGE
245 changes: 245 additions & 0 deletions actions.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,245 @@
import { Regex } from '@companion-module/base'

export function compileActionDefinitions(self) {
const sendCmd = self.sendCmd

return {
'asc': {
name: 'Take (Advance Script Cue)',
options: [
{
type: 'dropdown',
label: 'Cues to advance / step Back',
id: 'cueNum',
default: '0',
choices: [
{ id: '-10', label: 'Step back 10 Cues' },
{ id: '-1', label: 'Step back 1 Cue' },
{ id: '0', label: 'None / Take' },
{ id: '+1', label: 'Advance 1 Cue' },
{ id: '+10', label: 'Advance 10 Cues' },
],
},
],
callback: async (action, context) => {
const cue = action.options.cueNum
await sendCmd('ASC' + (0 == cue ? '' : ' ' + cue))
},
},

'bpr': {
name: 'Basic Preset Recall (Index Nr)',
options: [
{
type: 'textinput',
label: 'Preset Index',
id: 'idx',
default: 1,
regex: Regex.NUMBER,
},
{
type: 'textinput',
label: 'Duration (Optional)',
id: 'dur',
default: 1,
regex: Regex.NUMBER,
},
],
callback: async (action, context) => {
const idx = action.options.idx
const dur = action.options.dur
await sendCmd(`BPR ${idx} ${dur}`)
},
},

'rsc': {
name: 'Recall Script Cue (Script, Cue)',
options: [
{
type: 'textinput',
label: 'Script ID/Register ID',
id: 'sidx',
default: 1,
regex: Regex.NUMBER,
},
{
type: 'textinput',
label: 'Script Cue',
id: 'cidx',
default: 1,
regex: Regex.NUMBER,
},
{
type: 'dropdown',
label: 'ID Type being recalled',
id: 'type',
default: 'S',
choices: [
{ id: 'S', label: 'ScriptID (default)' },
{ id: 'R', label: 'RegisterID' },
],
},
],
callback: async (action, context) => {
const sidx = action.options.sidx
const cidx = action.options.cidx
const type = action.options.type
await sendCmd(`RSC ${sidx} ${cidx} ${type}`)
},
},

'trn': {
name: 'Transition layer(s)',
options: [
{
type: 'dropdown',
label: 'Transition Mix on/off',
id: 'mix',
default: '1',
choices: [
{ id: 1, label: 'Mix On' },
{ id: 0, label: 'Mix Off' },
],
},
{
type: 'textinput',
label: 'duration',
id: 'dur',
default: 60,
regex: Regex.NUMBER,
},
{
type: 'textinput',
name: 'Layer(s) input multiple layers space delimited',
id: 'lay',
default: '',
},
],
callback: async (action, context) => {
const mix = action.options.mix
const dur = action.options.dur
const lay = action.options.lay
await sendCmd(`TRN ${mix} ${dur} ${lay}`)
},
},

'frz': {
label: 'Freeze Layer(s)',
options: [
{
type: 'dropdown',
label: 'Freeze Layer on/off',
id: 'frzonoff',
default: '1',
choices: [
{ id: 1, label: 'Freeze On' },
{ id: 0, label: 'Freeze Off' },
],
},
{
type: 'textinput',
label: 'Layer(s) input multiple layers space delimited',
id: 'lay',
default: 1,
},
],
callback: async (action, context) => {
const onoff = action.options.frzonoff
const lay = action.options.lay
await sendCmd(`FRZ ${onoff} ${lay}`)
},
},

'btr': {
name: 'Background Transition',
options: [
{
type: 'textinput',
label: 'duration',
id: 'dur',
default: 60,
regex: Regex.NUMBER,
},
],
callback: async (action, context) => {
const dur = action.options.dur
await sendCmd(`BTR ${dur}`)
},
},

'fkr': {
name: 'Function Key Recall',
options: [
{
type: 'textinput',
label: 'Funktion key ID',
id: 'fkrid',
default: 1,
regex: Regex.NUMBER,
},
{
type: 'textinput',
label: 'Layer(s) input multiple layers space delimited',
id: 'lay',
default: 1,
},
],
callback: async (action, context) => {
const fkrid = action.options.fkrid
const lay = action.options.lay
await sendCmd(`FKR ${fkrid} ${lay}`)
},
},

'ofz': {
name: 'Output Freeze',
options: [
{
type: 'dropdown',
label: 'Freeze Output on/off',
id: 'frzonoff',
default: '1',
choices: [
{ id: 1, label: 'Freeze On' },
{ id: 0, label: 'Freeze Off' },
],
},
{
type: 'textinput',
label: 'Output(s)input multiple outputs space delimited',
id: 'output',
default: 1,
},
],
callback: async (action, context) => {
const onoff = action.options.frzonoff
const output = action.options.output
await sendCmd(`OFZ ${onoff} ${output}`)
},
},

'dmt': {
name: 'Device Mixer Transition',
options: [
{
type: 'textinput',
label: 'duration',
id: 'dur',
default: 60,
regex: Regex.NUMBER,
},
{
type: 'textinput',
label: 'Device(s)',
id: 'dev',
default: 1,
},
],
callback: async (action, context) => {
const dur = action.options.dur
const dev = action.options.dev
await sendCmd(`DMT ${dur} ${dev}`)
},
},
}
}
File renamed without changes.
36 changes: 36 additions & 0 deletions companion/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"id": "christie-spyder",
"name": "christie-spyder",
"shortname": "spyder",
"description": "spyder plugin for Companion",
"version": "0.0.0",
"license": "ISC",
"repository": "git+https://github.com/bitfocus/companion-module-christie-spyder.git",
"bugs": "https://github.com/bitfocus/companion-module-christie-spyder/issues",
"maintainers": [
{
"name": "Per Røine",
"email": "[email protected]"
},
{
"name": "John A Knight, Jr",
"email": "[email protected]"
}
],
"legacyIds": [
"spyder"
],
"runtime": {
"type": "node18",
"api": "nodejs-ipc",
"apiVersion": "0.0.0",
"entrypoint": "../spyder.js"
},
"manufacturer": "Christie",
"products": [
"Spyder X20/X80"
],
"keywords": [
"Image Processing"
]
}
27 changes: 7 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,29 +1,16 @@
{
"name": "christie-spyder",
"legacy": [
"spyder"
],
"version": "1.0.2",
"api_version": "1.0.0",
"keywords": [
"Image Processing"
],
"manufacturer": "Christie",
"product": "Spyder X20/X80",
"shortname": "spyder",
"description": "spyder plugin for Companion",
"version": "1.2.0",
"main": "spyder.js",
"type": "module",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "Per Røine <[email protected]>",
"license": "ISC",
"homepage": "https://github.com/bitfocus/companion-module-christie-spyder#readme",
"bugs": {
"url": "https://github.com/bitfocus/companion-module-christie-spyder/issues"
"license": "MIT",
"dependencies": {
"@companion-module/base": "~1.4.1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/bitfocus/companion-module-christie-spyder.git"
"devDependencies": {
"@companion-module/tools": "^1.3.2"
}
}
Loading

0 comments on commit 663a912

Please sign in to comment.