mirror of https://github.com/ArduPilot/ardupilot
AP_HAL_SITL: flush data from select call as we don't wait select in AP_Periph
This commit is contained in:
parent
ed3683fce3
commit
0d41db5520
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue