mavlink: don't publish HIL_CONTROLS in HIL mode

it generates unnecessary load. If really needed, it can still be enabled
manually.
This commit is contained in:
Beat Küng 2016-10-20 16:05:59 +02:00 committed by Lorenz Meier
parent 3fda48517d
commit 7415d94e12
1 changed files with 0 additions and 2 deletions

View File

@ -849,14 +849,12 @@ Mavlink::set_hil_enabled(bool hil_enabled)
if (hil_enabled && !_hil_enabled) {
_hil_enabled = true;
configure_stream("HIL_ACTUATOR_CONTROLS", 200.0f);
configure_stream("HIL_CONTROLS", 200.0f); //for compatibility, publish the old message as well
}
/* disable HIL */
if (!hil_enabled && _hil_enabled) {
_hil_enabled = false;
configure_stream("HIL_ACTUATOR_CONTROLS", 0.0f);
configure_stream("HIL_CONTROLS", 0.0f);
} else {
ret = PX4_ERROR;