Changeset c1a500d in orbit for iOS


Ignore:
Timestamp:
01/02/14 07:07:05 (6 years ago)
Author:
Steve Castellotti <sc@…>
Branches:
master, Servo
Children:
2246ba0
Parents:
c6dde93
Message:
  • Statistics Tab and ViewController? added
  • Initial algorithm history and raw brainwaves
Location:
iOS/Orbit
Files:
2 added
5 edited

Legend:

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

    rf05ba79 rc1a500d  
    1212#import <UIKit/UIKit.h> 
    1313 
    14 #define __CORE_MOTION__ 
    15  
    16 #ifdef __CORE_MOTION__ 
     14#if TARGET_IPHONE_SIMULATOR 
     15   Boolean CORE_MOTION = false; 
     16#else 
    1717   #import <CoreMotion/CoreMotion.h> 
     18   #define __CORE_MOTION__ 
    1819   Boolean CORE_MOTION = true; 
    19 #else 
    20    Boolean CORE_MOTION = false; 
    2120#endif 
    2221 
  • iOS/Orbit/Orbit/controllers/AdvancedViewController.m

    rf05ba79 rc1a500d  
    3131    
    3232   // Core Motion 
    33    self.motionManager = [[CMMotionManager alloc] init]; 
    34    self.motionManager.accelerometerUpdateInterval = .2; 
    35    self.motionManager.gyroUpdateInterval = .2; 
    36    //   self.motionManager.accelerometerUpdateInterval = .1; 
    37    //   self.motionManager.gyroUpdateInterval = .1; 
    38     
    39    [self.motionManager startAccelerometerUpdatesToQueue:[NSOperationQueue currentQueue] 
    40                                             withHandler:^(CMAccelerometerData *accelerometerData, NSError *error) { 
    41                                                [self outputAccelertionData:accelerometerData.acceleration]; 
    42                                                if(error){ 
    43                                                   NSLog(@"%@", error); 
    44                                                } 
    45                                             }]; 
    46     
    47    [self.motionManager startGyroUpdatesToQueue:[NSOperationQueue currentQueue] 
    48                                    withHandler:^(CMGyroData *gyroData, NSError *error) { 
    49                                       [self outputRotationData:gyroData.rotationRate]; 
    50                                    }]; 
    51     
     33//   @try { 
     34//      self.motionManager = [[CMMotionManager alloc] init]; 
     35//      self.motionManager.accelerometerUpdateInterval = .2; 
     36//      self.motionManager.gyroUpdateInterval = .2; 
     37//      //   self.motionManager.accelerometerUpdateInterval = .1; 
     38//      //   self.motionManager.gyroUpdateInterval = .1; 
     39//       
     40//      [self.motionManager startAccelerometerUpdatesToQueue:[NSOperationQueue currentQueue] 
     41//                                               withHandler:^(CMAccelerometerData *accelerometerData, NSError *error) { 
     42//                                                  [self outputAccelertionData:accelerometerData.acceleration]; 
     43//                                                  if(error){ 
     44//                                                     NSLog(@"%@", error); 
     45//                                                  } 
     46//                                               }]; 
     47//       
     48//      [self.motionManager startGyroUpdatesToQueue:[NSOperationQueue currentQueue] 
     49//                                      withHandler:^(CMGyroData *gyroData, NSError *error) { 
     50//                                         [self outputRotationData:gyroData.rotationRate]; 
     51//                                      }]; 
     52//   } 
     53//   @catch (NSException * e) { 
     54//      NSLog(@"Exception: %@", e); 
     55//   } 
     56 
     57       
    5258} 
    5359 
  • iOS/Orbit/Orbit/en.lproj/MainStoryboard.storyboard

    rc6dde93 rc1a500d  
    6060                <placeholder placeholderIdentifier="IBFirstResponder" id="7oi-5l-zN2" userLabel="First Responder" sceneMemberID="firstResponder"/> 
    6161            </objects> 
    62             <point key="canvasLocation" x="680" y="1192"/> 
     62            <point key="canvasLocation" x="680" y="1681"/> 
     63        </scene> 
     64        <!--Statistics View Controller - Statistics--> 
     65        <scene sceneID="2wK-cS-Lc7"> 
     66            <objects> 
     67                <viewController id="ewb-HD-SG5" customClass="StatisticsViewController" sceneMemberID="viewController"> 
     68                    <view key="view" contentMode="scaleToFill" id="QuZ-rc-WhN"> 
     69                        <rect key="frame" x="0.0" y="0.0" width="320" height="480"/> 
     70                        <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> 
     71                        <subviews> 
     72                            <navigationBar contentMode="scaleToFill" barStyle="black" id="IPO-TL-rLO"> 
     73                                <rect key="frame" x="0.0" y="0.0" width="320" height="44"/> 
     74                                <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/> 
     75                                <items> 
     76                                    <navigationItem title="Statistics" id="Xe1-O9-Frs"/> 
     77                                </items> 
     78                            </navigationBar> 
     79                        </subviews> 
     80                        <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/> 
     81                    </view> 
     82                    <tabBarItem key="tabBarItem" title="Statistics" image="tab_advanced-30x30.png" id="9MD-xw-rQj"/> 
     83                    <simulatedTabBarMetrics key="simulatedBottomBarMetrics"/> 
     84                </viewController> 
     85                <placeholder placeholderIdentifier="IBFirstResponder" id="HwK-1n-X5u" userLabel="First Responder" sceneMemberID="firstResponder"/> 
     86            </objects> 
     87            <point key="canvasLocation" x="680" y="509"/> 
    6388        </scene> 
    6489        <!--Advanced View Controller - Advanced--> 
     
    303328                <placeholder placeholderIdentifier="IBFirstResponder" id="oN9-X2-GzT" userLabel="First Responder" sceneMemberID="firstResponder"/> 
    304329            </objects> 
    305             <point key="canvasLocation" x="680" y="603"/> 
     330            <point key="canvasLocation" x="680" y="1095"/> 
    306331        </scene> 
    307332        <!--Flight View Controller - Flight--> 
     
    437462                                    </progressView> 
    438463                                    <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="0%" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="ah9-c0-kCb" userLabel="Power %"> 
    439                                         <rect key="frame" x="266" y="47" width="40" height="18"/> 
     464                                        <rect key="frame" x="266.00000004881008" y="47" width="40" height="18"/> 
    440465                                        <autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMinY="YES" flexibleMaxY="YES"/> 
    441466                                        <fontDescription key="fontDescription" type="system" pointSize="14"/> 
     
    513538                <placeholder placeholderIdentifier="IBFirstResponder" id="2FE-fA-6q3" userLabel="First Responder" sceneMemberID="firstResponder"/> 
    514539            </objects> 
    515             <point key="canvasLocation" x="680" y="15"/> 
     540            <point key="canvasLocation" x="680" y="-81"/> 
    516541        </scene> 
    517542        <!--Tutorial View Controller - Welcome--> 
     
    549574                <placeholder placeholderIdentifier="IBFirstResponder" id="phY-I4-vyg" userLabel="First Responder" sceneMemberID="firstResponder"/> 
    550575            </objects> 
    551             <point key="canvasLocation" x="680" y="-651"/> 
     576            <point key="canvasLocation" x="680" y="-670"/> 
    552577        </scene> 
    553578        <!--Tab Bar Controller--> 
     
    564589                        <segue destination="Wc6-MU-jew" kind="relationship" relationship="viewControllers" id="RgU-De-HvK"/> 
    565590                        <segue destination="FNb-Lg-ILk" kind="relationship" relationship="viewControllers" id="qdp-16-orN"/> 
     591                        <segue destination="ewb-HD-SG5" kind="relationship" relationship="viewControllers" id="bnp-Vy-gvn"/> 
    566592                        <segue destination="GcO-3J-amz" kind="relationship" relationship="viewControllers" id="2mN-g9-3Pc"/> 
    567593                        <segue destination="rjE-lQ-n1C" kind="relationship" relationship="viewControllers" id="Qzp-bX-Vb5"/> 
  • iOS/Orbit/orbit.xcodeproj/project.pbxproj

    r06bdb03 rc1a500d  
    5454                5218A6AA1872C486003DDE17 /* step11-8.html in Resources */ = {isa = PBXBuildFile; fileRef = 5218A6A91872C486003DDE17 /* step11-8.html */; }; 
    5555                5218A6AC1872C562003DDE17 /* tutorial-11-steering-tilt_sensor_off.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 5218A6AB1872C562003DDE17 /* tutorial-11-steering-tilt_sensor_off.jpg */; }; 
     56                5218A6AF187389C1003DDE17 /* StatisticsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 5218A6AD187389C1003DDE17 /* StatisticsViewController.m */; }; 
    5657                524B4A3D17AF6E72009076BA /* step05-4.html in Resources */ = {isa = PBXBuildFile; fileRef = 524B4A3C17AF6E72009076BA /* step05-4.html */; }; 
    5758                5255A29017CAEA1C00AD4349 /* tab_welcome-30x30.png in Resources */ = {isa = PBXBuildFile; fileRef = 5255A28E17CAEA1C00AD4349 /* tab_welcome-30x30.png */; }; 
     
    191192                5218A6A91872C486003DDE17 /* step11-8.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; name = "step11-8.html"; path = "tutorial/step11-8.html"; sourceTree = "<group>"; }; 
    192193                5218A6AB1872C562003DDE17 /* tutorial-11-steering-tilt_sensor_off.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = "tutorial-11-steering-tilt_sensor_off.jpg"; sourceTree = "<group>"; }; 
     194                5218A6AD187389C1003DDE17 /* StatisticsViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = StatisticsViewController.m; path = controllers/StatisticsViewController.m; sourceTree = "<group>"; }; 
     195                5218A6AE187389C1003DDE17 /* StatisticsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StatisticsViewController.h; path = controllers/StatisticsViewController.h; sourceTree = "<group>"; }; 
    193196                524B4A3C17AF6E72009076BA /* step05-4.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; name = "step05-4.html"; path = "tutorial/step05-4.html"; sourceTree = "<group>"; }; 
    194197                5255A28E17CAEA1C00AD4349 /* tab_welcome-30x30.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "tab_welcome-30x30.png"; sourceTree = "<group>"; }; 
     
    483486                                289C7D0C178D757F005C08EC /* FlightViewController.h */, 
    484487                                289C7D0D178D757F005C08EC /* FlightViewController.m */, 
     488                                5218A6AE187389C1003DDE17 /* StatisticsViewController.h */, 
     489                                5218A6AD187389C1003DDE17 /* StatisticsViewController.m */, 
    485490                                288B4BC1178ECD0A007D588D /* AdvancedViewController.h */, 
    486491                                288B4BC2178ECD0B007D588D /* AdvancedViewController.m */, 
     
    839844                                28174C71167F2EA900104752 /* AppDelegate.m in Sources */, 
    840845                                289C7CCF178C36A9005C08EC /* TutorialViewController.m in Sources */, 
     846                                5218A6AF187389C1003DDE17 /* StatisticsViewController.m in Sources */, 
    841847                                289C7D0E178D757F005C08EC /* FlightViewController.m in Sources */, 
    842848                                288B4BC3178ECD0B007D588D /* AdvancedViewController.m in Sources */, 
Note: See TracChangeset for help on using the changeset viewer.