mirror of https://github.com/ArduPilot/ardupilot
Rover: added shell command in CLI test menu
This commit is contained in:
parent
ae96c77add
commit
89c85f9c5a
|
@ -20,6 +20,9 @@ static int8_t test_sonar(uint8_t argc, const Menu::arg *argv);
|
|||
static int8_t test_mag(uint8_t argc, const Menu::arg *argv);
|
||||
static int8_t test_modeswitch(uint8_t argc, const Menu::arg *argv);
|
||||
static int8_t test_logging(uint8_t argc, const Menu::arg *argv);
|
||||
#if CONFIG_HAL_BOARD == HAL_BOARD_PX4
|
||||
static int8_t test_shell(uint8_t argc, const Menu::arg *argv);
|
||||
#endif
|
||||
|
||||
// Creates a constant array of structs representing menu options
|
||||
// and stores them in Flash memory, not RAM.
|
||||
|
@ -53,7 +56,9 @@ static const struct Menu::command test_menu_commands[] PROGMEM = {
|
|||
#elif HIL_MODE == HIL_MODE_ATTITUDE
|
||||
#endif
|
||||
{"logging", test_logging},
|
||||
|
||||
#if CONFIG_HAL_BOARD == HAL_BOARD_PX4
|
||||
{"shell", test_shell},
|
||||
#endif
|
||||
};
|
||||
|
||||
// A Macro to create the Menu
|
||||
|
@ -565,4 +570,16 @@ test_sonar(uint8_t argc, const Menu::arg *argv)
|
|||
return (0);
|
||||
}
|
||||
|
||||
#if CONFIG_HAL_BOARD == HAL_BOARD_PX4
|
||||
/*
|
||||
* run a debug shell
|
||||
*/
|
||||
static int8_t
|
||||
test_shell(uint8_t argc, const Menu::arg *argv)
|
||||
{
|
||||
hal.util->run_debug_shell(cliSerial);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CLI_ENABLED
|
||||
|
|
Loading…
Reference in New Issue