mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-22 01:12:31 +00:00
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:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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},
|
||||
|
||||
Reference in New Issue
Block a user