loupedeck-commander 1.4.3 → 1.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/VERSION.md CHANGED
@@ -1,33 +1,33 @@
1
- # Versions
2
-
3
- ## 1.0.2
4
-
5
- 1. Updated button rendering strategy:
6
- - Render Background Color - per Button State
7
- - Render Image on Top (if available), works well with transparent images
8
-
9
- 2. Updated configuration strategy:
10
- - Keep all state related attributes per button-state also in config:
11
- example:
12
-
13
- ```json
14
- "states": {
15
- "off": {
16
- "color": "#aaaaaa",
17
- "image": "icons/bulb.png",
18
- "cmd": "echo \"{id} {state}\""
19
- },
20
- "on": {
21
- "color": "#11ff11",
22
- "image": "icons/bulb.png",
23
- "cmd": "echo \"{id} {state}\""
24
- }
25
- ```
26
-
27
- ## 1.0.1
28
-
29
- bugfixes and documentation
30
-
31
- ## 1.0.0
32
-
1
+ # Versions
2
+
3
+ ## 1.0.2
4
+
5
+ 1. Updated button rendering strategy:
6
+ - Render Background Color - per Button State
7
+ - Render Image on Top (if available), works well with transparent images
8
+
9
+ 2. Updated configuration strategy:
10
+ - Keep all state related attributes per button-state also in config:
11
+ example:
12
+
13
+ ```json
14
+ "states": {
15
+ "off": {
16
+ "color": "#aaaaaa",
17
+ "image": "icons/bulb.png",
18
+ "cmd": "echo \"{id} {state}\""
19
+ },
20
+ "on": {
21
+ "color": "#11ff11",
22
+ "image": "icons/bulb.png",
23
+ "cmd": "echo \"{id} {state}\""
24
+ }
25
+ ```
26
+
27
+ ## 1.0.1
28
+
29
+ bugfixes and documentation
30
+
31
+ ## 1.0.0
32
+
33
33
  first public release
@@ -198,7 +198,7 @@ export class BaseLoupeDeckHandler {
198
198
  await this.buttons.load()
199
199
  }
200
200
 
201
- //await this.updateScreens()
201
+ await this.updateScreens()
202
202
 
203
203
  await this.buttons.draw(this.device)
204
204
  // Initialize the Interfaces
File without changes
package/common/button.mjs CHANGED
File without changes
File without changes
package/common/index.mjs CHANGED
File without changes
package/common/utils.mjs CHANGED
File without changes
package/eslint.config.mjs CHANGED
@@ -1,9 +1,9 @@
1
- import globals from "globals";
2
- import pluginJs from "@eslint/js";
3
-
4
-
5
- /** @type {import('eslint').Linter.Config[]} */
6
- export default [
7
- {languageOptions: { globals: globals.browser }},
8
- pluginJs.configs.recommended,
1
+ import globals from "globals";
2
+ import pluginJs from "@eslint/js";
3
+
4
+
5
+ /** @type {import('eslint').Linter.Config[]} */
6
+ export default [
7
+ {languageOptions: { globals: globals.browser }},
8
+ pluginJs.configs.recommended,
9
9
  ];
@@ -1,44 +1,44 @@
1
- import { HAPTIC } from 'loupedeck'
2
- import { BaseLoupeDeckHandler } from '../common/BaseLoupeDeckHandler.mjs'
3
-
4
- /**
5
- * Our Special-Handler just used the Default - and adds Vibration after triggers through Button-Releases
6
- */
7
- export class ExampleDeviceHandler extends BaseLoupeDeckHandler {
8
- /**
9
- * Handle different Vibration-Feedback on OK (true), and NOK (false)
10
- * @param {*} ok
11
- */
12
- async vibrateHandler (ok) {
13
- if (ok) { await this.device.vibrate(HAPTIC.REV_FASTEST) } else {
14
- this.device.vibrate(HAPTIC.RUMBLE2)
15
- }
16
- }
17
-
18
- /**
19
- * Handle Button-Up Events with Vibration Handler
20
- * @param {*} event
21
- */
22
- async onButtonUp (event) {
23
- const res = await super.onButtonUp(event)
24
- await this.vibrateHandler(res)
25
- }
26
-
27
- /**
28
- * Handle Knob-Rotation Events with Vibration Handler
29
- * @param {*} event
30
- */
31
- async onRotate (event) {
32
- const res = await super.onRotate(event)
33
- await this.vibrateHandler(res)
34
- }
35
-
36
- /**
37
- * Handle Touch-End Events with Vibration Handler
38
- * @param {*} event
39
- */
40
- async onTouchEnd (event) {
41
- const res = await super.onTouchEnd(event)
42
- await this.vibrateHandler(res)
43
- }
44
- }
1
+ import { HAPTIC } from 'loupedeck'
2
+ import { BaseLoupeDeckHandler } from '../common/BaseLoupeDeckHandler.mjs'
3
+
4
+ /**
5
+ * Our Special-Handler just used the Default - and adds Vibration after triggers through Button-Releases
6
+ */
7
+ export class ExampleDeviceHandler extends BaseLoupeDeckHandler {
8
+ /**
9
+ * Handle different Vibration-Feedback on OK (true), and NOK (false)
10
+ * @param {*} ok
11
+ */
12
+ async vibrateHandler (ok) {
13
+ if (ok) { await this.device.vibrate(HAPTIC.REV_FASTEST) } else {
14
+ this.device.vibrate(HAPTIC.RUMBLE2)
15
+ }
16
+ }
17
+
18
+ /**
19
+ * Handle Button-Up Events with Vibration Handler
20
+ * @param {*} event
21
+ */
22
+ async onButtonUp (event) {
23
+ const res = await super.onButtonUp(event)
24
+ await this.vibrateHandler(res)
25
+ }
26
+
27
+ /**
28
+ * Handle Knob-Rotation Events with Vibration Handler
29
+ * @param {*} event
30
+ */
31
+ async onRotate (event) {
32
+ const res = await super.onRotate(event)
33
+ await this.vibrateHandler(res)
34
+ }
35
+
36
+ /**
37
+ * Handle Touch-End Events with Vibration Handler
38
+ * @param {*} event
39
+ */
40
+ async onTouchEnd (event) {
41
+ const res = await super.onTouchEnd(event)
42
+ await this.vibrateHandler(res)
43
+ }
44
+ }
@@ -1,21 +1,21 @@
1
- import { ExampleDeviceHandler } from './ExampleDeviceHandler.mjs'
2
-
3
- const handler = new ExampleDeviceHandler('config.json')
4
-
5
-
6
- /**
7
- * Stop the handlers when a signal like SIGINT or SIGTERM arrive
8
- * @param {*} signal
9
- */
10
- const stopHandler = async(signal) => {
11
- console.log(`Receiving ${signal} => Stopping processes.`)
12
- await handler.stop()
13
- }
14
-
15
- // Initiating the signal handlers:
16
- // see https://www.tutorialspoint.com/unix/unix-signals-traps.htm
17
- process.on('SIGINT', async (signal) => { stopHandler(signal) })
18
- process.on('SIGTERM', async (signal) => { stopHandler(signal) })
19
-
20
- // Initiating a process
21
- await handler.start()
1
+ import { ExampleDeviceHandler } from './ExampleDeviceHandler.mjs'
2
+
3
+ const handler = new ExampleDeviceHandler('config.json')
4
+
5
+
6
+ /**
7
+ * Stop the handlers when a signal like SIGINT or SIGTERM arrive
8
+ * @param {*} signal
9
+ */
10
+ const stopHandler = async(signal) => {
11
+ console.log(`Receiving ${signal} => Stopping processes.`)
12
+ await handler.stop()
13
+ }
14
+
15
+ // Initiating the signal handlers:
16
+ // see https://www.tutorialspoint.com/unix/unix-signals-traps.htm
17
+ process.on('SIGINT', async (signal) => { stopHandler(signal) })
18
+ process.on('SIGTERM', async (signal) => { stopHandler(signal) })
19
+
20
+ // Initiating a process
21
+ await handler.start()
package/index.mjs CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "loupedeck-commander",
3
- "version": "1.4.3",
3
+ "version": "1.4.4",
4
4
  "description": "A system to ease working with LoupeDeck devices using CMD-line, OPC/UA or HTTP-client interfaces",
5
5
  "main": "index.mjs",
6
6
  "scripts": {
@@ -14,9 +14,9 @@
14
14
  "json5": "^2.2.3",
15
15
  "loupedeck": "^7.0.3",
16
16
  "mkdirp": "^3.0.1",
17
- "node-opcua": "^2.163.1",
17
+ "node-opcua": "^2.169.0",
18
18
  "string-template": "^1.0.0",
19
- "yaml": "^2.8.2"
19
+ "yaml": "^2.8.3"
20
20
  },
21
21
  "author": "Thomas Schneider",
22
22
  "license": "Apache-2.0",
package/test_opcua.mjs ADDED
@@ -0,0 +1,11 @@
1
+ import { ApplicationConfig } from './common/ApplicationConfig.mjs'
2
+ import { InitializeInterfaces, StopInterfaces, opcuainterface, profileEmitter } from './interfaces/interfaces.mjs'
3
+
4
+ var config='config.yaml'
5
+
6
+ let appConfig = new ApplicationConfig()
7
+ appConfig.loadFromFile(config)
8
+
9
+ await InitializeInterfaces(appConfig)
10
+
11
+ await StopInterfaces()