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

Servo
Last change on this file since c1a500d was c1a500d, checked in by Steve Castellotti <sc@…>, 7 years ago
  • Statistics Tab and ViewController? added
  • Initial algorithm history and raw brainwaves
  • 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#if TARGET_IPHONE_SIMULATOR
15   Boolean CORE_MOTION = false;
16#else
17   #import <CoreMotion/CoreMotion.h>
18   #define __CORE_MOTION__
19   Boolean CORE_MOTION = true;
20#endif
21
22double defaultControlThrottle = 0.8;
23double defaultControlYaw = 0.47; // 0.78 is the actual setting required, but .47 is the inverse (1.25 - 0.78)
24double defaultControlPitch = 0.31;
25
26double referenceTiltX = 0;
27double referenceTiltY = 0;
28double titleSensorMinimumThreshold = 0.01;
29
30@interface AdvancedViewController : UIViewController
31
32@property (nonatomic, retain) IBOutlet UIBarButtonItem *resetButton;
33
34@property (nonatomic, retain) IBOutlet UILabel *throttlePercent;
35@property (nonatomic, retain) IBOutlet UISlider *throttle;
36@property (nonatomic, retain) IBOutlet UILabel *yawPercent;
37@property (nonatomic, retain) IBOutlet UISlider *yaw;
38@property (nonatomic, retain) IBOutlet UILabel *pitchPercent;
39@property (nonatomic, retain) IBOutlet UISlider *pitch;
40
41@property (nonatomic, retain) IBOutlet UILabel *presets;
42@property (nonatomic, retain) IBOutlet UIButton *buttonHover;
43@property (nonatomic, retain) IBOutlet UIButton *buttonForward;
44@property (nonatomic, retain) IBOutlet UIButton *buttonLeft;
45@property (nonatomic, retain) IBOutlet UIButton *buttonRight;
46
47@property (nonatomic, retain) IBOutlet UILabel *tiltSensorControl;
48@property (nonatomic, retain) IBOutlet UISwitch *switchTiltSensorControl;
49@property (nonatomic, retain) IBOutlet UILabel *tiltSensorControlThrottle;
50@property (nonatomic, retain) IBOutlet UISwitch *switchTiltSensorControlThrottle;
51
52- (void) resetValues:(id)button;
53- (IBAction) resetButtonPressed:(id)button;
54
55- (IBAction) pitchChanged:(id)sender;
56- (IBAction) yawChanged:(id)sender;
57- (IBAction) throttleChanged:(id)sender;
58
59- (IBAction) hoverButtonPressed:(id)sender;
60- (IBAction) forwardButtonPressed:(id)sender;
61- (IBAction) leftButtonPressed:(id)sender;
62- (IBAction) rightButtonPressed:(id)sender;
63
64- (IBAction) changeSwitchTiltSensorControl:(id)sender;
65- (IBAction) changeSwitchTiltSensorControlThrottle:(id)sender;
66
67#ifdef __CORE_MOTION__
68   @property (strong, nonatomic) CMMotionManager *motionManager;
69#endif
70
71@end
Note: See TracBrowser for help on using the repository browser.