Hey Guys,
sure
i just couldn't post the other source in code format because it's too long 
/*
Name: JustFLY.ino
Created: 03.10.2015 16:36:45
Author: Paul
*/
#if defined(ARDUINO) && ARDUINO >= 100
#include "Arduino.h"
#endif
#include "ypr.h"
#include "Servo.h"
#include "Motor.h"
#include "Gyro.h"
#include "Wire.h"
#include "I2Cdev.h"
#include "helper_3dmath.h"
#include "MPU6050me.h"
#include "flyController.h"
#include "QuadCop.h"
QuadCop quad;
void setup() {
quad = *new QuadCop(0,1,2,3);
quad.setYPR(0, 0, 0);
}
// the loop function runs over and over again until power down or reset
void loop() {
quad.Stableize();
}
Quadcop.h
// QuadCop.h
#ifndef _QUADCOP_h
#define _QUADCOP_h
#if defined(ARDUINO) && ARDUINO >= 100
#include "arduino.h"
#include "ypr.h"
#include "flyController.h"
#else
#include "WProgram.h"
#endif
class QuadCop{
private:
FlyController flyCon;
public:
QuadCop(int motorPin1, int motorPin2, int motorPin3, int motorPin4);
QuadCop();
void setYPR(float Yaw,float Pitch, float Roll);
void setYPR(YPR ypr);
void Stableize();
};
#endif
QuadCop.cpp
#include "QuadCop.h"
QuadCop::QuadCop(int motorPin1, int motorPin2, int motorPin3,int motorPin4){
flyCon = *new FlyController(motorPin1, motorPin2, motorPin3, motorPin4);
}
void QuadCop::setYPR(float Yaw, float Pitch, float Roll)
{
flyCon.setWantedYPR(*new YPR(Yaw, Pitch, Roll));
}
void QuadCop::setYPR(YPR ypr)
{
flyCon.setWantedYPR(ypr);
}
QuadCop::QuadCop(){
}
void QuadCop::Stableize(){
flyCon.Refresh();
}
// Gyro.h
#ifndef _GYRO_h
#define _GYRO_h
#if defined(ARDUINO) && ARDUINO >= 100
#include "Wire.h"
#include "I2Cdev.h"
#include "MPU6050me.h"
#include "ypr.h"
#endif
class Gyro{
private:
MPU6050me mpu;
#define LED_PIN 13 // (Arduino is 13, Teensy is 11, Teensy++ is 6)
bool blinkState;
// MPU control/status vars
bool dmpReady = false;Â // set true if DMP init was successful
uint8_t devStatus;Â Â Â // return status after each device operation (0 = success, !0 = error)
uint16_t packetSize;Â Â // expected DMP packet size (default is 42 bytes)
uint16_t fifoCount;Â Â // count of all bytes currently in FIFO
uint8_t fifoBuffer[64]; // FIFO storage buffer
uint8_t mpuIntStatus;Â // holds actual interrupt status byte from MPU
// orientation/motion vars
Quaternion q;Â Â Â Â Â // [w, x, y, z]Â Â Â Â quaternion container
VectorInt16 aa;Â Â Â Â // [x, y, z]Â Â Â Â Â Â accel sensor measurements
VectorInt16 aaReal;Â Â // [x, y, z]Â Â Â Â Â Â gravity-free accel sensor measurements
VectorInt16 aaWorld;Â Â // [x, y, z]Â Â Â Â Â Â world-frame accel sensor measurements
VectorFloat gravity;Â Â // [x, y, z]Â Â Â Â Â Â gravity vector
float euler[3];Â Â Â Â // [psi, theta, phi]Â Â Euler angle container
float ypr[3];Â Â Â Â Â // [yaw, pitch, roll]Â yaw/pitch/roll container and gravity vector
// packet structure for InvenSense teapot demo
uint8_t teapotPacket[14] = { '
Gyro.cpp
#include "Gyro.h"
#if I2CDEV_IMPLEMENTATION == I2CDEV_ARDUINO_WIRE
//#include"Wire.h"
#endif
volatile bool Gyro::mpuInterrupt = false;
YPR lastRedYPR;
void dmpDataReady() {
Gyro::setMpuIntStatus(true);
}
static void setMpuIntStatus(volatile bool status)
{
Gyro::mpuInterrupt = status;
}
void Gyro::init() {
mpu = *new MPU6050me();
lastRedYPR = *new YPR();
// join I2C bus (I2Cdev library doesn't do this automatically)
#if I2CDEV_IMPLEMENTATION == I2CDEV_ARDUINO_WIRE
Wire.begin();
TWBR = 24; // 400kHz I2C clock (200kHz if CPU is 8MHz)
#elif I2CDEV_IMPLEMENTATION == I2CDEV_BUILTIN_FASTWIRE
Fastwire::setup(400, true);
#endif
Serial.begin(115200);
while (!Serial); // wait for Leonardo enumeration, others continue immediately
Serial.println(F("Initializing I2C devices..."));
mpu.initialize();
// verify connection
Serial.println(F("Testing device connections..."));
Serial.println(mpu.testConnection() ? F("MPU6050 connection successful") : F("MPU6050 connection failed"));
// wait for ready
Serial.println(F("\nSend any character to begin DMP programming and demo: "));
while (Serial.available() && Serial.read());
while (!Serial.available());
while (Serial.available() && Serial.read());
// load and configure the DMP
Serial.println(F("Initializing DMP..."));
devStatus = mpu.dmpInitialize();
mpu.setXGyroOffset(220);
mpu.setYGyroOffset(76);
mpu.setZGyroOffset(-85);
mpu.setZAccelOffset(1788);
if (devStatus == 0) {
// turn on the DMP, now that it's ready
Serial.println(F("Enabling DMP..."));
mpu.setDMPEnabled(true);
// enable Arduino interrupt detection
Serial.println(F("Enabling interrupt detection (Arduino external interrupt 0)..."));
attachInterrupt(0, dmpDataReady, RISING);
mpuIntStatus = mpu.getIntStatus();
// set our DMP Ready flag so the main loop() function knows it's okay to use it
Serial.println(F("DMP ready! Waiting for first interrupt..."));
dmpReady = true;
packetSize = mpu.dmpGetFIFOPacketSize();
}
else {
Serial.print(F("DMP Initialization failed (code "));
Serial.print(devStatus);
Serial.println(F(")"));
}
pinMode(LED_PIN, OUTPUT);
}
YPR Gyro::GetVals() {
if (!dmpReady) return *new YPR(-1, -1, -1);
while (!mpuInterrupt && fifoCount < packetSize) {
}
mpuInterrupt = false;
mpuIntStatus = mpu.getIntStatus();
fifoCount = mpu.getFIFOCount();
if ((mpuIntStatus & 0x10) || fifoCount == 1024) {
mpu.resetFIFO();
Serial.println(F("FIFO overflow!"));
return *new YPR(-1,-1,-1);
}
else if (mpuIntStatus & 0x02) {
while (fifoCount < packetSize) fifoCount = mpu.getFIFOCount();
mpu.getFIFOBytes(fifoBuffer, packetSize);
fifoCount -= packetSize;
lastRedYPR.setNewVals(ypr[0] * 180 / M_PI, ypr[1] * 180 / M_PI, ypr[2] * 180 / M_PI);
return lastRedYPR;
}
}
I posted a few code pieces more that you can understand the problem...
Thanks alot for help 
, 0x02, 0, 0, 0, 0, 0, 0, 0, 0, 0x00, 0x00, '\r', '\n' };
public:
volatile static bool mpuInterrupt; // indicates whether MPU interrupt pin has gone high
void static setMpuIntStatus(uint8_t status);
void init();
YPR GetVals();
};
#endif
Gyro.cpp
§DISCOURSE_HOISTED_CODE_4§
I posted a few code pieces more that you can understand the problem...
Thanks alot for help :)