diff --git a/libraries/AP_HAL_SITL/CANSocketIface.cpp b/libraries/AP_HAL_SITL/CANSocketIface.cpp index 5dea3e94d6..d9b04ef6f0 100644 --- a/libraries/AP_HAL_SITL/CANSocketIface.cpp +++ b/libraries/AP_HAL_SITL/CANSocketIface.cpp @@ -469,6 +469,8 @@ bool CANIface::select(bool &read_select, bool &write_select, { // Detecting whether we need to block at all bool need_block = !write_select; // Write queue is infinite + // call poll here to flush some tx + _poll(true, true); if (read_select && _hasReadyRx()) { need_block = false; diff --git a/libraries/AP_HAL_SITL/Util.h b/libraries/AP_HAL_SITL/Util.h index 809c131626..dacb7badf8 100644 --- a/libraries/AP_HAL_SITL/Util.h +++ b/libraries/AP_HAL_SITL/Util.h @@ -57,6 +57,7 @@ public: #if !defined(HAL_BUILD_AP_PERIPH) enum safety_state safety_switch_state(void) override; + void set_cmdline_parameters() override; #endif bool trap() const override { @@ -70,7 +71,6 @@ public: #endif } - void set_cmdline_parameters() override; private: SITL_State *sitlState;