Changeset 359a504 in orbit for iOS/Orbit/Orbit/controllers/FlightViewController.m
- Timestamp:
- 08/07/13 13:49:25 (9 years ago)
- Branches:
- master, Servo, Tab_Interface, pyramid
- Children:
- 7945ecb
- Parents:
- 6fc29d0
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
iOS/Orbit/Orbit/controllers/FlightViewController.m
rde10cbc r359a504 142 142 [signalConverter stopProcessing]; 143 143 [self resetViews]; 144 } else if (!signalConverter.isVolumeMax) {145 UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Turn Up The Volume" message:@"Your device volume must be at the maximum for proper operation" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles: nil];146 [alert show];147 } else if (!signalConverter.isBluetoothReady) {148 UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Device not found" message:@"No Bluetooth device detected. Ensure Bluetooth is on and the Mindwave headset is paired" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles: nil];149 [alert show];150 } else if ([signalConverter startProcessing]) {151 [self logMessage:@"Searching for device"];152 connectButton.title = @"Disconnect";153 144 } else { 154 UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Failed to connect" message:@"Check the device is correctly paired on Bluetooth" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles: nil]; 155 [alert show]; 145 BOOL volumeMax = [signalConverter isVolumeMax]; 146 BOOL headphones = [signalConverter isAudioJackPlugged]; 147 148 if (!volumeMax && !headphones) { 149 UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Check Volume & Transmitter" message:@"Ensure the volume is at max and the transmitter is plugged into the headphones" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles: nil]; 150 [alert show]; 151 } else if (!volumeMax) { 152 UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Turn Up The Volume" message:@"Your device volume must be at the maximum for proper operation" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles: nil]; 153 [alert show]; 154 } else if (!headphones) { 155 UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Plug In The Transmitter" message:@"Ensure the infrared transmitter is plugged into the headphone jack" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles: nil]; 156 [alert show]; 157 } else if (!signalConverter.isBluetoothReady) { 158 UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Device not found" message:@"No Bluetooth device detected. Ensure Bluetooth is on and the Mindwave headset is paired" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles: nil]; 159 [alert show]; 160 } else if ([signalConverter startProcessing]) { 161 [self logMessage:@"Searching for device"]; 162 connectButton.title = @"Disconnect"; 163 } else { 164 UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Failed to connect" message:@"Check the device is correctly paired on Bluetooth" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles: nil]; 165 [alert show]; 166 } 156 167 } 157 168 } 158 169 159 170 - (IBAction) testButtonPressed:(id) sender { 171 [signalConverter isAudioJackPlugged]; 160 172 if (signalConverter.running) { 161 173 UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Stop test sound" message:@"Press Stop first to end the test" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles: nil];
Note: See TracChangeset
for help on using the changeset viewer.