8000 #184 Avoid negative numbers in PTZ presets by flreinhard · Pull Request #189 · roleoroleo/sonoff-hack · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

#184 Avoid negative numbers in PTZ presets #189

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

Merged

Conversation

flreinhard
Copy link
Contributor

Fixes #184

@roleoroleo
Copy link
Owner

I don't understand exactly this pr.
Coordinates cannot be negative, at least in my model.

@flreinhard
Copy link
Contributor Author

On my cam that's easy to reproduce:

  1. Move the camera almost to the right limit
  2. use ptz -a right
  3. you'll notice/hear, that after reaching the right limit, the motor will still try to push it further but can't
  4. result is a negative x coordinate
  5. once you've had a negative x, all preset's won't work any more, since you'll need to do a homing cycle
[root@TestCam]# ptz -a get_coord
Current x  = 201, y  = 450
Degrees x  = 339.3, y  = 60.0
339.3,60.0
[root@TestCam]# ptz -a right 
[root@TestCam]# ptz -a get_coord
Current x  = -1919, y  = 450
Degrees x  = 557.4, y  = 60.0
557.4,60.0
[root@TestCam]# cat /mnt/mmc/sonoff-hack/model 
GK-200MP2-B

is it possible to trigger homing manually?

@roleoroleo
Copy link
Owner

This pr fixes a bug, but probably doesn't fix the problem related to a negative coordinate.
The cam uses the current position to go to a preset, if the position is wrong the preset will be wrong.
I don't know how it's possible to fix it.
The cam should stop automatically when it reaches the limit.

@roleoroleo roleoroleo merged commit f354287 into roleoroleo:master Mar 6, 2025
1 check passed
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.

"Go to Presets" error
2 participants
0