// test_motorsync - suddenly increases pwm output to motors to test if ESC loses sync
staticint8_t
test_motorsync(uint8_targc,constMenu::arg*argv)
{
booltest_complete=false;
boolspin_motors=false;
uint32_tspin_start_time=0;
uint32_tlast_run_time;
int16_tlast_throttle=0;
int16_tc;
// check if radio is calibration
pre_arm_rc_checks();
if(!ap.pre_arm_rc_check){
cliSerial->print_P(PSTR("radio not calibrated\n"));
return0;
}
// print warning that motors will spin
// ask user to raise throttle
// inform how to stop test
cliSerial->print_P(PSTR("This sends sudden outputs to the motors based on the pilot's throttle to test for ESC loss of sync. Motors will spin so mount props up-side-down!\n Hold throttle low, then raise throttle stick to desired level and press A. Motors will spin for 2 sec and then return to low.\nPress any key to exit.\n"));