Skip to content

Commit

Permalink
iOS sdk updated, added dis api callback for all types
Browse files Browse the repository at this point in the history
  • Loading branch information
Erkki Silvola committed Apr 15, 2019
1 parent 519889e commit a265ca0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ class ViewController: UIViewController, UITableViewDelegate, UITableViewDataSour
PolarBleApiObserver,
PolarBleApiPowerStateObserver,
PolarBleApiDeviceInfoObserver,
PolarBleApiDeviceFeaturesObserver {
PolarBleApiDeviceFeaturesObserver {


var api: PolarBleApi!
var deviceId: String?
Expand Down Expand Up @@ -148,8 +149,7 @@ PolarBleApiDeviceFeaturesObserver {
NSLog("Battery level \(identifier): \(batteryLevel) ")
}

func fwVersionReceived(_ identifier: String, fwVersion: String) {
NSLog("Firmware version \(identifier): \(fwVersion) ")
func disInformationReceived(_ identifier: String, uuid: CBUUID, value: String) {
NSLog("DIS info \(identifier): \(uuid.uuidString) : \(value)")
}
}

6 changes: 4 additions & 2 deletions examples/example-ios/polarBleSdkTestApp/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import UIKit
import PolarBleSdk
import RxSwift
import CoreBluetooth

class ViewController: UIViewController,
PolarBleApiObserver,
Expand All @@ -10,6 +11,7 @@ class ViewController: UIViewController,
PolarBleApiDeviceInfoObserver,
PolarBleApiDeviceFeaturesObserver,
PolarBleApiLogger {

// NOTICE this example utilizes all available features
var api = PolarBleApiDefaultImpl.polarImplementation(DispatchQueue.main, features: Features.allFeatures.rawValue)
var broadcast: Disposable?
Expand Down Expand Up @@ -281,8 +283,8 @@ class ViewController: UIViewController,
NSLog("battery level updated: \(batteryLevel)")
}

func fwVersionReceived(_ identifier: String, fwVersion: String) {
NSLog("fw version updated: \(fwVersion)")
func disInformationReceived(_ identifier: String, uuid: CBUUID, value: String) {
NSLog("dis info: \(uuid.uuidString) value: \(value)")
}

// PolarBleApiDeviceHrObserver
Expand Down

0 comments on commit a265ca0

Please sign in to comment.