mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-22 08:38:36 -04:00
Copter: delay up to 2sec for first radio pulse
Pixracer boards can take 1 second (or possibly longer) to start reading RC input. This ensure we see the user's high throttle to indicate the user wants to perform the ESC calibration
This commit is contained in:
parent
855125381d
commit
a25f51c893
@ -55,7 +55,9 @@ void Copter::init_rc_out()
|
|||||||
motors->set_throttle_range(channel_throttle->get_radio_min(), channel_throttle->get_radio_max());
|
motors->set_throttle_range(channel_throttle->get_radio_min(), channel_throttle->get_radio_max());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
for(uint8_t i = 0; i < 5; i++) {
|
// delay up to 2 second for first radio input
|
||||||
|
uint8_t i = 0;
|
||||||
|
while ((i++ < 100) && (last_radio_update_ms == 0)) {
|
||||||
delay(20);
|
delay(20);
|
||||||
read_radio();
|
read_radio();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user