Latest 0.3.2
Homepage https://github.com/kinetic-fit/sensors-swift-wahoo
License MIT
Platforms ios 8.2, osx 10.11
Dependencies SwiftySensors
Authors

Wahoo Extension for Swifty Sensors

iOS
macOS
Swift 3.0
License
CocoaPods

This Swifty Sensor extension adds a Wahoo Trainer Characteristic to the Cycling Power Service for controlling Wahoo Trainers (KICKR and KICKR SNAP).

Installation

CocoaPods

use_frameworks!
pod 'SwiftySensorsWahoo'

Manual

Coming Soon

Carthage

Coming Soon

Swift Package Manager

Coming Soon

Usage

When setting up your SensorManager, simply activate the Wahoo Trainer Characteristic.

import SwiftySensors
import SwiftySensorsWahoo

// Customize what services you want to scan for
SensorManager.instance.setServicesToScanFor([
    CyclingPowerService.self
])

CyclingPowerService.WahooTrainer.activate()

If a CyclingPowerService has a Wahoo Trainer Characteristic, you can get (check for) a reference to it:

guard let wahooTrainer: CyclingPowerService.WahooTrainer = cyclingPowerService.characteristic() { else return }

The Wahoo Trainer Characteristic provides methods to control the Trainer:

let targetWatts: UInt16 = 150
wahooTrainer.setResistanceErg(targetWatts)

let trainerLevel: UInt8 = 3
wahooTrainer.setResistanceLevel(trainerLevel)

Known bugs

There is an occassional crash when disconnecting from a Wahoo Trainer.

ToDos

Further reverse engineering of the Wahoo spec.

Latest podspec

{
    "name": "SwiftySensorsWahoo",
    "version": "0.3.2",
    "summary": "Wahoo Extensions for SwiftySensors",
    "homepage": "https://github.com/kinetic-fit/sensors-swift-wahoo",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Kinetic": "[email protected]"
    },
    "platforms": {
        "ios": "8.2",
        "osx": "10.11"
    },
    "source": {
        "git": "https://github.com/kinetic-fit/sensors-swift-wahoo.git",
        "tag": "0.3.2"
    },
    "source_files": "Sources/**/*.swift",
    "dependencies": {
        "SwiftySensors": [
            "~>0.3"
        ]
    },
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This