source: orbit/iOS/Orbit/Orbit/controllers/AdvancedViewController.m @ ce0a7ee

RawEEGServoTab_Interfacepyramid
Last change on this file since ce0a7ee was ce0a7ee, checked in by Jonathon Horsman <jonathon@…>, 7 years ago

Port Android AudioService? to iOS
Dummy page for tutorial
icons for tabs (which don't work)

  • Property mode set to 100644
File size: 1.2 KB
Line 
1//
2//  AdvancedViewController.m
3//  orbit
4//
5//  Created by Jonathon Horsman on 11/07/2013.
6//  Copyright (c) 2013 Puzzlebox Productions, LLC. All rights reserved.
7//
8
9#import "AdvancedViewController.h"
10#import "SignalConverter.h"
11#import "AppDelegate.h"
12
13@interface AdvancedViewController ()
14
15@end
16
17@implementation AdvancedViewController {
18    SignalConverter *signalConverter;
19}
20
21@synthesize pitch, pitchPercent, yaw, yawPercent, throttle, throttlePercent;
22
23- (void)viewDidLoad
24{
25    [super viewDidLoad];
26    AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
27    signalConverter = appDelegate.signalConverter;
28}
29
30- (IBAction) pitchChanged:(id) sender
31{
32    pitchPercent.text = [self percentStringFromSlider:pitch];
33    [self adjustValues];
34}
35
36- (IBAction) yawChanged:(id) sender
37{
38    yawPercent.text = [self percentStringFromSlider:yaw];
39    [self adjustValues];
40}
41
42- (IBAction) throttleChanged:(id) sender
43{
44    throttlePercent.text = [self percentStringFromSlider:throttle];
45    [self adjustValues];
46}
47
48- (NSString *) percentStringFromSlider:(UISlider *) slider
49{
50    return [NSString stringWithFormat:@"%i%%", (int)((slider.value - 0.5) * 200)]; // between -100% and 100%
51}
52
53- (void) adjustValues
54{
55   
56}
57
58@end
Note: See TracBrowser for help on using the repository browser.