Skip to content

Commit

Permalink
Release 2.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
hdrsl committed Jan 17, 2023
1 parent 268987e commit 201a674
Show file tree
Hide file tree
Showing 401 changed files with 5,013 additions and 6,877 deletions.
Expand Up @@ -204,34 +204,5 @@ class SILGattConfiguratorHomeViewModelTest : QuickSpec {
}
}

describe("openMenu(sourceView:)") {
func testShowingMenu() {
let sourceView = UIView()
self.wireframe.sourceView = sourceView
self.testObj.openMenu(sourceView: sourceView)
expect(self.wireframe.menuPresented).to(equal(true))
}

it("show menu option and then invoke option at 0") {
testShowingMenu()
self.wireframe.invokeMenuOption0()

expect(self.repository.configutationCount).to(equal(1))
}

it("show menu option and then invoke option at 1") {
testShowingMenu()
self.wireframe.invokeMenuOption1()

// TODO
}

it("show menu option and then invoke option at 2") {
testShowingMenu()
self.wireframe.invokeMenuOption2()

// TODO
}
}
}
}
Expand Up @@ -89,31 +89,31 @@ class SILIOPTestScenarioCellViewModelTest: QuickSpec {
it("all tests are in uknown state - should return unknown status of entire test scenario") {
self.testObject = SILIOPTestScenarioCellViewModel(name: self.testName,
description: self.testDescription,
testCaseStatuses: [.uknown(reason: nil), .uknown(reason: nil), .uknown(reason: nil)])
testCaseStatuses: [.unknown(reason: nil), .unknown(reason: nil), .unknown(reason: nil)])

expect(self.testObject.status == .uknown(reason: nil)).to(beTrue())
expect(self.testObject.status == .unknown(reason: nil)).to(beTrue())
}

it("one of test unknown but testing in progress - should return in progress status of entire test scenario") {
self.testObject = SILIOPTestScenarioCellViewModel(name: self.testName,
description: self.testDescription,
testCaseStatuses: [.uknown(reason: nil), .waiting, .waiting])
testCaseStatuses: [.unknown(reason: nil), .waiting, .waiting])

expect(self.testObject.status == .inProgress).to(beTrue())
}

it("one of test unknown, rest of tests passed - should return passed status of entire test scenario") {
self.testObject = SILIOPTestScenarioCellViewModel(name: self.testName,
description: self.testDescription,
testCaseStatuses: [.uknown(reason: nil), .passed(details: nil), .passed(details: nil)])
testCaseStatuses: [.unknown(reason: nil), .passed(details: nil), .passed(details: nil)])

expect(self.testObject.status == .passed(details: nil)).to(beTrue())
}

it("one of test unknown, one passed, one failed - should return failed status of entire test scenario") {
self.testObject = SILIOPTestScenarioCellViewModel(name: self.testName,
description: self.testDescription,
testCaseStatuses: [.uknown(reason: nil), .failed(reason: nil), .passed(details: nil)])
testCaseStatuses: [.unknown(reason: nil), .failed(reason: nil), .passed(details: nil)])

expect(self.testObject.status == .failed(reason: nil)).to(beTrue())
}
Expand Down
1 change: 1 addition & 0 deletions SiliconLabsApp-Bridging-Header.h
Expand Up @@ -79,3 +79,4 @@
#import "SILConnectedLightingViewController.h"
#import "SILAppSelectionHelpViewController.h"
#import "SILDeviceSelectionCollectionViewCell.h"
#import "SILAppearance.h"
229 changes: 135 additions & 94 deletions SiliconLabsApp.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Expand Up @@ -27,7 +27,6 @@
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
codeCoverageEnabled = "YES"
onlyGenerateCoverageForSpecifiedTargets = "YES">
<MacroExpansion>
<BuildableReference
Expand Down
18 changes: 8 additions & 10 deletions SiliconLabsApp/Base.lproj/Debug/Devices/SILDebugHeaderView.xib
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="8191" systemVersion="15B42" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21225" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<device id="retina6_0" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8154"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21207"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
Expand All @@ -13,26 +15,22 @@
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="sid-ua-Yv9" userLabel="background">
<rect key="frame" x="0.0" y="0.0" width="320" height="60"/>
<animations/>
<color key="backgroundColor" red="0.94509804248809814" green="0.93725490570068359" blue="0.93725490570068359" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="backgroundColor" red="0.93097913265228271" green="0.92130255699157715" blue="0.92151439189910889" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Fmv-x8-rWp">
<rect key="frame" x="16" y="17" width="42" height="34"/>
<animations/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" red="0.40392156862745099" green="0.396078431372549" blue="0.396078431372549" alpha="1" colorSpace="calibratedRGB"/>
<color key="textColor" red="0.40392156862745099" green="0.396078431372549" blue="0.396078431372549" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="l9D-Mt-6sd" userLabel="Divider">
<rect key="frame" x="0.0" y="59" width="320" height="1"/>
<animations/>
<color key="backgroundColor" red="0.81568627450980391" green="0.81568627450980391" blue="0.81568627450980391" alpha="1" colorSpace="calibratedRGB"/>
<color key="backgroundColor" red="0.81568627450980391" green="0.81568627450980391" blue="0.81568627450980391" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="pXc-O9-LVx"/>
</constraints>
</view>
</subviews>
<animations/>
<constraints>
<constraint firstItem="sid-ua-Yv9" firstAttribute="width" secondItem="pmO-Zp-nMY" secondAttribute="width" id="6w0-yp-4Tm"/>
<constraint firstItem="sid-ua-Yv9" firstAttribute="centerX" secondItem="pmO-Zp-nMY" secondAttribute="centerX" id="83p-w4-DhN"/>
Expand Down
53 changes: 53 additions & 0 deletions SiliconLabsApp/Base.lproj/Launch Screen.storyboard
@@ -0,0 +1,53 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="21225" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<device id="retina6_0" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21207"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="EHf-IW-A2E">
<objects>
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="fJO-Jy-mQj">
<rect key="frame" x="0.0" y="0.0" width="390" height="844"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="WakeScreenBackground" translatesAutoresizingMaskIntoConstraints="NO" id="45r-zP-jXg">
<rect key="frame" x="0.0" y="0.0" width="390" height="844"/>
</imageView>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="SilabsLogo" translatesAutoresizingMaskIntoConstraints="NO" id="0aM-dZ-uLi">
<rect key="frame" x="101" y="63" width="188" height="22"/>
</imageView>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="SilabsEFRLogo" translatesAutoresizingMaskIntoConstraints="NO" id="Dms-fT-Inz">
<rect key="frame" x="73" y="346" width="244" height="152"/>
</imageView>
</subviews>
<viewLayoutGuide key="safeArea" id="deX-k7-7vT"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="0aM-dZ-uLi" firstAttribute="top" secondItem="deX-k7-7vT" secondAttribute="top" constant="16" id="91W-nu-3oh"/>
<constraint firstItem="Dms-fT-Inz" firstAttribute="centerY" secondItem="45r-zP-jXg" secondAttribute="centerY" id="KzH-3Y-5aR"/>
<constraint firstAttribute="bottom" secondItem="45r-zP-jXg" secondAttribute="bottom" id="QY8-t3-qE1"/>
<constraint firstAttribute="trailing" secondItem="45r-zP-jXg" secondAttribute="trailing" id="SYb-0T-QPO"/>
<constraint firstItem="45r-zP-jXg" firstAttribute="centerX" secondItem="Dms-fT-Inz" secondAttribute="centerX" id="cwF-2K-h5c"/>
<constraint firstItem="45r-zP-jXg" firstAttribute="top" secondItem="fJO-Jy-mQj" secondAttribute="top" id="dJV-mu-hqg"/>
<constraint firstItem="0aM-dZ-uLi" firstAttribute="centerX" secondItem="45r-zP-jXg" secondAttribute="centerX" id="hJR-CF-x3d"/>
<constraint firstItem="45r-zP-jXg" firstAttribute="leading" secondItem="fJO-Jy-mQj" secondAttribute="leading" id="xDx-86-06c"/>
</constraints>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="53" y="375"/>
</scene>
</scenes>
<resources>
<image name="SilabsEFRLogo" width="244" height="152"/>
<image name="SilabsLogo" width="188" height="22"/>
<image name="WakeScreenBackground" width="360" height="825"/>
</resources>
</document>
33 changes: 0 additions & 33 deletions SiliconLabsApp/Base.lproj/LaunchScreen.xib

This file was deleted.

2 changes: 1 addition & 1 deletion SiliconLabsApp/BluetoothControllers/SILCentralManager.h
Expand Up @@ -43,6 +43,6 @@ extern NSString * _Nonnull const SILCentralManagerErrorKey;
- (void)addScanForPeripheralsObserver:(nonnull id)observer selector:(nonnull SEL)aSelector;
- (void)removeScanForPeripheralsObserver:(nonnull id)observer;

- (void)disconnectFromPeripheral:(CBPeripheral *)peripheral;
- (void)disconnectFromPeripheral:(nonnull CBPeripheral *)peripheral;

@end
2 changes: 1 addition & 1 deletion SiliconLabsApp/BluetoothControllers/SILConstants.m
Expand Up @@ -30,7 +30,7 @@
NSString * const SILCharacteristicNumberDMPSourceAddress = @"82A1CB54-3921-4C9C-BA34-34F78BAB9A1B";

NSString * const SILDiscoveredPeripheralConnectableDevice = @"Connectable";
NSString * const SILDiscoveredPeripheralNonConnectableDevice = @"Non-connectable";
NSString * const SILDiscoveredPeripheralNonConnectableDevice = @"N-connectable";

NSInteger const SILConstantsStrongSignalThreshold = -50;
NSInteger const SILConstantsMediumSignalThreshold = -80;
Expand Down
2 changes: 2 additions & 0 deletions SiliconLabsApp/Categories/SILBluetoothBrowser+Constants.h
Expand Up @@ -19,6 +19,7 @@ extern NSString* const CommaAndSpaceText;
extern NSString * const QuoteText;
extern NSString * const RSSITitle;
extern NSString * const AppendingDBM;
extern NSString * const AppendingMS;
extern NSString * const BeaconTypeTitle;
extern NSString * const SearchByDeviceNameTitle;
extern NSString * const SearchByPacketContent;
Expand All @@ -33,3 +34,4 @@ extern CGFloat CornerRadiusForButtons;
extern CGFloat CornerRadiusStandardValue;
extern NSString * const CannotWriteEmptyTextToCharacteristic;
extern NSString * const FillAllMandatoryFields;
extern CGFloat LastFooterHeight;
4 changes: 3 additions & 1 deletion SiliconLabsApp/Categories/SILBluetoothBrowser+Constants.m
Expand Up @@ -20,6 +20,7 @@
NSString * const QuoteText = @"\"";
NSString * const RSSITitle = @"RSSI > ";
NSString * const AppendingDBM = @" dBm";
NSString * const AppendingMS = @" ms";
NSString * const BeaconTypeTitle = @" + Beacon type ";
NSString * const SearchByDeviceNameTitle = @" + Name ";
NSString * const SearchByPacketContent = @" + Packet content ";
Expand All @@ -31,6 +32,7 @@
int const BackspaceASCIIValue = -8;
NSString * const DefaultDeviceName = @"N/A";
CGFloat CornerRadiusForButtons = 4.0;
CGFloat CornerRadiusStandardValue = 16.0;
CGFloat CornerRadiusStandardValue = 8.0;
NSString * const CannotWriteEmptyTextToCharacteristic = @"You cannot send an empty value to characteristic";
NSString * const FillAllMandatoryFields = @"Please fill all mandatory fields";
CGFloat LastFooterHeight = 120.0;
6 changes: 3 additions & 3 deletions SiliconLabsApp/Categories/UIFont+Extensions.swift
Expand Up @@ -34,14 +34,14 @@ extension UIFont {
}

@objc class func getLargeFontSize() -> CGFloat {
return UI_USER_INTERFACE_IDIOM() == .phone ? CGFloat(SILLargeFontSizeIphones) : CGFloat(SILLargeFontSizeIpads)
return UIDevice.current.userInterfaceIdiom == .phone ? CGFloat(SILLargeFontSizeIphones) : CGFloat(SILLargeFontSizeIpads)
}

@objc class func getMiddleFontSize() -> CGFloat {
return UI_USER_INTERFACE_IDIOM() == .phone ? CGFloat(SILMediumFontSizeIphones) : CGFloat(SILMediumFontSizeIpads)
return UIDevice.current.userInterfaceIdiom == .phone ? CGFloat(SILMediumFontSizeIphones) : CGFloat(SILMediumFontSizeIpads)
}

@objc class func getSmallFontSize() -> CGFloat {
return UI_USER_INTERFACE_IDIOM() == .phone ? CGFloat(SILSmallFontSizeIphones) : CGFloat(SILSmallFontSizeIpads)
return UIDevice.current.userInterfaceIdiom == .phone ? CGFloat(SILSmallFontSizeIphones) : CGFloat(SILSmallFontSizeIpads)
}
}

0 comments on commit 201a674

Please sign in to comment.