From 415afea1ccf3580969ef92bcdaa1c782d76ab512 Mon Sep 17 00:00:00 2001 From: johanneskares Date: Thu, 20 May 2021 23:08:00 +0200 Subject: [PATCH] Add Auto Cut --- Sources/Atem/Messages/Actions.swift | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/Sources/Atem/Messages/Actions.swift b/Sources/Atem/Messages/Actions.swift index 4453888..19581a9 100644 --- a/Sources/Atem/Messages/Actions.swift +++ b/Sources/Atem/Messages/Actions.swift @@ -26,6 +26,27 @@ extension Message.Do { } } +extension Message.Do { + /// Performs a auto transition on the atem + public struct Auto: SerializableMessage { + public static let title = Message.Title(string: "DAut") + public let debugDescription = "auto" + public let atemSize: AtemSize + + public init(with bytes: ArraySlice) { + atemSize = AtemSize(rawValue: bytes.first!)! + } + + public init(in atemSize: AtemSize) { + self.atemSize = atemSize + } + + public var dataBytes: [UInt8] { + return [atemSize.rawValue] + [0,0,0] + } + } +} + // MARK: - Change Preview Bus extension Message.Do { /// Informs a switcher that the preview bus should be changed