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:
Beat Küng
2020-03-17 23:31:17 -04:00
committed by Daniel Agar
parent 3b7b2dc871
commit 68ef14002a
7 changed files with 29 additions and 35 deletions
+2 -2
View File
@@ -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),