Skip to content
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

Merged
merged 6 commits into from
Apr 5, 2021

Conversation

Gartom
Copy link
Contributor

@Gartom Gartom commented Mar 30, 2021

  • 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.

Gartom added 4 commits March 31, 2021 00:28
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.
@Gartom
Copy link
Contributor Author

Gartom commented Mar 30, 2021

This update would close #13, #14 and #15.

Copy link
Member

@JeffreyDavidsz JeffreyDavidsz left a 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

@Gartom
Copy link
Contributor Author

Gartom commented Mar 31, 2021

Preset 0 is a special preset that is used as "home" position after startup if it has been set.

From the user manual:
Screenshot_20210331-120349_Adobe Acrobat.jpg

@Gartom
Copy link
Contributor Author

Gartom commented Mar 31, 2021

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...

@Gartom Gartom marked this pull request as draft March 31, 2021 23:05
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.
@Gartom Gartom marked this pull request as ready for review April 1, 2021 06:00
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';

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?

Copy link
Contributor Author

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:
bild

@Gartom Gartom changed the title Updated PTZ presets to full range available in cameras (0-255). Updated PTZ preset functionality Apr 3, 2021
@JeffreyDavidsz JeffreyDavidsz merged commit 0a78c6a into bitfocus:master Apr 5, 2021
@krocheck
Copy link
Member

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.

image

@Gartom
Copy link
Contributor Author

Gartom commented Apr 18, 2021

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:
https://conferenceroomsystems.freshdesk.com/support/solutions/articles/13000077943-ptzoptics-preset-commands-reserved-presets-and-special-functions

@Gartom
Copy link
Contributor Author

Gartom commented Apr 19, 2021

@krocheck , is there still an issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants