RobotKit API
RobotKit/RKRobotControl.h
Go to the documentation of this file.
00001 //
00002 //  RKRobotControl.h
00003 //  RobotKit
00004 //
00005 //  Copyright 2010 Orbotix Inc. All rights reserved.
00006 //
00007 
00008 #import <Foundation/Foundation.h>
00009 #import <ExternalAccessory/ExternalAccessory.h>
00010 #import <CoreMotion/CoreMotion.h>
00011 #import <RobotKit/RKDeviceConnection.h>
00012 #import <RobotKit/RKRobotControlProtocol.h>
00013 
00016 @class RKRobot;
00017 @class RKDeviceConnection;
00018 @class RKDriveAlgorithm;
00019 
00020 
00028 @interface RKRobotControl : NSObject 
00029     <RKRobotControlProtocol, EAAccessoryDelegate, NSStreamDelegate>
00030 {    
00031     @private
00032     RKDeviceConnection        *deviceConnection;
00033     RKDriveAlgorithm          *driveAlgorithm;
00034         
00035     BOOL            inDeadZone;
00036         float           deadZoneSize;
00037     
00038     BOOL            calibrating;
00039  
00040     float           boostTimeScale;
00041     float           controlledBoostVelocity;
00042     BOOL            uncontrolledBoost;
00043     BOOL            controlledBoost;
00044     
00045     
00046 }
00047 
00049 @property (nonatomic, readonly) RKRobot         *robot;
00050 
00052 @property (nonatomic, readonly) RKDeviceConnection *deviceConnection;
00053 
00058 @property (nonatomic, retain) RKDriveAlgorithm  *driveAlgorithm;
00059 
00061 @property (nonatomic, assign) float             deadZoneSize;
00062 
00067 @property (nonatomic, assign)   double          stopOffset;
00068 
00073 @property (nonatomic, assign) float boostTimeScale;
00074 
00076 @property (nonatomic, assign) float controlledBoostVelocity;
00077 
00078 
00083 @property (nonatomic, readonly) BOOL calibrating;
00084 
00090 - (id)initWithRobot:(RKRobot *)aRobot;
00091 
00096 - (void)openConnection;
00097 
00101 - (void)closeConnection;
00102 
00106 - (void)stopMoving;
00107 
00116 - (void)driveWithCoord1:(double)coord1 coord2:(double)coord2 coord3:(double)coord3;
00117 
00122 - (void)startCalibration;
00123 
00129 - (void)stopCalibrated:(BOOL)calibrate;
00130 
00136 - (void)rotateToHeading:(float)angle;
00137 
00144 - (void)rollAtHeading:(float)angle velocity:(float)velocity;
00145 
00151 - (void)startControlledBoost;
00152 
00158 - (void)cancelControlledBoost;
00159 
00163 - (void)resetDeadZoneSize;
00164 
00168 - (void)jump;
00169 
00170 @end
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties