ESE350 project, Spring 2016, University of Pennsylvania

Dependencies:   Adafruit9-DOf Receiver mbed-rtos mbed

Revision:
12:422963993df5
Parent:
11:5c54826d23a7
Child:
13:291ba30c7806
--- a/quadcopter.cpp	Sat Apr 02 18:01:36 2016 +0000
+++ b/quadcopter.cpp	Sat Apr 02 21:40:37 2016 +0000
@@ -26,6 +26,9 @@
     accel_ = Adafruit_LSM303_Accel_Unified(30301);
     mag_ = Adafruit_LSM303_Mag_Unified(30302);
     gyro_ = Adafruit_L3GD20_Unified(20);
+    
+    
+    
 }
 
 void Quadcopter::initAllSensors()
@@ -98,13 +101,12 @@
 
 
 }
-
-motors getPwm()
+motors Quadcopter::getPwm()
 {
-    motors motorPwm_;
+    //motors motorPwm_;// weired errror, should not be necessary
     motorPwm_.m1=0;
-    motorPwm_.m2=0.6+controlInput_.mx/100;
+    motorPwm_.m2=0.65+controlInput_.mx/100;
     motorPwm_.m3=0;
-    motorPwm_.m4=0.6-controlInput_.mx/100;
-    return motorPwm;
+    motorPwm_.m4=0.65-controlInput_.mx/100;
+    return motorPwm_;
 }