Skip to content

Commit

Permalink
fix: loupedeck drawing
Browse files Browse the repository at this point in the history
  • Loading branch information
Julusian committed Oct 9, 2022
1 parent c589404 commit 1225dbe
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 13 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"dependencies": {
"@elgato-stream-deck/node": "^5.6.0",
"@julusian/jpeg-turbo": "^2.0.0",
"@loupedeck/node": "^0.1.0",
"@loupedeck/node": "^0.1.1",
"@xencelabs-quick-keys/node": "^0.4.0",
"electron-about-window": "^1.15.2",
"electron-prompt": "^1.7.0",
Expand Down
6 changes: 0 additions & 6 deletions src/device-types/loupedeck.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,13 +194,7 @@ export class LoupedeckWrapper implements WrappedDevice {
this.#deck.setBrightness(percent / 100)
}
async blankDevice(skipButtons?: boolean): Promise<void> {
// Hopefully this fixes the issue with the display getting stuck
// await this.#deck.getSerialNumber()

await this.#deck.blankDevice(true, !skipButtons)

// Hopefully this fixes the issue with the display getting stuck
// await this.#deck.getSerialNumber()
}
async draw(d: DeviceDrawProps): Promise<void> {
if (d.keyIndex >= 24 && d.keyIndex < 32) {
Expand Down
2 changes: 1 addition & 1 deletion src/devices.ts
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ export class DeviceManager {
console.log(`adding new device: ${path}`)
console.log(`existing = ${JSON.stringify(Array.from(this.devices.keys()))}`)

ld = await openLoupedeck(path)
ld = await openLoupedeck(path, { waitForAcks: true })
ld.on('error', (err) => {
console.error('device error', err)
this.cleanupDeviceById(serial)
Expand Down
31 changes: 26 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,13 @@
node-addon-api "^5.0.0"
pkg-prebuilds "~0.1.0"

"@loupedeck/node@^0.1.0":
version "0.1.0"
resolved "https://registry.yarnpkg.com/@loupedeck/node/-/node-0.1.0.tgz#8e636e4adb34c7a79dff0a2a31c18af2a411ab6c"
integrity sha512-V1S5yMxVMKnSLKHrICrbGAGJIeAvmlz8bLuoZeJ29nhJMTPb8DEHjxw8VZzLhneK5HA3g73PBqOtJYB4S73ZAA==
"@loupedeck/node@^0.1.1":
version "0.1.1"
resolved "https://registry.yarnpkg.com/@loupedeck/node/-/node-0.1.1.tgz#e5b8022ea9ded1b633a14cd75857446d42b9d237"
integrity sha512-moCj5qyLDgWim/gDweI7SkL2POFwWMsJbs2VvzG9cBaAufrNS5rT+I+I5kbnQ1+2bo+1guv5rxZUZeX78ZdmAA==
dependencies:
eventemitter3 "^4.0.7"
p-queue "6"
serialport "^10.4.0"
tslib "^2.4.0"

Expand Down Expand Up @@ -2028,7 +2029,7 @@ event-stream@=3.3.4:
stream-combiner "~0.0.4"
through "~2.3.1"

eventemitter3@^4.0.7:
eventemitter3@^4.0.4, eventemitter3@^4.0.7:
version "4.0.7"
resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f"
integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==
Expand Down Expand Up @@ -3544,6 +3545,11 @@ p-cancelable@^1.0.0:
resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-1.1.0.tgz#d078d15a3af409220c886f1d9a0ca2e441ab26cc"
integrity sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==

p-finally@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae"
integrity sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow==

p-limit@^1.1.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8"
Expand Down Expand Up @@ -3614,6 +3620,21 @@ p-map@^4.0.0:
dependencies:
aggregate-error "^3.0.0"

p-queue@6:
version "6.6.2"
resolved "https://registry.yarnpkg.com/p-queue/-/p-queue-6.6.2.tgz#2068a9dcf8e67dd0ec3e7a2bcb76810faa85e426"
integrity sha512-RwFpb72c/BhQLEXIZ5K2e+AhgNVmIejGlTgiB9MzZ0e93GRvqZ7uSi0dvRF7/XIXDeNkra2fNHBxTyPDGySpjQ==
dependencies:
eventemitter3 "^4.0.4"
p-timeout "^3.2.0"

p-timeout@^3.2.0:
version "3.2.0"
resolved "https://registry.yarnpkg.com/p-timeout/-/p-timeout-3.2.0.tgz#c7e17abc971d2a7962ef83626b35d635acf23dfe"
integrity sha512-rhIwUycgwwKcP9yTOOFK/AKsAopjjCakVqLHePO3CC6Mir1Z99xT+R63jZxAT5lFZLa2inS5h+ZS2GvR99/FBg==
dependencies:
p-finally "^1.0.0"

p-try@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3"
Expand Down

0 comments on commit 1225dbe

Please sign in to comment.