Changeset 395ea1a in orbit


Ignore:
Timestamp:
12/31/13 01:37:58 (6 years ago)
Author:
Steve Castellotti <sc@…>
Branches:
master, Servo
Children:
67d9807
Parents:
ac59750
Message:
  • referenceTilt tracking added for Throttle
File:
1 edited

Legend:

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

    rac59750 r395ea1a  
    162162   } else{ 
    163163      NSLog(@"DEBUG: Throttle Tilt Sensor Disabled"); 
     164      referenceTiltX = 0; 
     165                referenceTiltY = 0; 
    164166   } 
    165167    
     
    211213         double tiltY = acceleration.y * -1;  // invert the Y axis so that negative values equal forward 
    212214          
     215         if (referenceTiltY == 0) { 
     216            referenceTiltY = tiltY; 
     217         } 
     218          
    213219         throttle.value = defaultControlThrottle - (tiltY - referenceTiltY); 
    214220          
Note: See TracChangeset for help on using the changeset viewer.