Wahoo Fitness API  3.6.1
Documentation for the iPhone version of the Wahoo Fitness API.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Pages
WFBikeTrainerSpindownCalibrator.h
Go to the documentation of this file.
1 //
2 // WFBikeTrainerSpindownCalibrator.h
3 // WFConnector
4 //
5 // Created by Mark Snaterse on 01/08/15.
6 // Copyright (c) 2015 Wahoo Fitness. All rights reserved.
7 //
8 
9 #import <Foundation/Foundation.h>
10 #import <WFConnector/WFBikePowerConnection.h>
11 #import <WFConnector/WFBikeTrainerSpindownCalibratorResult.h>
12 
14 
15 
16 typedef NS_ENUM(NSInteger, WFBikeTrainerSpindownCalibratorState_t)
17 {
18  WF_BIKE_TRAINER_SPINDOWN_CALIBRATOR_STATE_IDLE,
19  WF_BIKE_TRAINER_SPINDOWN_CALIBRATOR_STATE_WARMING_UP,
20  WF_BIKE_TRAINER_SPINDOWN_CALIBRATOR_STATE_WAITING_FOR_TARGET_SPEED,
21  WF_BIKE_TRAINER_SPINDOWN_CALIBRATOR_STATE_SPINDOWN_IN_PROGRESS,
22  WF_BIKE_TRAINER_SPINDOWN_CALIBRATOR_STATE_UPLOADING,
23  WF_BIKE_TRAINER_SPINDOWN_CALIBRATOR_STATE_COMPLETED,
24  WF_BIKE_TRAINER_SPINDOWN_CALIBRATOR_STATE_FAILED,
25 };
26 
27 
28 typedef NS_ENUM(NSInteger, WFBikeTrainerSpindownCalibratorWorkingStatus_t)
29 {
30  WF_BIKE_TRAINER_SPINDOWN_CALIBRATOR_WORKING_STATUS_NOT_AVAILABLE,
31  WF_BIKE_TRAINER_SPINDOWN_CALIBRATOR_WORKING_STATUS_WAITING_FOR_DEVICE,
32  WF_BIKE_TRAINER_SPINDOWN_CALIBRATOR_WORKING_STATUS_DEVICE_INTERRUPTION,
33  WF_BIKE_TRAINER_SPINDOWN_CALIBRATOR_WORKING_STATUS_IN_PROGRESS,
34  WF_BIKE_TRAINER_SPINDOWN_CALIBRATOR_WORKING_STATUS_PROCESSING,
35 };
36 
37 
38 
42 extern NSString* const WFBikeTrainerSpindownCalibratorErrorDomain;
43 
44 typedef NS_ENUM(NSUInteger, WBikeTrainerSpindownCalibratorError)
45 {
46  WFBikeTrainerCalibratorErrorNone = 0,
47  WFBikeTrainerCalibratorErrorUnknown,
48  WFBikeTrainerCalibratorErrorOperationNotPermitted,
49  WFBikeTrainerCalibratorErrorInvalidParameter,
50  WFBikeTrainerCalibratorErrorDeviceTimeout,
51  WFBikeTrainerCalibratorDeviceError,
52  WFBikeTrainerCalibratorDeviceErrorOpcodeNotSupported,
53  WFBikeTrainerCalibratorErrorDataSourceError,
54  WFBikeTrainerCalibratorErrorCalibrationTimeout,
55  WFBikeTrainerCalibratorErrorUserError,
56  WFBikeTrainerCalibratorErrorUnableToResolveCalibration,
57 };
58 
59 
60 
61 
62 @interface WFBikeTrainerSpindownCalibrator : NSObject
63 
67 @property (nonatomic, readonly) WFBikePowerConnection *bikePowerConnection;
68 
69 
70 
74 @property (nonatomic, readonly) WFBikeTrainerSpindownCalibratorState_t state;
75 
76 
80 @property (nonatomic, readonly) WFBikeTrainerSpindownCalibratorWorkingStatus_t workingStatus;
81 
82 
83 
88 
89 
93 @property (nonatomic, assign) id <WFBikeTrainerSpindownCalibratorDelegate> delegate;
94 
95 
99 @property (nonatomic, readonly) double spindownThresholdSpeed;
100 
101 
105 - (instancetype)initWithBikePowerConnection:(WFBikePowerConnection *)bikePowerConnection;
106 
107 
118 
119 
131 
132 
137 
138 
143 - (void)abortSpindown;
144 
145 
146 @end
BOOL startSystemDragSpindown()
Initiates the trainer for a system drag spindown test.
double spindownThresholdSpeed
The speed required to trigger a spindown, in meters per second.
Definition: WFBikeTrainerSpindownCalibrator.h:99
Definition: WFBikeTrainerSpindownCalibrator.h:62
Represents a connection to an ANT+ Bike Power sensor.
Definition: WFBikePowerConnection.h:22
WFBikeTrainerSpindownCalibratorState_t state
The current state of this calibrator instance.
Definition: WFBikeTrainerSpindownCalibrator.h:74
NSString *const WFBikeTrainerSpindownCalibratorErrorDomain
Error domain for WFBikeTrainerSpindownCalibrator errors.
WFBikePowerConnection * bikePowerConnection
The Bike Power Connection which is being used to perform the calibration.
Definition: WFBikeTrainerSpindownCalibrator.h:67
Definition: WFBikeTrainerSpindownCalibratorDelegate.h:13
WFBikeTrainerSpindownCalibratorWorkingStatus_t workingStatus
The current working status of this calibrator instance.
Definition: WFBikeTrainerSpindownCalibrator.h:80
BOOL startBrakeStrengthSpindown()
Initiates the trainer for a brake strength spindown test.
signed char BOOL
Definition: types.h:110
id< WFBikeTrainerSpindownCalibratorDelegate > delegate
The delegate which will receive event/progress update callbacks.
Definition: WFBikeTrainerSpindownCalibrator.h:93
typedef NS_ENUM(NSInteger, WFBikeTrainerSpindownCalibratorState_t)
Definition: WFBikeTrainerSpindownCalibrator.h:16
Definition: WFBikeTrainerSpindownCalibratorResult.h:12
void abortSpindown()
Abort the spindown process.
WFBikeTrainerSpindownCalibratorResult * calibrationResult
The result of the calibration.
Definition: WFBikeTrainerSpindownCalibrator.h:87
BOOL resetBrakeStrengthSpindownToDefault()
Resets the brake strength value to the default value.