added flush packets to disable_report(), passes all tests

This commit is contained in:
myles-parfeniuk 2024-11-18 11:46:30 -08:00
parent 2429f109ad
commit 282ddf5fa5
1 changed files with 3 additions and 1 deletions

View File

@ -1056,7 +1056,7 @@ void BNO08x::enable_report(uint8_t report_ID, uint32_t time_between_reports, con
} }
// flush the first few reports returned to ensure new data // flush the first few reports returned to ensure new data
flush_rx_packets(2); flush_rx_packets(3);
} }
/** /**
@ -1105,6 +1105,8 @@ void BNO08x::disable_report(uint8_t report_ID, const EventBits_t report_evt_grp_
host_int_timeout_ms = HOST_INT_TIMEOUT_DEFAULT_MS; host_int_timeout_ms = HOST_INT_TIMEOUT_DEFAULT_MS;
gpio_intr_disable(imu_config.io_int); gpio_intr_disable(imu_config.io_int);
} }
flush_rx_packets(2);
} }
} }