Ignore:
Timestamp:
08/02/13 19:00:35 (8 years ago)
Author:
Jonathon Horsman <jonathon@…>
Branches:
master, Servo, Tab_Interface, pyramid
Children:
1472980
Parents:
ce0a7ee
Message:

Add a test button on flight tab
Add a reset button on advanced tab
Correctly detect device volume
Add more tutorial HTML

File:
1 edited

Legend:

Unmodified
Added
Removed
  • iOS/Orbit/Orbit/SignalConverter.m

    rce0a7ee rde10cbc  
    3030} 
    3131 
    32 @synthesize attentionThreshold, meditationThreshold, running; 
     32@synthesize attentionThreshold, meditationThreshold, running, testing; 
    3333 
    3434 
     
    139139- (BOOL) isVolumeMax 
    140140{ 
    141     float volume = [[AVAudioSession sharedInstance] outputVolume]; 
    142     return volume == 1.0; 
     141    AudioSessionSetActive(YES); 
     142    return 1.0 == [[AVAudioSession sharedInstance] outputVolume]; 
    143143} 
    144144 
     
    147147- (BOOL) startProcessing 
    148148{ 
     149    if (testing) return NO; 
    149150    EAAccessory *accessory = [[TGAccessoryManager sharedTGAccessoryManager] accessory]; 
    150151    if (accessory != nil) { 
     
    160161- (void) stopProcessing 
    161162{ 
    162     [self appStopped]; 
     163    if (running) [self appStopped]; 
     164} 
     165 
     166- (void) playTestSound 
     167{ 
     168    if (!running && !testing) { 
     169        testing = YES; 
     170        [audioPlayer playWithThrottle:throttle yaw:yaw pitch:pitch]; 
     171    } 
     172} 
     173 
     174- (void) stopTestSound 
     175{ 
     176    if (testing) { 
     177        testing = NO; 
     178        [audioPlayer stop]; 
     179    } 
    163180} 
    164181 
Note: See TracChangeset for help on using the changeset viewer.