source: orbit/iOS/Orbit/Orbit/controllers/AdvancedViewController.h @ 16249e0

Servo
Last change on this file since 16249e0 was 16249e0, checked in by Steve Castellotti <sc@…>, 8 years ago
  • Updated version numbers
  • Trimmed debug output
  • Whitespace and comment cleanup
  • Property mode set to 100644
File size: 2.2 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#import <CoreMotion/CoreMotion.h>
14
15double defaultControlThrottle = 0.8;
16double defaultControlYaw = 0.47; // 0.78 is the actual setting required, but .47 is the inverse (1.25 - 0.78)
17double defaultControlPitch = 0.31;
18
19double referenceTiltX = 0;
20double referenceTiltY = 0;
21double titleSensorMinimumThreshold = 0.01;
22
23@interface AdvancedViewController : UIViewController
24
25@property (nonatomic, retain) IBOutlet UIBarButtonItem *resetButton;
26
27@property (nonatomic, retain) IBOutlet UILabel *throttlePercent;
28@property (nonatomic, retain) IBOutlet UISlider *throttle;
29@property (nonatomic, retain) IBOutlet UILabel *yawPercent;
30@property (nonatomic, retain) IBOutlet UISlider *yaw;
31@property (nonatomic, retain) IBOutlet UILabel *pitchPercent;
32@property (nonatomic, retain) IBOutlet UISlider *pitch;
33
34@property (nonatomic, retain) IBOutlet UILabel *presets;
35@property (nonatomic, retain) IBOutlet UIButton *buttonHover;
36@property (nonatomic, retain) IBOutlet UIButton *buttonForward;
37@property (nonatomic, retain) IBOutlet UIButton *buttonLeft;
38@property (nonatomic, retain) IBOutlet UIButton *buttonRight;
39
40@property (nonatomic, retain) IBOutlet UILabel *tiltSensorControl;
41@property (nonatomic, retain) IBOutlet UISwitch *switchTiltSensorControl;
42@property (nonatomic, retain) IBOutlet UILabel *tiltSensorControlThrottle;
43@property (nonatomic, retain) IBOutlet UISwitch *switchTiltSensorControlThrottle;
44
45- (IBAction) resetButtonPressed:(id)button;
46
47- (IBAction) pitchChanged:(id)sender;
48- (IBAction) yawChanged:(id)sender;
49- (IBAction) throttleChanged:(id)sender;
50
51- (IBAction) hoverButtonPressed:(id)sender;
52- (IBAction) forwardButtonPressed:(id)sender;
53- (IBAction) leftButtonPressed:(id)sender;
54- (IBAction) rightButtonPressed:(id)sender;
55
56- (IBAction) changeSwitchTiltSensorControl:(id)sender;
57- (IBAction) changeSwitchTiltSensorControlThrottle:(id)sender;
58
59@property (strong, nonatomic) CMMotionManager *motionManager;
60
61
62@end
Note: See TracBrowser for help on using the repository browser.