mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-25 00:23:35 +08:00
board support add px4_i2c_bus_external/px4_spi_bus_external
This commit is contained in:
committed by
Lorenz Meier
parent
2aeb4aa55f
commit
53595bac0e
@@ -174,13 +174,6 @@ protected:
|
||||
*/
|
||||
void cycle();
|
||||
|
||||
/**
|
||||
* Get the internal / external state
|
||||
*
|
||||
* @return true if the sensor is not on the main MCU board
|
||||
*/
|
||||
bool is_external() { return (_orb_class_instance == 0); /* XXX put this into the interface class */ }
|
||||
|
||||
/**
|
||||
* Static trampoline from the workq context; because we don't have a
|
||||
* generic workq wrapper yet.
|
||||
@@ -324,7 +317,7 @@ MPL3115A2::init()
|
||||
ret = OK;
|
||||
|
||||
_baro_topic = orb_advertise_multi(ORB_ID(sensor_baro), &brp,
|
||||
&_orb_class_instance, (is_external()) ? ORB_PRIO_HIGH : ORB_PRIO_DEFAULT);
|
||||
&_orb_class_instance, (external()) ? ORB_PRIO_HIGH : ORB_PRIO_DEFAULT);
|
||||
|
||||
if (_baro_topic == nullptr) {
|
||||
warnx("failed to create sensor_baro publication");
|
||||
|
||||
@@ -107,7 +107,7 @@ int
|
||||
MPL3115A2_I2C::init()
|
||||
{
|
||||
/* this will call probe() */
|
||||
set_address(MPL3115A2_ADDRESS);
|
||||
set_device_address(MPL3115A2_ADDRESS);
|
||||
return I2C::init();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user