mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-09 17:38:32 -04:00
Plane: added shell command for px4
used to launch nsh for PX4IO firmware upgrades
This commit is contained in:
parent
e45b137816
commit
c41b927a15
@ -24,6 +24,9 @@ static int8_t test_eedump(uint8_t argc, const Menu::arg *argv);
|
|||||||
static int8_t test_rawgps(uint8_t argc, const Menu::arg *argv);
|
static int8_t test_rawgps(uint8_t argc, const Menu::arg *argv);
|
||||||
static int8_t test_modeswitch(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);
|
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
|
// Creates a constant array of structs representing menu options
|
||||||
// and stores them in Flash memory, not RAM.
|
// and stores them in Flash memory, not RAM.
|
||||||
@ -60,6 +63,9 @@ static const struct Menu::command test_menu_commands[] PROGMEM = {
|
|||||||
#elif HIL_MODE == HIL_MODE_ATTITUDE
|
#elif HIL_MODE == HIL_MODE_ATTITUDE
|
||||||
#endif
|
#endif
|
||||||
{"logging", test_logging},
|
{"logging", test_logging},
|
||||||
|
#if CONFIG_HAL_BOARD == HAL_BOARD_PX4
|
||||||
|
{"shell", test_shell},
|
||||||
|
#endif
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -406,6 +412,18 @@ test_logging(uint8_t argc, const Menu::arg *argv)
|
|||||||
return 0;
|
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
|
||||||
|
|
||||||
//-------------------------------------------------------------------------------------------
|
//-------------------------------------------------------------------------------------------
|
||||||
// tests in this section are for real sensors or sensors that have been simulated
|
// tests in this section are for real sensors or sensors that have been simulated
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user