mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-24 07:13:33 +08:00
differential_pressure drivers: allow multiple instances of each driver
- the device path needs to be removed, as startup fails if it already exists - sdp3x broadcasts a reset on startup, so do it only for the first I2C address
This commit is contained in:
@@ -56,8 +56,8 @@
|
||||
|
||||
#include <drivers/airspeed/airspeed.h>
|
||||
|
||||
Airspeed::Airspeed(int bus, int bus_frequency, int address, unsigned conversion_interval, const char *path) :
|
||||
I2C("Airspeed", path, bus, address, bus_frequency),
|
||||
Airspeed::Airspeed(int bus, int bus_frequency, int address, unsigned conversion_interval) :
|
||||
I2C("Airspeed", nullptr, bus, address, bus_frequency),
|
||||
_sensor_ok(false),
|
||||
_measure_interval(conversion_interval),
|
||||
_collect_phase(false),
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
class __EXPORT Airspeed : public device::I2C
|
||||
{
|
||||
public:
|
||||
Airspeed(int bus, int bus_frequency, int address, unsigned conversion_interval, const char *path);
|
||||
Airspeed(int bus, int bus_frequency, int address, unsigned conversion_interval);
|
||||
virtual ~Airspeed();
|
||||
|
||||
int init() override;
|
||||
|
||||
Reference in New Issue
Block a user