 //=============================================================================//
 void loop()
 {
-    // GET MOTION
-    //-------------------------------------------------------------------------//
     unsigned long currentG = millis(); // millis();
 
     if (currentG - trigG  >= trigGyro) 
     {
     	trigG = currentG;
       
-      
+         // GET MOTION
+         //-------------------------------------------------------------------------// 
     	accelgyro.getMotion6(&ax, &ay, &az, &gx, &gy, &gz);
-		if(invertXY)
-		{
-			y = (((ax/180)+etalonX)+90);
-  			x = (((ay/180)+etalonY)+90);
-		}
-		else
-		{
-			x = (((ax/180)+etalonX)+90);
-  			y = (((ay/180)+etalonY)+90);
-		}
+	if(invertXY)
+	{
+	    y = (((ax/180)+etalonX)+90);
+  	    x = (((ay/180)+etalonY)+90);
+	}
+	else
+	{
+	    x = (((ax/180)+etalonX)+90);
+  	    y = (((ay/180)+etalonY)+90);
+	}
     }
   
-    // GET SERIAL DATA
+    // GET SERIAL AND RF24 DATA
     //-------------------------------------------------------------------------//
 	  
     char msg[64];

#define CurrentBat3      2
#define CurrentBat4      3
#define Pinvoltage       6












// MPU6050
MPU6050 accelgyro;

int16_t ax, ay, az;
int16_t gx, gy, gz;

// I2C
int adress         = 2;

bool yok           = false;
bool zok           = false;

long intX          = 0;
long intY          = 0; 

bool production    = false;
bool LED_PING      = false;
bool BOOT          = false;

bool enMotAB       = false;
bool enMotXY       = false;
bool enMotZ        = false;

unsigned long previousMillisX = 0;
unsigned long previousMillisY = 0;
unsigned long previousMillisZ = 0;
