42 #ifndef DRIVERS_SDP3X_AIRSPEED_HPP_ 43 #define DRIVERS_SDP3X_AIRSPEED_HPP_ 48 #include <px4_platform_common/getopt.h> 50 #define I2C_ADDRESS_1_SDP3X 0x21 51 #define I2C_ADDRESS_2_SDP3X 0x22 52 #define I2C_ADDRESS_3_SDP3X 0x23 54 #define SDP3X_SCALE_TEMPERATURE 200.0f 55 #define SDP3X_RESET_ADDR 0x00 56 #define SDP3X_RESET_CMD 0x06 57 #define SDP3X_CONT_MEAS_AVG_MODE 0x3615 59 #define SDP3X_SCALE_PRESSURE_SDP31 60 60 #define SDP3X_SCALE_PRESSURE_SDP32 240 61 #define SDP3X_SCALE_PRESSURE_SDP33 20 63 #define PATH_SDP3X "/dev/sdp3x" 66 #define SPD3X_MEAS_RATE 100 67 #define SDP3X_MEAS_DRIVER_FILTER_FREQ 3.0f 68 #define CONVERSION_INTERVAL (1000000 / SPD3X_MEAS_RATE) 96 bool crc(
const uint8_t
data[],
unsigned size, uint8_t checksum);
SDP3X(int bus, int address=I2C_ADDRESS_1_SDP3X, const char *path=PATH_SDP3X)
#define I2C_ADDRESS_1_SDP3X
int write_command(uint16_t command)
Write a command in Sensirion specific logic.
#define SDP3X_MEAS_DRIVER_FILTER_FREQ
bool crc(const uint8_t data[], unsigned size, uint8_t checksum)
Calculate the CRC8 for the sensor payload data.
#define CONVERSION_INTERVAL
math::LowPassFilter2p _filter
void Run() override
Perform a poll cycle; collect from the previous measurement and start a new one.