Skip to content

Commit

Permalink
Update DMX Usb Pro detection.
Browse files Browse the repository at this point in the history
  • Loading branch information
spensbot committed Dec 12, 2023
1 parent 98589a7 commit 1fa2253
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/main/engine/connections/dmx/DmxUsbPro.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,21 @@ export async function isDmxUsbPro(
0x00, // MSB config size
])

for (const _i of indexArray(3)) {
for (const _i of indexArray(1)) {
const start = Date.now()
let reply = await connection.writeAndAwaitReply(
getMessageBuffer('getWidgetParametersRequest', dataBuffer),
150
300
)
const end = Date.now()

if (
reply &&
reply.length > 1 &&
reply[0] === ENTTEC_PRO_START_OF_MSG &&
reply[reply.length - 1] === ENTTEC_PRO_END_OF_MSG
) {
console.log(`Dmx USB Pro detection time: ${end - start}ms`)
return true
}
}
Expand Down

0 comments on commit 1fa2253

Please sign in to comment.