source: orbit/iOS/Orbit/Orbit/controllers/AdvancedViewController.h @ 67d9807

Servo
Last change on this file since 67d9807 was 67d9807, checked in by Steve Castellotti <sc@…>, 9 years ago
  • Tilt Sensor fine tuning include fllter for sudden changes
  • 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
15//double defaultControlThrottle = 0.5;
16//double defaultControlYaw = 0.5;
17//double defaultControlPitch = 0.5;
18
19double defaultControlThrottle = 0.8;
20double defaultControlYaw = 0.78;
21double defaultControlPitch = 0.31;
22
23double referenceTiltX = 0;
24double referenceTiltY = 0;
25double titleSensorMinimumThreshold = 0.01;
26
27@interface AdvancedViewController : UIViewController
28
29@property (nonatomic, retain) IBOutlet UIBarButtonItem *resetButton;
30
31@property (nonatomic, retain) IBOutlet UILabel *throttlePercent;
32@property (nonatomic, retain) IBOutlet UISlider *throttle;
33@property (nonatomic, retain) IBOutlet UILabel *yawPercent;
34@property (nonatomic, retain) IBOutlet UISlider *yaw;
35@property (nonatomic, retain) IBOutlet UILabel *pitchPercent;
36@property (nonatomic, retain) IBOutlet UISlider *pitch;
37
38@property (nonatomic, retain) IBOutlet UILabel *presets;
39@property (nonatomic, retain) IBOutlet UIButton *buttonHover;
40@property (nonatomic, retain) IBOutlet UIButton *buttonForward;
41@property (nonatomic, retain) IBOutlet UIButton *buttonLeft;
42@property (nonatomic, retain) IBOutlet UIButton *buttonRight;
43
44@property (nonatomic, retain) IBOutlet UILabel *tiltSensorControl;
45@property (nonatomic, retain) IBOutlet UISwitch *switchTiltSensorControl;
46@property (nonatomic, retain) IBOutlet UILabel *tiltSensorControlThrottle;
47@property (nonatomic, retain) IBOutlet UISwitch *switchTiltSensorControlThrottle;
48
49- (IBAction) resetButtonPressed:(id)button;
50
51- (IBAction) pitchChanged:(id)sender;
52- (IBAction) yawChanged:(id)sender;
53- (IBAction) throttleChanged:(id)sender;
54
55- (IBAction) hoverButtonPressed:(id)sender;
56- (IBAction) forwardButtonPressed:(id)sender;
57- (IBAction) leftButtonPressed:(id)sender;
58- (IBAction) rightButtonPressed:(id)sender;
59
60- (IBAction)changeSwitchTiltSensorControl:(id)sender;
61- (IBAction)changeSwitchTiltSensorControlThrottle:(id)sender;
62
63@property (strong, nonatomic) CMMotionManager *motionManager;
64
65
66@end
Note: See TracBrowser for help on using the repository browser.