Change output from 490hz to 50hz in Automatic ESC calibration
Automatic ESC calibration output rate needs to be change from 490hz to 50hz. In some ESC calibrating at 490hz result in recording wrong low end point.
+1 To calibrate my Simonk ESCs, I need to lower Throttle very fast.
Just add in radio.pde
// Set 50Hz PWM rate
motors.set_update_rate(50);
before output_min() at this block
}else{
// did we abort the calibration?
if(g.esc_calibrate == 1)
g.esc_calibrate.set_and_save(0);
// Set 50Hz PWM rate
motors.set_update_rate(50);
// send miinimum throttle out to ESC
output_min();
}
Code checked on 2.9, works fine with my Simonk ESC
Thanks for the report and code snippit.
SirAlex, Are you sure we should slow it down at that point? It seems to me that you'll end up with a 50hz motor rate when you haven't done the ESC calibration. I think we should instead put it into the init_esc() function in setup.pde. I've made this change in trunk...maybe someone could give it a try?
Sorry, Actually I'm added code there:
}else{
cliSerial->printf_P(PSTR("ESC Calibration active: passing throttle through to ESCs.\n"));
// clear esc flag
g.esc_calibrate.set_and_save(0);
// Set 50Hz PWM
motors.set_update_rate(50);
// block until we restart
init_esc();
}
Yes, your code changes must work, but I'm not tested it.
Ah, excellent. should be equivalent to what i've checked into master so we should be good for 2.9.1. txs again.
Confirming closed, works as intented.