-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updated PTZ preset functionality #16
Conversation
Gartom
commented
Mar 30, 2021
•
edited
Loading
edited
- Updated PTZ presets to full range available in cameras (0-255).
- Updated companion presets for PTZ presets.
- Fixed a bug for companion presets for PTZ presets when PTZ preset number in HEX contained the letter A to F.
Updated companion presets for PTZ presets. Fixed a bug for companion presets for PTZ presets when PTZ preset number in HEX contained the letter A to F.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does preset 0 exists? Seems odd for a camera
Just realized that the bugfix I made is not backwards compatible with old config files and need to be made slightly different. Don't merge this yet... |
Fix improved for PTZ presets when PTZ preset number in HEX contained the letter a to f, to make the fix compatible with existing companion configurations.
Selection with keyboard will be possible if bitfocus/companion#1541 is implemented.
@@ -1220,7 +1220,7 @@ instance.prototype.action = function(action) { | |||
break; | |||
|
|||
case 'speedPset': | |||
cmd ='\x81\x01\x7E\x01\x0B' + String.fromCharCode(parseInt(opt.val,16) & 0xFF) + String.fromCharCode(parseInt(opt.speed,16) & 0xFF) + '\xFF'; | |||
cmd ='\x81\x01\x06\x01' + String.fromCharCode(parseInt(opt.val,16) & 0xFF) + String.fromCharCode(parseInt(opt.speed,16) & 0xFF) + '\xFF'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does this have to do with the rest of the changeset?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it should have been added in a separate PR but it is the fix for bug #13 as mentioned in a comment above. It is the actual command to set the "Preset Recall Speed" in the PTZ camera, and it becomes relevant when using the preset functionality that is updated in this PR.
From the "PTZOptics VISCA over IP Commands" document:
This needs to be revisited, I believe. Although the command was updated as reported by the ticket, PTZOptics documentation doesn't show support for a preset number, only the speed option. |
The PTZOptics user manual is not complete regarding presets. Therefore, I based the update on responses from PTZOptics in their forum: https://help.ptzoptics.com/support/discussions/topics/13000022947/page/2 Colin at PTZOptics referred to this page for details about preset numbers, which corresponds to the implementation: |
@krocheck , is there still an issue? |