Skip to content

Commit

Permalink
add ptz initialization command
Browse files Browse the repository at this point in the history
  • Loading branch information
josephdadams committed Mar 14, 2024
1 parent c96bb5e commit 28f9309
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 1 deletion.
1 change: 1 addition & 0 deletions companion/HELP.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ The actions are separated into the following categories:
- Pan/Tilt Speed Up
- Pan/Tilt Speed Down
- Set Pan/Tilt Speed
- Pan/Tilt Initialization

**Lens**

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "canon-ptz",
"version": "2.1.2",
"version": "2.2.0",
"main": "src/index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
Expand Down
9 changes: 9 additions & 0 deletions src/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -514,6 +514,15 @@ module.exports = {
self.sendPTZ(self.ptzCommand, cmd)
}
}

actions.ptInitialization = {
name: 'Pan/Tilt - Initialize',
options: [],
callback: async (action) => {
cmd = 'cmd=platform_reset'
self.sendPTZ(self.maintainCommand, cmd)
}
}
}

if (s.ptSpeed == true) {
Expand Down
1 change: 1 addition & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ class canonptzInstance extends InstanceBase {
this.powerCommand = 'standby.cgi?'
this.savePresetCommand = 'preset/set?'
this.traceCommand = 'trace/'
this.maintainCommand = 'maintain?'
}

async destroy() {
Expand Down

0 comments on commit 28f9309

Please sign in to comment.