sdp3x: stop continuous measurement while reconfig

This commit is contained in:
Igor Mišić
2021-09-23 09:22:09 +02:00
committed by Beat Küng
parent 3a148bc777
commit 92696b589f
2 changed files with 7 additions and 1 deletions
@@ -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);