Skip to content

Commit

Permalink
Merge develop into master
Browse files Browse the repository at this point in the history
  • Loading branch information
simonmitchell committed Sep 7, 2019
2 parents a066189 + 9c8c091 commit 1f6c0d9
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 8 deletions.
16 changes: 14 additions & 2 deletions Rocc/Helpers/SimulatedCamera.swift
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ public final class DummyCamera: Camera {
status: .idle,
liveViewInfo: nil,
zoomPosition: nil,
availableFunctions: [.setISO, .setShutterSpeed, .setAperture, .setExposureCompensation, .setSelfTimerDuration, .setWhiteBalance],
availableFunctions: [.setISO, .setShutterSpeed, .setAperture, .setExposureCompensation, .setSelfTimerDuration, .setWhiteBalance, .startZooming],
postViewPictureURLs: nil,
storageInformation: nil,
beepMode: nil,
Expand All @@ -256,7 +256,7 @@ public final class DummyCamera: Camera {
exposureMode: nil,
postViewImageSize: nil,
selfTimer: (current: currentSelfTimer, available: [0.0, 2.0, 5.0]),
shootMode: (current: currentShootMode, available: [.photo, .continuous, .timelapse, .video, .continuous]),
shootMode: (current: currentShootMode, available: [.photo, .continuous, .timelapse, .video, .continuous, .bulb]),
exposureCompensation: (current: currentExposureComp, available: [-3.0, -2.66, -2.33, -2.0, -1.66, -1.33, -1.0, -0.66, -0.33, 0, 0.33, 0.66, 1.0, 1.33, 1.66, 2.0, 2.33, 2.66, 3.0]),
flashMode: nil,
aperture: (current: currentAperture, available: ["1.8", "2.0", "2.2", "2.8", "3.2", "4.0", "4.8", "5.6", "8.0", "11.0", "18.0", "22.0"]),
Expand Down Expand Up @@ -417,10 +417,22 @@ public final class DummyCamera: Camera {
currentExposureComp = value
eventCompletion?()

case .startBulbCapture:

callback(nil, nil)

case .endBulbCapture:

callback(nil, nil)

case .startLiveView:

callback(nil, nil)

case .takePicture:

callback(nil, URL(string: "https://via.placeholder.com/1370x1028") as? T.ReturnType)

default:
callback(nil, nil)
}
Expand Down
4 changes: 4 additions & 0 deletions Rocc/Helpers/Strings/ShutterSpeedFormatter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ public struct ShutterSpeed {
}
}

extension ShutterSpeed: Codable {

}

public extension ShutterSpeed {
/// The actual time interval the given shutter speed will take
var value: TimeInterval {
Expand Down
4 changes: 2 additions & 2 deletions Rocc/LiveViewStreaming.swift
Original file line number Diff line number Diff line change
Expand Up @@ -368,9 +368,9 @@ public final class LiveViewStream: NSObject {

var payload = Payload(data: receivedData)

//TODO: Fix crash when remove out of range!
if let _payload = payload {
receivedData.removeSubrange(_payload.dataRange)
let range = _payload.dataRange.clamped(to: receivedData.startIndex..<receivedData.endIndex)
receivedData.removeSubrange(range)
}

var payloads: [Payload] = []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -323,14 +323,16 @@ extension SonyCameraDevice {
switch self {
case .a7ii, .a7rii:
return "4.00"
case .a6000, .a7s, .a7r, .a7:
case .a6000:
return "3.21"
case .a7s, .a7r, .a7:
return "3.20"
case .a5100:
return "3.10"
case .a7sii:
return "3.00"
case .a7iii, .a7riii:
return "2.10"
return "3.00"
case .a6300:
return "2.01"
case .a5000:
Expand All @@ -339,11 +341,22 @@ extension SonyCameraDevice {
return "1.05"
case .NEX_6:
return "1.03"
case .a9:
return "5.0"
default:
return nil
}
}

var latestRemoteAppVersion: String? {
switch self {
case .a6500:
return "4.31"
default:
return "4.30"
}
}

var requiresHalfPressToCapture: Bool {
let modelsWhichRequireHalfPressToCapture: [Model] = [
.a7iii,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ internal final class SonyCameraDevice {
public var remoteAppVersion: String?

public var latestRemoteAppVersion: String? {
return "4.31"
return modelEnum?.latestRemoteAppVersion ?? "4.30"
}

public var lensModelName: String?
Expand Down
2 changes: 1 addition & 1 deletion ThunderRequest

0 comments on commit 1f6c0d9

Please sign in to comment.