From 3d3ad9a9ffd4b285b14f8eaacfa274d879bd9227 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wojciech=20Le=C5=9Bniowski?= Date: Sat, 24 Apr 2021 13:07:39 +0200 Subject: [PATCH] 1.4 - ability to route source routed to given destination --- HELP.md | 3 ++- README.md | 4 ++++ actions.js | 20 ++++++++++++++++++++ index.js | 11 ++++++++++- package.json | 2 +- 5 files changed, 37 insertions(+), 3 deletions(-) diff --git a/HELP.md b/HELP.md index ae72412..5e9bb2b 100644 --- a/HELP.md +++ b/HELP.md @@ -8,10 +8,11 @@ This module will connect to any Blackmagic Design VideoHub Device. * Rename source * Rename serial port (when present) * Route +* Route source routed to other destination * Route serial port (when present) * Select destination * Route source to selected destination * Take (when enabled) * Clear (when enabled) * Write routes to a disk file -* Read routes from a disk file \ No newline at end of file +* Read routes from a disk file diff --git a/README.md b/README.md index ed8e071..641e9f2 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,13 @@ # companion-module-bmd-videohub See HELP.md and LICENSE +**Changes in v1.4.0** +- Added ability to route source based on a source routed to given destination. + **Changes in v1.3.0** - Added ability to read and write routing table to a disk file. - Added 'Return to previous Route' as a release action + **Changes in v1.2.0** - Moved to split files structure for actions, feedback, presets, and variables. - **companion-module-bmd-multiview16 extends this module.** Future changes require testing against both modules. diff --git a/actions.js b/actions.js index b02bf48..1abd374 100644 --- a/actions.js +++ b/actions.js @@ -90,6 +90,26 @@ module.exports = { ] }; + actions['route_routed'] = { + label: 'Route source routed to given destination', + options: [ + { + type: 'dropdown', + label: 'Destination to take routed source from', + id: 'source_routed_to_destination', + default: '0', + choices: this.CHOICES_OUTPUTS + }, + { + type: 'dropdown', + label: 'Destination', + id: 'destination', + default: '0', + choices: this.CHOICES_OUTPUTS + } + ] + }; + actions['route_to_previous'] = { label: 'Return to previous route', options: [ diff --git a/index.js b/index.js index fc1eba8..035ad4f 100644 --- a/index.js +++ b/index.js @@ -173,6 +173,15 @@ class instance extends instance_skel { } break; + case 'route_routed': + if (parseInt(opt.destination) >= this.outputCount) { + cmd = "VIDEO MONITORING OUTPUT ROUTING:\n"+(parseInt(opt.destination)-this.outputCount)+" "+opt.source+"\n\n"; + } + else { + cmd = "VIDEO OUTPUT ROUTING:\n"+opt.destination+" "+this.getOutput(parseInt(opt.source_routed_to_destination)).route+"\n\n"; + } + break; + case 'route_to_previous': var output = this.getOutput(parseInt(opt.destination)); var fallbackpop = -1; @@ -605,4 +614,4 @@ class instance extends instance_skel { } } -exports = module.exports = instance; \ No newline at end of file +exports = module.exports = instance; diff --git a/package.json b/package.json index 337ed8b..1b8aea0 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "legacy": [ "videohub" ], - "version": "1.3.0", + "version": "1.4.0", "api_version": "1.0.0", "keywords": [ "Matrix" ], "manufacturer": "Blackmagic Design",