Skip to content

Commit

Permalink
FIX - PTZMoveStop bug (#276)
Browse files Browse the repository at this point in the history
* v3.6.2 PTZMoveStop fix
  • Loading branch information
thedist authored Jul 31, 2024
1 parent 08c8a03 commit d141e80
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 4 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ This module now supports Companions HTTP API, providing endpoints that can be us


# Recent Patches
**V3.6.2**
- Fixed a bug with PTZ Stop action

**V3.6.1**
- Fixed a bug with Start Streaming and Stop Streaming actions not targeting specific vMix streams

Expand Down
3 changes: 3 additions & 0 deletions docs/PATCH_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Patch Notes

**V3.6.2**
- Fixed a bug with PTZ Stop action

**V3.6.1**
- Fixed a bug with Start Streaming and Stop Streaming actions not targeting specific vMix streams

Expand Down
6 changes: 3 additions & 3 deletions src/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1212,7 +1212,7 @@ interface PTZMoveCallback {
input: string
functionID:
| 'PTZHome'
| 'PTZStop'
| 'PTZMoveStop'
| 'PTZMoveUp'
| 'PTZMoveUpLeft'
| 'PTZMoveUpRight'
Expand Down Expand Up @@ -4599,7 +4599,7 @@ export function getActions(instance: VMixInstance): VMixActions {
default: 'PTZHome',
choices: [
{ id: 'PTZHome', label: 'Home' },
{ id: 'PTZStop', label: 'Stop' },
{ id: 'PTZMoveStop', label: 'Stop' },
{ id: 'PTZMoveUp', label: 'Up' },
{ id: 'PTZMoveUpLeft', label: 'Up Left' },
{ id: 'PTZMoveUpRight', label: 'Up RIght' },
Expand Down Expand Up @@ -4627,7 +4627,7 @@ export function getActions(instance: VMixInstance): VMixActions {
isVisible: (options) => {
return (
options.functionID !== 'PTZHome' &&
options.functionID !== 'PTZStop' &&
options.functionID !== 'PTZMoveStop' &&
options.functionID !== 'PTZMoveToVirtualInputPosition'
)
},
Expand Down
21 changes: 20 additions & 1 deletion src/upgrade.ts
Original file line number Diff line number Diff line change
Expand Up @@ -603,6 +603,25 @@ const upgradeV3_6_0: CompanionStaticUpgradeScript<Config> = (_context, props): C
return changes
}

const upgradeV3_6_2: CompanionStaticUpgradeScript<Config> = (_context, props): CompanionStaticUpgradeResult<Config> => {
let actions: any = props.actions

const changes: CompanionStaticUpgradeResult<Config> = {
updatedConfig: null,
updatedActions: [],
updatedFeedbacks: []
}

actions.forEach((action: any) => {
if (action.actionId === 'ptzMove' && action.options.functionID === 'PTZStop') {
action.options.functionID = 'PTZMoveStop'
changes.updatedActions.push(action)
}
})

return changes
}

export const getUpgrades = (): CompanionStaticUpgradeScript<Config>[] => {
return [upgradeV1_2_0, upgradeV2_0_0, upgradeV2_0_6, upgradeV3_5_0, adjustmentFix, upgradeV3_6_0]
return [upgradeV1_2_0, upgradeV2_0_0, upgradeV2_0_6, upgradeV3_5_0, adjustmentFix, upgradeV3_6_0, upgradeV3_6_2]
}

0 comments on commit d141e80

Please sign in to comment.