mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-23 09:08:30 -04:00
Rover: added CLI_ENABLED parameter
This commit is contained in:
parent
3f906f6bd1
commit
b8ab87ea86
@ -1238,7 +1238,7 @@ static void gcs_update(void)
|
||||
for (uint8_t i=0; i<num_gcs; i++) {
|
||||
if (gcs[i].initialised) {
|
||||
#if CLI_ENABLED == ENABLED
|
||||
gcs[i].update(run_cli);
|
||||
gcs[i].update(g.cli_enabled==1?run_cli:NULL);
|
||||
#else
|
||||
gcs[i].update(NULL);
|
||||
#endif
|
||||
|
@ -70,6 +70,7 @@ public:
|
||||
k_param_serial2_baud_old,
|
||||
k_param_serial2_protocol, // deprecated, can be deleted
|
||||
k_param_serial_manager, // serial manager library
|
||||
k_param_cli_enabled,
|
||||
|
||||
//
|
||||
// 130: Sensor parameters
|
||||
@ -213,6 +214,9 @@ public:
|
||||
AP_Int16 sysid_my_gcs;
|
||||
AP_Int8 telem_delay;
|
||||
AP_Int8 skip_gyro_cal;
|
||||
#if CLI_ENABLED == ENABLED
|
||||
AP_Int8 cli_enabled;
|
||||
#endif
|
||||
|
||||
// sensor parameters
|
||||
AP_Int8 compass_enabled;
|
||||
|
@ -192,13 +192,15 @@ static void init_ardupilot()
|
||||
// the system in an odd state, we don't let the user exit the top
|
||||
// menu; they must reset in order to fly.
|
||||
//
|
||||
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);
|
||||
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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user