mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-24 15:23:35 +08:00
sdp3x: stop continuous measurement while reconfig
This commit is contained in:
@@ -72,7 +72,12 @@ SDP3X::init_sdp3x()
|
||||
int
|
||||
SDP3X::configure()
|
||||
{
|
||||
int ret = write_command(SDP3X_CONT_MEAS_AVG_MODE);
|
||||
int ret = write_command(SDP3X_CONT_MODE_STOP);
|
||||
|
||||
if (ret == PX4_OK) {
|
||||
px4_udelay(500); // SDP3X is unresponsive for 500us after stop continuous measurement command
|
||||
ret = write_command(SDP3X_CONT_MEAS_AVG_MODE);
|
||||
}
|
||||
|
||||
if (ret != PX4_OK) {
|
||||
perf_count(_comms_errors);
|
||||
|
||||
Reference in New Issue
Block a user