mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-01 02:55:07 +08:00
mavlink hil: add HIL_CONTROLS publication for compatibility (eg. with mavros)
This commit is contained in:
@@ -852,12 +852,14 @@ Mavlink::set_hil_enabled(bool hil_enabled)
|
|||||||
if (hil_enabled && !_hil_enabled) {
|
if (hil_enabled && !_hil_enabled) {
|
||||||
_hil_enabled = true;
|
_hil_enabled = true;
|
||||||
configure_stream("HIL_ACTUATOR_CONTROLS", 200.0f);
|
configure_stream("HIL_ACTUATOR_CONTROLS", 200.0f);
|
||||||
|
configure_stream("HIL_CONTROLS", 200.0f); //for compatibility, publish the old message as well
|
||||||
}
|
}
|
||||||
|
|
||||||
/* disable HIL */
|
/* disable HIL */
|
||||||
if (!hil_enabled && _hil_enabled) {
|
if (!hil_enabled && _hil_enabled) {
|
||||||
_hil_enabled = false;
|
_hil_enabled = false;
|
||||||
configure_stream("HIL_ACTUATOR_CONTROLS", 0.0f);
|
configure_stream("HIL_ACTUATOR_CONTROLS", 0.0f);
|
||||||
|
configure_stream("HIL_CONTROLS", 0.0f);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
ret = ERROR;
|
ret = ERROR;
|
||||||
|
|||||||
Reference in New Issue
Block a user