refactor ms5611: use driver base class

Also: remove device type auto-detection as it will not work with
together with the new SPI board config (which specifies a specific
device type)
This commit is contained in:
Beat Küng
2020-03-17 23:31:17 -04:00
committed by Daniel Agar
parent 22a38453ab
commit dbb53044ce
19 changed files with 144 additions and 298 deletions
+4 -1
View File
@@ -14,5 +14,8 @@ then
# It does not start EKF2 in the beginning which is strange behaviour. but 3 seconds hack.
# We intentionally put this initialization to here for delayed initialization.
sleep 4
ms5611 -T 0 -X start
if ! ms5611 -T 5607 -X start
then
ms5611 -X start
fi
fi
+4 -1
View File
@@ -6,7 +6,10 @@
adc start
# Internal SPI
ms5611 -T 0 -s start
if ! ms5611 -T 5607 -s start
then
ms5611 -s start
fi
# Draco-R
if param compare SYS_AUTOSTART 6002
+1
View File
@@ -45,6 +45,7 @@ constexpr px4_spi_bus_t px4_spi_buses[SPI_BUS_MAX_BUS_ITEMS] = {
initSPIBus(SPI::Bus::SPI2, {
initSPIDevice(SPIDEV_FLASH(0), SPI::CS{GPIO::PortD, GPIO::Pin10}),
initSPIDevice(DRV_BARO_DEVTYPE_MS5611, SPI::CS{GPIO::PortD, GPIO::Pin7}),
initSPIDevice(DRV_BARO_DEVTYPE_MS5607, SPI::CS{GPIO::PortD, GPIO::Pin7}),
}),
initSPIBusExternal(SPI::Bus::SPI4, {
SPI::CS{GPIO::PortA, GPIO::Pin8},