Changeset ce0a7ee in orbit for iOS/Orbit/Orbit/controllers


Ignore:
Timestamp:
07/31/13 17:02:07 (9 years ago)
Author:
Jonathon Horsman <jonathon@…>
Branches:
master, RawEEG, Servo, Tab_Interface, pyramid
Children:
de10cbc, 0ab8242
Parents:
9015b1e
Message:

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

Location:
iOS/Orbit/Orbit/controllers
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • iOS/Orbit/Orbit/controllers/AdvancedViewController.m

    rab9d63b rce0a7ee  
    88 
    99#import "AdvancedViewController.h" 
     10#import "SignalConverter.h" 
     11#import "AppDelegate.h" 
    1012 
    1113@interface AdvancedViewController () 
     
    1315@end 
    1416 
    15 @implementation AdvancedViewController 
     17@implementation AdvancedViewController { 
     18    SignalConverter *signalConverter; 
     19} 
    1620 
    1721@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} 
    1829 
    1930- (IBAction) pitchChanged:(id) sender 
    2031{ 
    2132    pitchPercent.text = [self percentStringFromSlider:pitch]; 
     33    [self adjustValues]; 
    2234} 
    2335 
     
    2537{ 
    2638    yawPercent.text = [self percentStringFromSlider:yaw]; 
     39    [self adjustValues]; 
    2740} 
    2841 
     
    3043{ 
    3144    throttlePercent.text = [self percentStringFromSlider:throttle]; 
     45    [self adjustValues]; 
    3246} 
    3347 
     
    3751} 
    3852 
     53- (void) adjustValues 
     54{ 
     55     
     56} 
     57 
    3958@end 
  • iOS/Orbit/Orbit/controllers/FlightViewController.m

    r9015b1e rce0a7ee  
    2323@implementation FlightViewController { 
    2424    SignalConverter *signalConverter; 
    25     int deviceStatus; 
     25    int deviceStatus;     
    2626} 
    2727 
     
    3737    [self.attentionThreshold addTarget:self action:@selector(sliderChanged) forControlEvents:UIControlEventValueChanged]; 
    3838    [self.meditationThreshold addTarget:self action:@selector(sliderChanged) forControlEvents:UIControlEventValueChanged]; 
    39     [signalConverter prepare]; 
    4039} 
    4140 
     
    151150    } else if ([signalConverter startProcessing]) { 
    152151        [self logMessage:@"Searching for device"]; 
    153 //        [self updateStatusImage:STATUS_CONNECTING]; 
    154152        connectButton.title = @"Disconnect"; 
    155153    } else { 
  • iOS/Orbit/Orbit/controllers/SupportViewController.m

    rab9d63b rce0a7ee  
    3333} 
    3434 
    35 - (void)didReceiveMemoryWarning 
    36 { 
    37     [super didReceiveMemoryWarning]; 
    38     // Dispose of any resources that can be recreated. 
    39 } 
    40  
    4135#pragma mark UIWebViewDelegate methods 
    4236 
    43 - (void)webViewDidStartLoad:(UIWebView *)webView 
     37- (void)webViewDidFinishLoad:(UIWebView *)webView 
    4438{ 
    4539    retryButton.hidden = YES; 
  • iOS/Orbit/Orbit/controllers/TutorialViewController.m

    rab9d63b rce0a7ee  
    1111@implementation TutorialViewController 
    1212 
     13@synthesize webView; 
    1314 
    1415- (void)viewDidLoad 
    1516{ 
     17    NSString *file = [[NSBundle mainBundle] pathForResource:@"index" ofType:@"html"]; 
     18    NSString *html = [NSString stringWithContentsOfFile:file encoding:NSUTF8StringEncoding error:nil]; 
     19    [webView loadHTMLString:html baseURL:nil]; 
    1620    [super viewDidLoad]; 
    17      
    1821} 
    1922@end 
Note: See TracChangeset for help on using the changeset viewer.