Copter: only allow CLI within 20s of startup and when motors not armed

This commit is contained in:
Andrew Tridgell 2013-03-21 17:34:11 +11:00
parent 6ddb99a50b
commit ce8313e8fb

View File

@ -868,7 +868,7 @@ GCS_MAVLINK::update(void)
#if CLI_ENABLED == ENABLED
/* allow CLI to be started by hitting enter 3 times, if no
* heartbeat packets have been received */
if (mavlink_active == 0 && (millis() - _cli_timeout) < 30000) {
if (mavlink_active == 0 && (millis() - _cli_timeout) < 20000 && !motors.armed()) {
if (c == '\n' || c == '\r') {
crlf_count++;
} else {