mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-06-30 09:10:35 +08:00
Create Simulator::set_publish() method and Simulator::_publish member variable to allow redefinition of the Simulator::handle_message() prototype to match MavlinkReceiver::handle_message().
This commit is contained in:
@@ -163,12 +163,13 @@ int Simulator::start(int argc, char *argv[])
|
||||
_instance->initialize_sensor_data();
|
||||
#ifndef __PX4_QURT
|
||||
// Update sensor data
|
||||
_instance->poll_for_MAVLink_messages(false);
|
||||
_instance->poll_for_MAVLink_messages();
|
||||
#endif
|
||||
|
||||
} else if (argv[2][1] == 'p') {
|
||||
// Update sensor data
|
||||
_instance->poll_for_MAVLink_messages(true);
|
||||
_instance->set_publish(true);
|
||||
_instance->poll_for_MAVLink_messages();
|
||||
|
||||
} else {
|
||||
_instance->initialize_sensor_data();
|
||||
|
||||
Reference in New Issue
Block a user