This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ORSSerial | |
/// An example of an extension of the ORSSerialPacketDescriptor that enables identifying delimited packets. | |
public class DelimitedSerialPacketDescriptor: ORSSerialPacketDescriptor { | |
private(set) public var delimiter: Data? | |
convenience public init(delimiter: Data, maximumPacketLength maxPacketLength: UInt, userInfo: AnyObject?, responseEvaluator: @escaping ORSSerialPacketEvaluator) { | |
self.init(maximumPacketLength: maxPacketLength, userInfo: userInfo, responseEvaluator: responseEvaluator) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Control a LG WebOS TV using ESP32. This file is made using PlatformIO but Arduino should be supported as well. | |
*/ | |
// Arduino libraries | |
#include <Arduino.h> | |
// ESP32 Framework libraries |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension UIBezierPath { | |
/// Defines a corner of a rounded rectangle path. | |
public enum RoundedRectCorner { | |
case topLeft | |
case topRight | |
case bottomLeft | |
case bottomRight | |
case all | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension UIBezierPath { | |
/// Creates a rounded rectangle without clamping the corner radius the 1/3 of the rects width or height. | |
/// This can be used to workout a bug in the standard `UIBezierPath(roundedRect:cornerRadius)`. | |
/// | |
/// It will however clamp the corner radius to a max of half the width or height of the rect, this is to avoid incorrect drawing. | |
/// - Parameters: | |
/// - rect: The rectangle that defines the basic shape of the path | |
/// - cornerRadius: The radius of each corner oval. A value of 0 results in a rectangle without rounded corners. Values larger than half the rectangle’s width or height are clamped appropriately to half the width or height. | |
convenience init(unclampedRoundedRect rect: CGRect, cornerRadius: CGFloat) { |