iOS App - Bluetooth Focus - Change in Behaviour

Ask software engineering and SDK questions for developers working on Mac OS X, Windows or Linux.
  • Author
  • Message
Offline

Robert M.

  • Posts: 8
  • Joined: Thu Nov 04, 2021 4:42 pm
  • Real Name: Robert Meakin

iOS App - Bluetooth Focus - Change in Behaviour

PostThu Nov 04, 2021 5:28 pm

Earlier this year I released an iOS app to control focus on Blackmagic cameras (https://apps.apple.com/us/app/focus-puller/id1551408699). It has two modes: Manual and LiDAR.

Recently, I updated both my iOS (v15) and the firmware on the BMPCC 4K camera (v7.3). Admitedly, it was stupid to do both without checking the app at each stage along the way.

The surprise I've encountered relates to the focus values sent to the camera using a Bluetooth connection.

Focus is set using a value between 0 and 1. Previously, the lower the value, the nearer the focus. This matches the existing documentation (page 5), last updated in 2018 (https://documents.blackmagicdesign.com/ ... ontrol.pdf).

Since the updates this has now reversed. The higher the number the nearer the focus.

If I reverse the value with (1 - newFocusValue) the app behaves as it did previously and existing calibrated lenses behave as before.

I wondered if anyone else had encountered this situation.

The code breaks down like this:
Code: Select all
    public typealias ccu_fixed_t = Int16

    static func CCUFixedFromFloat(_ f: Double) -> ccu_fixed_t {
        return ccu_fixed_t(f * 2048.0)
    }

    ...
    let fixed16Converted = CCUFixedFromFloat(newFocusValue)

    // newFocusValue: 0.18 = fixed16Converted: 368
    // newFocusValue: 0.31 = fixed16Converted: 634
    // fixed16Converted is then used to create a command and sent to the camera.
Offline

mark.sze

  • Posts: 31
  • Joined: Sat Jul 25, 2020 12:55 am
  • Location: Sydney, Australia
  • Real Name: Mark Sze

Re: iOS App - Bluetooth Focus - Change in Behaviour

PostMon Jan 17, 2022 10:11 pm

That does seem a bit odd. According to the latest Pocket 4K manual I could find, 0.0 should be near and 1.0 should be far.

https://documents.blackmagicdesign.com/ ... Manual.pdf

See page 147.

BMD Support have noted to use the latest camera manuals for the values. I checked the latest URSA manual (Nov 21) and it also had the same 0.0 = near, 1.0 = far.

(Reference: viewtopic.php?f=12&t=119457&p=656452&hilit=BlackmagicCameraControl#p656452)
Offline

hellygeorge

  • Posts: 1
  • Joined: Tue Feb 01, 2022 9:38 am
  • Real Name: Helly George

Re: iOS App - Bluetooth Focus - Change in Behaviour

PostTue Feb 01, 2022 10:26 am

If you don't have access to another device, you can search for your phone on the iCloud website. In a web browser, go to iCloud and sign in with your Apple ID and password. Select your iPhone from the All Mmcgbl.com Devices drop-down option after clicking Find iPhone.

From your device, open the app
Go to the "Apps" portion of your phone's screen in the lower-left corner.
Scroll to the bottom of the page to find the app you're searching for.
Finally, tap the "Check" icon to download the program. "GET" should be tapped.
When the installation is complete, tap "Open" > "Install."

Return to Software Developers

Who is online

Users browsing this forum: No registered users and 19 guests