RawEEGServoTab_Interfacepyramid
Last change
on this file since ab9d63b was
ab9d63b,
checked in by Jonathon Horsman <jonathon@…>, 9 years ago
|
Initial check in to convert into a 4 tab app with tutorial, flight, advanced and support tabs.
Old controller code remains for now but about to be removed
|
-
Property mode set to
100644
|
File size:
862 bytes
|
Line | |
---|
1 | |
---|
2 | |
---|
3 | |
---|
4 | |
---|
5 | |
---|
6 | |
---|
7 | |
---|
8 | |
---|
9 | #import "AdvancedViewController.h" |
---|
10 | |
---|
11 | @interface AdvancedViewController () |
---|
12 | |
---|
13 | @end |
---|
14 | |
---|
15 | @implementation AdvancedViewController |
---|
16 | |
---|
17 | @synthesize pitch, pitchPercent, yaw, yawPercent, throttle, throttlePercent; |
---|
18 | |
---|
19 | - (IBAction) pitchChanged:(id) sender |
---|
20 | { |
---|
21 | pitchPercent.text = [self percentStringFromSlider:pitch]; |
---|
22 | } |
---|
23 | |
---|
24 | - (IBAction) yawChanged:(id) sender |
---|
25 | { |
---|
26 | yawPercent.text = [self percentStringFromSlider:yaw]; |
---|
27 | } |
---|
28 | |
---|
29 | - (IBAction) throttleChanged:(id) sender |
---|
30 | { |
---|
31 | throttlePercent.text = [self percentStringFromSlider:throttle]; |
---|
32 | } |
---|
33 | |
---|
34 | - (NSString *) percentStringFromSlider:(UISlider *) slider |
---|
35 | { |
---|
36 | return [NSString stringWithFormat:@"%i%%", (int)((slider.value - 0.5) * 200)]; |
---|
37 | } |
---|
38 | |
---|
39 | @end |
---|
Note: See
TracBrowser
for help on using the repository browser.