mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-23 05:13:34 +08:00
@@ -555,13 +555,15 @@ void VDev::showDevices()
|
|||||||
std::string devname;
|
std::string devname;
|
||||||
unsigned int index = 0;
|
unsigned int index = 0;
|
||||||
i = 0;
|
i = 0;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
// Each look increments index and returns -1 if end reached
|
// Each look increments index and returns -1 if end reached
|
||||||
i = DevMgr::getNextDeviceName(index, devname);
|
i = DevMgr::getNextDeviceName(index, devname);
|
||||||
|
|
||||||
if (i == 0) {
|
if (i == 0) {
|
||||||
PX4_INFO(" %s", devname.c_str());
|
PX4_INFO(" %s", devname.c_str());
|
||||||
}
|
}
|
||||||
} while (i==0);
|
} while (i == 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void VDev::showTopics()
|
void VDev::showTopics()
|
||||||
|
|||||||
@@ -135,9 +135,11 @@ int Simulator::start(int argc, char *argv[])
|
|||||||
// Update sensor data
|
// Update sensor data
|
||||||
_instance->pollForMAVLinkMessages(false);
|
_instance->pollForMAVLinkMessages(false);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
} else if (argv[2][1] == 'p') {
|
} else if (argv[2][1] == 'p') {
|
||||||
// Update sensor data
|
// Update sensor data
|
||||||
_instance->pollForMAVLinkMessages(true);
|
_instance->pollForMAVLinkMessages(true);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
_instance->initializeSensorData();
|
_instance->initializeSensorData();
|
||||||
_instance->_initialized = true;
|
_instance->_initialized = true;
|
||||||
@@ -170,7 +172,7 @@ extern "C" {
|
|||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
if (argc == 3 && strcmp(argv[1], "start") == 0) {
|
if (argc == 3 && strcmp(argv[1], "start") == 0) {
|
||||||
if (strcmp(argv[2], "-s") == 0 ||
|
if (strcmp(argv[2], "-s") == 0 ||
|
||||||
strcmp(argv[2], "-p") == 0 ||
|
strcmp(argv[2], "-p") == 0 ||
|
||||||
strcmp(argv[2], "-t") == 0) {
|
strcmp(argv[2], "-t") == 0) {
|
||||||
if (g_sim_task >= 0) {
|
if (g_sim_task >= 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user