Skip to content

Fixes saved PTZ presets forcing the tilt coordinate to the upper bound. - #223

Open
bakadave wants to merge 1 commit into
roleoroleo:masterfrom
bakadave:fix-ptz-preset-tilt
Open

Fixes saved PTZ presets forcing the tilt coordinate to the upper bound.#223
bakadave wants to merge 1 commit into
roleoroleo:masterfrom
bakadave:fix-ptz-preset-tilt

Conversation

@bakadave

@bakadave bakadave commented Aug 14, 2026

Copy link
Copy Markdown

ACTION_SET_PRESET clamps the current tilt position with if (y < MAX_Y) y = MAX_Y, which rewrites almost all valid Y positions to MAX_Y before saving. go_preset then sends that saved Y coordinate to the PTZ driver, causing numbered presets to restore pan correctly but drive tilt to the vertical limit.

This changes the clamp to if (y > MAX_Y) y = MAX_Y, matching the existing set_home path.

EDIT: old presets need to be saved again after patch

@bakadave
bakadave marked this pull request as ready for review August 14, 2026 06:52
@bakadave

Copy link
Copy Markdown
Author

tested, works well on my camera

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.

1 participant