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

Add support for new(ish) Sony focus APIs #1081

Merged
merged 3 commits into from
Feb 2, 2025

Conversation

watsonmw
Copy link
Contributor

Add support for new(ish) Sony focus APIs

  • Added property to retrieve the focal position of the lens. The value range is: 0 (focus near) - 100 (focus infinity).
    Camera must be in manual focus mode. Value can be adjusted by 'manualfocus' (if lens is in AF mode).

    get-config focalposition

  • Added control to set the autofocus spot area. Camera must be set to an AF mode and focusarea has to be set to one of the Spot Focus modes. Center of the area is specified in x,y coordinates. 0 <= X <= 639 (left -> right). 0 <= Y <= 479 (top -> bottom). The following will position the area in the center of the screen:

    set-config spotfocusarea=320,240

Add labels for more Sony properties / controls

  • Recognise MPO movie file type
  • Rename near/far control to manual focus adjust as that's what it does

- Recognise MPO movie file type
- Rename near/far control to manual focus adjust as that's what it does
- Added property to retrieve the focal position of the lens. The value range is: 0 (focus near) - 100 (focus infinity).
  Camera must be in manual focus mode. Value can be adjusted by 'manualfocus' (if lens is in AF mode).

   get-config focalposition

- Added control to set the autofocus spot area. Camera must be set to an AF mode and focusarea has to be set to one of the Spot Focus modes. Center of the area is specified in x,y coordinates. 0 <= X <= 639 (left -> right).  0 <= Y <= 479 (top -> bottom). The following will position the area in the center of the screen:

   set-config spotfocusarea=320,240
// Camera must be set to an autofocus mode and focusarea has to be set to one of the Spot Focus modes

currentVal = dpd->CurrentValue.u32;
x = (int)(currentVal >> 16 & 0xffff);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add additional brackets ((currentVal >> 16) & 0xfff)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, added. Sorry, not sure why I was so stingy with the brackets! :)

@msmeissn msmeissn merged commit 4a37116 into gphoto:master Feb 2, 2025
5 checks 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.

2 participants