mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-19 07:33:33 +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);
|
||||
|
||||
@@ -56,6 +56,7 @@
|
||||
#define SDP3X_RESET_ADDR 0x00
|
||||
#define SDP3X_RESET_CMD 0x06
|
||||
#define SDP3X_CONT_MEAS_AVG_MODE 0x3615
|
||||
#define SDP3X_CONT_MODE_STOP 0x3FF9
|
||||
|
||||
#define SDP3X_SCALE_PRESSURE_SDP31 60
|
||||
#define SDP3X_SCALE_PRESSURE_SDP32 240
|
||||
|
||||
Reference in New Issue
Block a user