ESE350 project, Spring 2016, University of Pennsylvania
Dependencies: Adafruit9-DOf Receiver mbed-rtos mbed
Diff: quadcopter.h
- Revision:
- 9:f1bd96708a21
- Parent:
- 8:326e7009ce0c
- Child:
- 10:e7d1801e966a
diff -r 326e7009ce0c -r f1bd96708a21 quadcopter.h --- a/quadcopter.h Sat Apr 02 13:47:58 2016 +0000 +++ b/quadcopter.h Sat Apr 02 14:54:46 2016 +0000 @@ -3,6 +3,7 @@ #include "mbed.h" #include "Adafruit_9DOF.h" +#include "Serial_base.h" struct state { @@ -35,8 +36,14 @@ Adafruit_LSM303_Mag_Unified mag_; Adafruit_L3GD20_Unified gyro_; + sensors_event_t accel_event_; + sensors_event_t mag_event_; + sensors_event_t gyro_event_; + sensors_vec_t orientation_; + offset offsetAngRate_; offset offsetAttitude_; +Serial *pcPntr_; public: @@ -44,15 +51,18 @@ void setState(double phi, double theta, double psi); - state getState() { + /*state getState() { return state_; - } + } */ + void setPwm(); void initializePwm(); void controller(); void setState(); void readSensorValues(); - void initSensors(); + void initAllSensors(); + void setSerial(Serial *pcPntr){pcPntr_=pcPntr;}; + void print(char * myString); }; #endif \ No newline at end of file