Skip to content

Commit e327a4d

Browse files
committed
Fix protocolVersion checks #90
1 parent a19b9fb commit e327a4d

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ const { initFeedbacks } = require('./feedbacks')
1414
const { upgradeScripts } = require('./upgrades')
1515
const { CONFIG_MODELS } = require('./models')
1616
const { ConfigFields } = require('./config')
17+
const { protocolGte } = require('./util')
1718

1819
/**
1920
* Companion instance class for the Blackmagic HyperDeck Disk Recorders.
@@ -309,7 +310,7 @@ class HyperdeckInstance extends InstanceBase {
309310
notify.slot = true
310311
notify.remote = true
311312
// if (isMinimumVersion(1, 11) && this.config.timecodeVariables === 'notifications') notify.displayTimecode = true
312-
if (this.protocolVersion >= 1.11 && this.config.timecodeVariables === 'notifications')
313+
if (protocolGte(this.protocolVersion, '1.11') && this.config.timecodeVariables === 'notifications')
313314
notify.displayTimecode = true
314315
await this.hyperDeck.sendCommand(notify)
315316

@@ -525,7 +526,7 @@ class HyperdeckInstance extends InstanceBase {
525526
}
526527

527528
if (
528-
this.protocolVersion >= 1.11 &&
529+
protocolGte(this.protocolVersion, '1.11') &&
529530
this.config.timecodeVariables !== config.timecodeVariables &&
530531
!resetConnection
531532
) {

0 commit comments

Comments
 (0)