source: orbit/iOS/Orbit/Orbit/controllers/AdvancedViewController.h @ f05ba79

Servo
Last change on this file since f05ba79 was f05ba79, checked in by Steve Castellotti <sc@…>, 7 years ago
  • Core Motion re-enabled for deployment
  • Property mode set to 100644
File size: 2.4 KB
Line 
1//
2//  AdvancedViewController.h
3//  orbit
4//
5//  Copyright (c) 2013 Puzzlebox Productions, LLC. All rights reserved.
6//  Originally created by Jonathon Horsman.
7//
8//  This code is released under the GNU Public License (GPL) version 2
9//  For more information please refer to http://www.gnu.org/copyleft/gpl.html
10//
11
12#import <UIKit/UIKit.h>
13
14#define __CORE_MOTION__
15
16#ifdef __CORE_MOTION__
17   #import <CoreMotion/CoreMotion.h>
18   Boolean CORE_MOTION = true;
19#else
20   Boolean CORE_MOTION = false;
21#endif
22
23double defaultControlThrottle = 0.8;
24double defaultControlYaw = 0.47; // 0.78 is the actual setting required, but .47 is the inverse (1.25 - 0.78)
25double defaultControlPitch = 0.31;
26
27double referenceTiltX = 0;
28double referenceTiltY = 0;
29double titleSensorMinimumThreshold = 0.01;
30
31@interface AdvancedViewController : UIViewController
32
33@property (nonatomic, retain) IBOutlet UIBarButtonItem *resetButton;
34
35@property (nonatomic, retain) IBOutlet UILabel *throttlePercent;
36@property (nonatomic, retain) IBOutlet UISlider *throttle;
37@property (nonatomic, retain) IBOutlet UILabel *yawPercent;
38@property (nonatomic, retain) IBOutlet UISlider *yaw;
39@property (nonatomic, retain) IBOutlet UILabel *pitchPercent;
40@property (nonatomic, retain) IBOutlet UISlider *pitch;
41
42@property (nonatomic, retain) IBOutlet UILabel *presets;
43@property (nonatomic, retain) IBOutlet UIButton *buttonHover;
44@property (nonatomic, retain) IBOutlet UIButton *buttonForward;
45@property (nonatomic, retain) IBOutlet UIButton *buttonLeft;
46@property (nonatomic, retain) IBOutlet UIButton *buttonRight;
47
48@property (nonatomic, retain) IBOutlet UILabel *tiltSensorControl;
49@property (nonatomic, retain) IBOutlet UISwitch *switchTiltSensorControl;
50@property (nonatomic, retain) IBOutlet UILabel *tiltSensorControlThrottle;
51@property (nonatomic, retain) IBOutlet UISwitch *switchTiltSensorControlThrottle;
52
53- (void) resetValues:(id)button;
54- (IBAction) resetButtonPressed:(id)button;
55
56- (IBAction) pitchChanged:(id)sender;
57- (IBAction) yawChanged:(id)sender;
58- (IBAction) throttleChanged:(id)sender;
59
60- (IBAction) hoverButtonPressed:(id)sender;
61- (IBAction) forwardButtonPressed:(id)sender;
62- (IBAction) leftButtonPressed:(id)sender;
63- (IBAction) rightButtonPressed:(id)sender;
64
65- (IBAction) changeSwitchTiltSensorControl:(id)sender;
66- (IBAction) changeSwitchTiltSensorControlThrottle:(id)sender;
67
68#ifdef __CORE_MOTION__
69   @property (strong, nonatomic) CMMotionManager *motionManager;
70#endif
71
72@end
Note: See TracBrowser for help on using the repository browser.