Skip to content

Commit

Permalink
Release 24Q2-Patch-1
Browse files Browse the repository at this point in the history
- BLE IOP test enhancements.
- Wi-Fi Dev kit sensor.
- Bug fixes.
  • Loading branch information
Mantosh Kumar committed Jul 24, 2024
1 parent 2eb29a1 commit 4ef5153
Show file tree
Hide file tree
Showing 105 changed files with 4,881 additions and 48 deletions.
1 change: 1 addition & 0 deletions Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ def shared_pods
pod 'RxSwift', '~> 6.2.0'
pod 'RxCocoa', '~> 6.2.0'
pod 'Introspect'
pod 'CocoaLumberjack/Swift'
end

def test_pods
Expand Down
8 changes: 7 additions & 1 deletion Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ PODS:
- Charts/Core (= 4.1.0)
- Charts/Core (4.1.0):
- SwiftAlgorithms (~> 1.0)
- CocoaLumberjack/Core (3.8.2)
- CocoaLumberjack/Swift (3.8.2):
- CocoaLumberjack/Core
- Crashlytics (3.12.0):
- Fabric (~> 1.9.0)
- Fabric (1.9.0)
Expand Down Expand Up @@ -41,6 +44,7 @@ DEPENDENCIES:
- AEXML
- ChameleonFramework (~> 2.1.0)
- Charts (~> 4.1.0)
- CocoaLumberjack/Swift
- Crashlytics (~> 3.12.0)
- Fabric
- Introspect
Expand All @@ -66,6 +70,7 @@ SPEC REPOS:
- AEXML
- ChameleonFramework
- Charts
- CocoaLumberjack
- Crashlytics
- Fabric
- Introspect
Expand All @@ -92,6 +97,7 @@ SPEC CHECKSUMS:
AEXML: 1e255ecc6597212f97a7454a69ebd3ede64ac1cf
ChameleonFramework: d21a3cc247abfe5e37609a283a8238b03575cf64
Charts: ce0768268078eee0336f122c3c4ca248e4e204c5
CocoaLumberjack: f8d89a516e7710fdb2e9b8f1560b16ec6040eef0
Crashlytics: a33af323773f73904037dc2e684cd2f0d29f4fe2
Fabric: 09ef2d9b99b104702bede1acaf469fb8f20a9146
Introspect: b62c4dd2063072327c21d618ef2bedc3c87bc366
Expand All @@ -113,6 +119,6 @@ SPEC CHECKSUMS:
UICircularProgressRing: 19927375b2b21b5fa5fd9582f15ccdef9659da16
XMLDictionary: fa07b6ff422b3a91d47a5de9bc82e3fc04fbd167

PODFILE CHECKSUM: 90b577a05167576a7f2ac952330395b6f30605e3
PODFILE CHECKSUM: 99c5e34410dda7fcf73bc0c4eccd032787e4da96

COCOAPODS: 1.12.1
164 changes: 160 additions & 4 deletions SiliconLabsApp.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

24 changes: 22 additions & 2 deletions SiliconLabsApp/BluetoothControllers/SILCentralManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#import "SILWeakNotificationPair.h"
#import "SILConstants.h"
#import "NSString+SILBrowserNotifications.h"
#import "BlueGecko-Swift.h"
#if ENABLE_HOMEKIT
#import <HomeKit/HomeKit.h>
#endif
Expand Down Expand Up @@ -58,7 +59,7 @@ @interface SILCentralManager ()

@property (nonatomic, strong) NSArray<CLBeaconRegion *> *regions;
@property (nonatomic, strong) CLLocationManager *locationManager;

@property (nonatomic, strong) IOPLog *logObj;
@end

@implementation SILCentralManager
Expand All @@ -73,6 +74,7 @@ - (instancetype)initWithServiceUUIDs:(NSArray *)serviceUUIDs {
[self setupNotifications];
[self setupBeaconMonitoring];
self.connectionsViewModel = [SILBrowserConnectionsViewModel sharedInstance];
_logObj = [[IOPLog alloc] init];
}
return self;
}
Expand Down Expand Up @@ -124,9 +126,14 @@ - (void)setupNotifications {
- (void)applicationWillTerminateNotification:(NSNotification *)notification {
if (self.connectedPeripheral) {
NSLog(@"Disconnected from connected peripheral");

[_logObj iopLogSwiftFunctionWithMessage:[NSString stringWithFormat:@"Disconnected from connected peripheral: %@", self.connectedPeripheral]];

[self disconnectFromPeripheral:self.connectedPeripheral];
} else if (self.connectingPeripheral) {
NSLog(@"Disconnect from connecting peripheral");

[_logObj iopLogSwiftFunctionWithMessage:[NSString stringWithFormat:@"Disconnect from connecting peripheral: %@", self.connectingPeripheral]];
[self disconnectFromPeripheral:self.connectingPeripheral];
}
}
Expand Down Expand Up @@ -383,6 +390,8 @@ - (double)getTimestampWithAdvertisementData:(NSDictionary *)advertisementData {

- (void)centralManager:(CBCentralManager *)central didConnectPeripheral:(CBPeripheral *)peripheral {
NSLog(@"didConnectPeripheral: %@", peripheral);
[_logObj iopLogSwiftFunctionWithMessage:[NSString stringWithFormat:@"didConnectPeripheral: %@", peripheral]];

[self removeUnfiredConnectionTimeoutTimer];
self.connectingPeripheral = nil;
self.connectedPeripheral = peripheral;
Expand All @@ -398,6 +407,11 @@ - (void)centralManager:(CBCentralManager *)central didConnectPeripheral:(CBPerip
- (void)centralManager:(CBCentralManager *)central didFailToConnectPeripheral:(CBPeripheral *)peripheral error:(NSError *)error {
NSLog(@"didFailToConnectPeripheral: %@", peripheral.name);
NSLog(@"error: %@", error);

[_logObj iopLogSwiftFunctionWithMessage:[NSString stringWithFormat:@"didDisconnectPeripheral: %@", peripheral]];
[_logObj iopLogSwiftFunctionWithMessage:[NSString stringWithFormat:@"didDisconnectPeripheral: %@", peripheral.name]];
[_logObj iopLogSwiftFunctionWithMessage:[NSString stringWithFormat:@"error: %@", error]];

[self removeUnfiredConnectionTimeoutTimer];
[self handleConnectionFailureWithError:error];
[self postRegisterLogNotification:[SILLogDataModel prepareLogDescription:@"didFailToConnectPeripheral: " andPeripheral:peripheral andError:error]];
Expand All @@ -408,14 +422,20 @@ - (void)centralManager:(CBCentralManager *)central didDisconnectPeripheral:(CBPe
NSLog(@"didDisconnectPeripheral: %@", peripheral.name);
NSLog(@"error: %@", error);

[_logObj iopLogSwiftFunctionWithMessage:[NSString stringWithFormat:@"didDisconnectPeripheral: %@", peripheral]];
[_logObj iopLogSwiftFunctionWithMessage:[NSString stringWithFormat:@"didDisconnectPeripheral: %@", peripheral.name]];
[_logObj iopLogSwiftFunctionWithMessage:[NSString stringWithFormat:@"error: %@", error]];

BOOL wasConnected = [self.connectionsViewModel isConnectedPeripheral:peripheral];
NSMutableDictionary *userInfo = [NSMutableDictionary dictionary];
userInfo[SILCentralManagerPeripheralKey] = peripheral;
userInfo[SILNotificationKeyUUID] = peripheral.identifier.UUIDString;
if (error) {
userInfo[SILCentralManagerErrorKey] = error;
}


[_logObj iopLogSwiftFunctionWithMessage:[NSString stringWithFormat:@"UserInfo: %@", userInfo]];

[[NSNotificationCenter defaultCenter] postNotificationName:SILCentralManagerDidDisconnectPeripheralNotification
object:self
userInfo:userInfo];
Expand Down
2 changes: 2 additions & 0 deletions SiliconLabsApp/Categories/UIImage+SILImages.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ extern NSString * const SILImageNameHomeWifiCommissioning;
extern NSString * const SILImageNameHomeESLDemo;
extern NSString * const SILImageNameHomeMatterDemo;
extern NSString * const SILImageNameHomeWifiOtaDemo;
//extern NSString * const SILImageNameHomeWifiSensor;
extern NSString * const SILImageNameHomeWiFiSensor;

extern NSString * const SILImageNameKeyboard;
extern NSString * const SILImageNameKeyboardCheckmark;
Expand Down
3 changes: 3 additions & 0 deletions SiliconLabsApp/Categories/UIImage+SILImages.m
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@
NSString * const SILImageNameHomeESLDemo = @"esl_icon";
NSString * const SILImageNameHomeMatterDemo = @"matter_icon";
NSString * const SILImageNameHomeWifiOtaDemo = @"wifi_ota_icon";
//NSString * const SILImageNameHomeWifiSensor = @"icon - wifi commissioning";
NSString * const SILImageNameHomeWiFiSensor = @"WiFi_sensore_icon";


NSString * const SILImageNameKeyboard = @"Keyboard";
NSString * const SILImageNameKeyboardCheckmark = @"KeyboardCheckmark";
Expand Down
3 changes: 2 additions & 1 deletion SiliconLabsApp/Models/SILApp.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ typedef NS_ENUM(NSInteger, SILAppType) {
SILAppTypeWifiCommissioning,
SILAppTypeESLDemo,
SILAppTypeMatterDemo,
SILAppTypeWifiOTA
SILAppTypeWifiOTA,
SILAppTypeWifiSensor
};

@interface SILApp : NSObject
Expand Down
12 changes: 10 additions & 2 deletions SiliconLabsApp/Models/SILApp.m
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ + (NSArray *)demoApps {
[self wifiCommissioningApp],
[self eslDemoApp],
[self matterDemoApp],
[self WifiOTADemoApp]
[self WifiOTADemoApp],
[self WifiSensorDemoApp]
];
}

Expand Down Expand Up @@ -117,11 +118,18 @@ + (SILApp *)matterDemoApp {

+ (SILApp *)WifiOTADemoApp {
return [[SILApp alloc] initWithAppType:SILAppTypeWifiOTA
title:@"Wi-fi OTA Demo"
title:@"Wi-Fi OTA Demo"
description:@"Control OTA Firmware update over Wi-Fi."
showcasedProfiles:@{}
imageName:SILImageNameHomeWifiOtaDemo];
}
+ (SILApp *)WifiSensorDemoApp {
return [[SILApp alloc] initWithAppType:SILAppTypeWifiSensor
title:@"Wi-Fi Sensors"
description:@"Read and display sensor data from the dev kit sensors."
showcasedProfiles:@{}
imageName:SILImageNameHomeWiFiSensor];
}

- (instancetype)initWithAppType:(SILAppType)appType
title:(NSString *)title
Expand Down
14 changes: 14 additions & 0 deletions SiliconLabsApp/SILAppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import SwiftUI
import Fabric
import Crashlytics
import CoreHaptics
import CocoaLumberjack

class SILAppDelegate : UIResponder, UIApplicationDelegate {
var window: UIWindow?
Expand All @@ -33,6 +34,19 @@ class SILAppDelegate : UIResponder, UIApplicationDelegate {
window = UIWindow(frame: UIScreen.main.bounds)
window?.rootViewController = UIHostingController(rootView: MainNavigationView())
window?.makeKeyAndVisible()

setupLogs()

return true
}
private func setupLogs() {
DDLog.add(DDOSLogger.sharedInstance)

let fileLogger: DDFileLogger = DDFileLogger() // File Logger
fileLogger.rollingFrequency = 60 * 60 * 24 // 24 hours
fileLogger.logFileManager.maximumNumberOfLogFiles = 30
fileLogger.maximumFileSize = 1024 * 1024 * 10 // 10 MiB
DDLog.add(fileLogger)
//SBMLogger.sharedInstance().delegate = self;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0x59",
"green" : "0xA3",
"red" : "0x14"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "Group 12923.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Group [email protected]",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Group [email protected]",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "Group 12922.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Group [email protected]",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Group [email protected]",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "wifi_icon.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "wifi_icon 1.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "wifi_icon 2.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"images" : [
{
"filename" : "graphic - light_demo - light - off.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "graphic - light_demo - light - [email protected]",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "graphic - light_demo - light - [email protected]",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"template-rendering-intent" : "template"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "lightbulb.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "lightbulb 1.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "lightbulb 2.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 4ef5153

Please sign in to comment.