From cb75fd2a2f258a1a4e9f307840842f582838250b Mon Sep 17 00:00:00 2001 From: Tim Redfern Date: Wed, 18 Sep 2013 18:00:46 +0100 Subject: populating implementation --- .DS_Store | Bin 6148 -> 6148 bytes Waydio.m | 21 ++++++++++++++++++--- sampleclient/ConnectionController.m | 4 ++-- .../tim.xcuserdatad/UserInterfaceState.xcuserstate | Bin 40719 -> 41393 bytes 4 files changed, 20 insertions(+), 5 deletions(-) diff --git a/.DS_Store b/.DS_Store index 3d14e70..cd8be86 100755 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/Waydio.m b/Waydio.m index 6cb736c..161aaee 100644 --- a/Waydio.m +++ b/Waydio.m @@ -42,16 +42,31 @@ Opens a Waydio connection. (Prepares peipheral for using the Waydio service, characteristics, and notifications) */ - (void)open { + [self.brspObject open]; //[[self delegate] OpenStatusChanged:YES]; - //[NSTimer scheduledTimerWithTimeInterval:5.0 target:self - // selector:@selector(processComplete) userInfo:nil repeats:YES]; + [NSTimer scheduledTimerWithTimeInterval:0.1 target:self + selector:@selector(checkWeight) userInfo:nil repeats:YES]; + [NSTimer scheduledTimerWithTimeInterval:1.0 target:self + selector:@selector(checkBattery) userInfo:nil repeats:YES]; + [NSTimer scheduledTimerWithTimeInterval:0.1 target:self + selector:@selector(checkButton) userInfo:nil repeats:YES]; }; +- (void)checkWeight { + +} +- (void)checkBattery { + +} +- (void)checkButton { + +} + /** Closes a Waydio connection. (Turns off notifications, etc) */ - (void)close { - + [self.brspObject close]; } @end \ No newline at end of file diff --git a/sampleclient/ConnectionController.m b/sampleclient/ConnectionController.m index 170b0a0..b56f898 100755 --- a/sampleclient/ConnectionController.m +++ b/sampleclient/ConnectionController.m @@ -50,11 +50,11 @@ - (void)centralManager:(CBCentralManager *)central didConnectPeripheral:(CBPeripheral *)peripheral { //call the open function to prepare the brsp service - //[self.brspObject open]; + [self.waydioObject open]; } - (void)centralManager:(CBCentralManager *)central didDisconnectPeripheral:(CBPeripheral *)peripheral error:(NSError *)error { - //[self.brspObject close]; + [self.waydioObject close]; [self.navigationController popViewControllerAnimated:YES]; } diff --git a/waydio_comms_demo.xcodeproj/project.xcworkspace/xcuserdata/tim.xcuserdatad/UserInterfaceState.xcuserstate b/waydio_comms_demo.xcodeproj/project.xcworkspace/xcuserdata/tim.xcuserdatad/UserInterfaceState.xcuserstate index f46f38f..cde4f07 100644 Binary files a/waydio_comms_demo.xcodeproj/project.xcworkspace/xcuserdata/tim.xcuserdatad/UserInterfaceState.xcuserstate and b/waydio_comms_demo.xcodeproj/project.xcworkspace/xcuserdata/tim.xcuserdatad/UserInterfaceState.xcuserstate differ -- cgit v1.2.3