mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-19 03:33:34 +08:00
boards/platform: remove confusing override
This removes the odd px4_i2c_bus_external override which was confusing me and lead to odd and inconsistent results. The function is now only available with an int as the argument.
This commit is contained in:
@@ -47,14 +47,14 @@ constexpr px4_i2c_bus_t px4_i2c_buses[I2C_BUS_MAX_BUS_ITEMS] = {
|
||||
};
|
||||
|
||||
|
||||
bool px4_i2c_bus_external(const px4_i2c_bus_t &bus)
|
||||
bool px4_i2c_bus_external(int bus)
|
||||
{
|
||||
if (HW_VER_FMUV3 == board_get_hw_version()) {
|
||||
/* All FMUV3 2.1 i2c buses are external */
|
||||
return true;
|
||||
|
||||
} else {
|
||||
if (bus.bus != 2) {
|
||||
if (bus != 2) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,14 +47,14 @@ constexpr px4_i2c_bus_t px4_i2c_buses[I2C_BUS_MAX_BUS_ITEMS] = {
|
||||
};
|
||||
|
||||
|
||||
bool px4_i2c_bus_external(const px4_i2c_bus_t &bus)
|
||||
bool px4_i2c_bus_external(int bus)
|
||||
{
|
||||
if (HW_VER_FMUV3 == board_get_hw_version()) {
|
||||
/* All FMUV3 2.1 i2c buses are external */
|
||||
return true;
|
||||
|
||||
} else {
|
||||
if (bus.bus != 2) {
|
||||
if (bus != 2) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user