Skip to content

Commit

Permalink
Merge pull request #264 from ps2/dev
Browse files Browse the repository at this point in the history
Version 0.12.4
  • Loading branch information
loudnate authored Oct 1, 2016
2 parents 97c602d + a2ee9dc commit 38d0263
Show file tree
Hide file tree
Showing 18 changed files with 95 additions and 36 deletions.
2 changes: 1 addition & 1 deletion Crypto/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>0.12.3</string>
<string>0.12.4</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSPrincipalClass</key>
Expand Down
2 changes: 1 addition & 1 deletion MinimedKit/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>0.12.3</string>
<string>0.12.4</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down
1 change: 1 addition & 0 deletions MinimedKit/PumpEventType.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ public enum PumpEventType: UInt8 {
case selectBasalProfile = 0x14
case tempBasalDuration = 0x16
case changeTime = 0x17
case newTime = 0x18
case journalEntryPumpLowBattery = 0x19
case battery = 0x1a
case setAutoOff = 0x1b
Expand Down
2 changes: 1 addition & 1 deletion MinimedKitTests/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>0.12.3</string>
<string>0.12.4</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,14 @@ class ReadTempBasalCarelinkMessageBodyTests: XCTestCase {
XCTAssertEqual(0, body.rate)
XCTAssertEqual(ReadTempBasalCarelinkMessageBody.RateType.absolute, body.rateType)
}

func testReadHighTempBasalRate() {
let message = PumpMessage(rxData: Data(hexadecimalString: "a7754838980600000550001e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000012")!)!

let body = message.messageBody as! ReadTempBasalCarelinkMessageBody

XCTAssertEqual(TimeInterval(30 * 60), body.timeRemaining)
XCTAssertEqual(34, body.rate)
XCTAssertEqual(ReadTempBasalCarelinkMessageBody.RateType.absolute, body.rateType)
}
}
2 changes: 1 addition & 1 deletion NightscoutUploadKit/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>0.12.3</string>
<string>0.12.4</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down
2 changes: 1 addition & 1 deletion NightscoutUploadKitTests/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>0.12.3</string>
<string>0.12.4</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down
44 changes: 22 additions & 22 deletions RileyLink.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -2132,11 +2132,11 @@
CLANG_WARN_UNREACHABLE_CODE = YES;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
CURRENT_PROJECT_VERSION = 20;
CURRENT_PROJECT_VERSION = 21;
DEBUG_INFORMATION_FORMAT = dwarf;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 20;
DYLIB_CURRENT_VERSION = 21;
DYLIB_INSTALL_NAME_BASE = "@rpath";
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_NO_COMMON_BLOCKS = YES;
Expand All @@ -2160,11 +2160,11 @@
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 20;
CURRENT_PROJECT_VERSION = 21;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 20;
DYLIB_CURRENT_VERSION = 21;
DYLIB_INSTALL_NAME_BASE = "@rpath";
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_NO_COMMON_BLOCKS = YES;
Expand Down Expand Up @@ -2223,11 +2223,11 @@
CLANG_WARN_UNREACHABLE_CODE = YES;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
CURRENT_PROJECT_VERSION = 20;
CURRENT_PROJECT_VERSION = 21;
DEBUG_INFORMATION_FORMAT = dwarf;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 20;
DYLIB_CURRENT_VERSION = 21;
DYLIB_INSTALL_NAME_BASE = "@rpath";
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_NO_COMMON_BLOCKS = YES;
Expand All @@ -2254,11 +2254,11 @@
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 20;
CURRENT_PROJECT_VERSION = 21;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 20;
DYLIB_CURRENT_VERSION = 21;
DYLIB_INSTALL_NAME_BASE = "@rpath";
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_NO_COMMON_BLOCKS = YES;
Expand Down Expand Up @@ -2321,12 +2321,12 @@
CLANG_WARN_SUSPICIOUS_MOVES = YES;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CURRENT_PROJECT_VERSION = 20;
CURRENT_PROJECT_VERSION = 21;
DEBUG_INFORMATION_FORMAT = dwarf;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = "";
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 20;
DYLIB_CURRENT_VERSION = 21;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = Crypto/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
Expand All @@ -2349,12 +2349,12 @@
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 20;
CURRENT_PROJECT_VERSION = 21;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = "";
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 20;
DYLIB_CURRENT_VERSION = 21;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = Crypto/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
Expand All @@ -2375,11 +2375,11 @@
CLANG_WARN_UNREACHABLE_CODE = YES;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
CURRENT_PROJECT_VERSION = 20;
CURRENT_PROJECT_VERSION = 21;
DEBUG_INFORMATION_FORMAT = dwarf;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 20;
DYLIB_CURRENT_VERSION = 21;
DYLIB_INSTALL_NAME_BASE = "@rpath";
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_NO_COMMON_BLOCKS = YES;
Expand All @@ -2405,11 +2405,11 @@
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 20;
CURRENT_PROJECT_VERSION = 21;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 20;
DYLIB_CURRENT_VERSION = 21;
DYLIB_INSTALL_NAME_BASE = "@rpath";
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_NO_COMMON_BLOCKS = YES;
Expand Down Expand Up @@ -2484,7 +2484,7 @@
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 20;
CURRENT_PROJECT_VERSION = 21;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
Expand Down Expand Up @@ -2531,7 +2531,7 @@
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = YES;
CURRENT_PROJECT_VERSION = 20;
CURRENT_PROJECT_VERSION = 21;
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
Expand Down Expand Up @@ -2635,11 +2635,11 @@
CLANG_WARN_UNREACHABLE_CODE = YES;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
CURRENT_PROJECT_VERSION = 20;
CURRENT_PROJECT_VERSION = 21;
DEBUG_INFORMATION_FORMAT = dwarf;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 20;
DYLIB_CURRENT_VERSION = 21;
DYLIB_INSTALL_NAME_BASE = "@rpath";
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_NO_COMMON_BLOCKS = YES;
Expand All @@ -2665,11 +2665,11 @@
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 20;
CURRENT_PROJECT_VERSION = 21;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 20;
DYLIB_CURRENT_VERSION = 21;
DYLIB_INSTALL_NAME_BASE = "@rpath";
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_NO_COMMON_BLOCKS = YES;
Expand Down
2 changes: 1 addition & 1 deletion RileyLink/RileyLink-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>0.12.3</string>
<string>0.12.4</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down
2 changes: 1 addition & 1 deletion RileyLinkBLEKit/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>0.12.3</string>
<string>0.12.4</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down
2 changes: 1 addition & 1 deletion RileyLinkBLEKitTests/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>0.12.3</string>
<string>0.12.4</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down
2 changes: 1 addition & 1 deletion RileyLinkKit/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>0.12.3</string>
<string>0.12.4</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down
15 changes: 15 additions & 0 deletions RileyLinkKit/PumpState.swift
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,21 @@ public class PumpState {
}


extension PumpState: CustomDebugStringConvertible {
public var debugDescription: String {
return [
"## PumpState",
"timeZone: \(timeZone)",
"pumpRegion: \(pumpRegion)",
"pumpModel: \(pumpModel?.rawValue ?? "")",
"lastHistoryDump: \(lastHistoryDump ?? .distantPast)",
"awakeUntil: \(awakeUntil ?? .distantPast)",
"lastWakeAttempt: \(lastWakeAttempt)",
].joined(separator: "\n")
}
}


extension Notification.Name {
/// Posted when values of the properties of the PumpState object have changed.
/// The `userInfo` dictionary contains the following keys: `PropertyKey` and `ValueChangeOldKey`
Expand Down
16 changes: 16 additions & 0 deletions RileyLinkKit/RileyLinkDevice.swift
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,22 @@ public class RileyLinkDevice {
}


extension RileyLinkDevice: CustomDebugStringConvertible {
public var debugDescription: String {
return [
"## RileyLinkDevice",
"name: \(name ?? "")",
"RSSI: \(RSSI ?? 0)",
"lastIdle: \(lastIdle ?? .distantPast)",
"lastTuned: \(lastTuned ?? .distantPast)",
"radioFrequency: \(radioFrequency ?? 0)",
"firmwareVersion: \(firmwareVersion ?? "")",
"state: \(peripheral.state.description)"
].joined(separator: "\n")
}
}


extension Notification.Name {
public static let RileyLinkDeviceDidReceiveIdleMessage = NSNotification.Name(rawValue: "com.rileylink.RileyLinkKit.RileyLinkDeviceDidReceiveIdleMessageNotification")

Expand Down
17 changes: 17 additions & 0 deletions RileyLinkKit/RileyLinkDeviceManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,23 @@ public class RileyLinkDeviceManager {
}


extension RileyLinkDeviceManager: CustomDebugStringConvertible {
public var debugDescription: String {
var report = [
"## RileyLinkDeviceManager",
"timerTickEnabled: \(timerTickEnabled)",
"idleListeningEnabled: \(idleListeningEnabled)"
]

for device in devices {
report.append(device.debugDescription)
}

return report.joined(separator: "\n\n")
}
}


extension Notification.Name {
public static let DeviceManagerDidDiscoverDevice = Notification.Name(rawValue: "com.rileylink.RileyLinkKit.DidDiscoverDeviceNotification")

Expand Down
6 changes: 3 additions & 3 deletions RileyLinkKit/UI/CommandResponseViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@ class CommandResponseViewController: UIViewController, UIActivityItemSource {
// MARK: - UIActivityItemSource

func activityViewControllerPlaceholderItem(_ activityViewController: UIActivityViewController) -> Any {
return title ?? textView.text
return title ?? textView.text ?? ""
}

func activityViewController(_ activityViewController: UIActivityViewController, itemForActivityType activityType: UIActivityType) -> Any? {
return textView.attributedText
return textView.attributedText ?? ""
}

func activityViewController(_ activityViewController: UIActivityViewController, subjectForActivityType activityType: UIActivityType?) -> String {
return title ?? textView.text
return title ?? textView.text ?? ""
}
}
2 changes: 1 addition & 1 deletion RileyLinkKitTests/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>0.12.3</string>
<string>0.12.4</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down
2 changes: 1 addition & 1 deletion RileyLinkTests/RileyLinkTests-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>0.12.3</string>
<string>0.12.4</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down

0 comments on commit 38d0263

Please sign in to comment.