- Posts: 8
- Joined: Thu Nov 04, 2021 4:42 pm
- Real Name: Robert Meakin
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:
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.