From b8ab87ea86ad09175705e79d77dde69d219c240e Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 9 Mar 2015 14:20:37 +1100 Subject: [PATCH] Rover: added CLI_ENABLED parameter --- APMrover2/GCS_Mavlink.pde | 2 +- APMrover2/Parameters.h | 4 ++++ APMrover2/system.pde | 16 +++++++++------- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/APMrover2/GCS_Mavlink.pde b/APMrover2/GCS_Mavlink.pde index 2c4f26510e..fa1a4769c5 100644 --- a/APMrover2/GCS_Mavlink.pde +++ b/APMrover2/GCS_Mavlink.pde @@ -1238,7 +1238,7 @@ static void gcs_update(void) for (uint8_t i=0; iprintln_P(msg); - if (gcs[1].initialised && (gcs[1].get_uart() != NULL)) { - gcs[1].get_uart()->println_P(msg); - } - if (num_gcs > 2 && gcs[2].initialised && (gcs[2].get_uart() != NULL)) { - gcs[2].get_uart()->println_P(msg); + if (g.cli_enabled == 1) { + const prog_char_t *msg = PSTR("\nPress ENTER 3 times to start interactive setup\n"); + cliSerial->println_P(msg); + if (gcs[1].initialised && (gcs[1].get_uart() != NULL)) { + gcs[1].get_uart()->println_P(msg); + } + if (num_gcs > 2 && gcs[2].initialised && (gcs[2].get_uart() != NULL)) { + gcs[2].get_uart()->println_P(msg); + } } #endif