Do not uncomment this line and power the multirotor with main li-po.
/********************************************************************/
/**** ESCs calibration ****/
/********************************************************************/
//#define ESC_CALIB_CANNOT_FLY // uncomment to activate
My quad was disarmed and powered by LiPo. After uploading the code with calibration code uncommented, all engines screamed to maximum and quad slammed into wall. In the meantime one propeller cut my left arm in several places.
The calibration procedure is wrong because the reset is applied only to flight controller and not to ESC's.
After cleaning the mess, my solution to calibrate ESC's was to power the FC and ESC with 5v only from my ftdi and in this way, all controllers (ESC and main FC) were initialised on power-up for calibration procedure.