   stop(HARD);
   if (FLIsOut() && FRIsOut()){
     delay(200);
-    moveBackward(DEFAULT_VELOCITY+15,DEFAULT_VELOCITY+15);
+    moveBackward(DEFAULT_VELOCITY+15, DEFAULT_VELOCITY+15);
     delay(500);
-    turnRight(DEFAULT_VELOCITY+15,TURN_ON_SPOT);
+    turnRight(DEFAULT_VELOCITY+15, TURN_ON_SPOT);
     delay(1000);
   }
   else if (FLIsOut()){
-    moveBackward(DEFAULT_VELOCITY+15,DEFAULT_VELOCITY+15);
+    moveBackward(DEFAULT_VELOCITY+15, DEFAULT_VELOCITY+15);
     delay(200);
     turnRight(DEFAULT_VELOCITY+15, TURN_ON_SPOT);
     delay(500);
   }
   else if (FRIsOut()){
-    moveBackward(DEFAULT_VELOCITY+15,DEFAULT_VELOCITY+15);
+    moveBackward(DEFAULT_VELOCITY+15, DEFAULT_VELOCITY+15);
     delay(200);
     turnLeft(DEFAULT_VELOCITY+25, TURN_ON_SPOT);
     delay(500);
   }
   stop(SOFT);
   //TODO if is not all ok, call it recursively
-  emergency_mode=warning=false;
-  FL_edge=FR_edge=false;
+  emergency_mode = warning = false;
+  FL_edge = FR_edge = false;
   Serial.println("EMERGENCY ENDED");
   digitalWrite(LED_RED, LOW);
 }

SOFT = false;

// Motors definition
//Ch A = LEFT, Ch B = RIGHT
const int
PWM_LEFT   = 3,
DIR_LEFT   = 12,
BRAKE_LEFT = 9,
SNS_LEFT  = A0;
const int
PWM_RIGHT   = 11,
DIR_RIGHT   = 13,
BRAKE_RIGHT = 8,
SNS_RIGHT  = A1;

int
command,
param1,
param2,
lastCommand=CMD_STOP,
targetLeftVelocity = 0,
targetRightVelocity = 0,
currentLeftVelocity = 0,
currentRightVelocity= 0,
baseVelocity = 131,
velocityStep= 5;

long coldTimerStart;





// Start Accessory Descriptor. It's how Arduino identifies itself in Android.
char accessoryName[] = "UDOO Mobile Tank";

#define FL A5
#define FR A4

const bool
FORWARD = HIGH,
BACKWARD = LOW,
