AP_HAL_PX4: Map PX4_I2C_BUS_EXPANSION1

This commit is contained in:
José Roberto de Souza 2017-04-19 13:13:39 -07:00 committed by Lucas De Marchi
parent e674d6ee20
commit 9ee007f924
2 changed files with 8 additions and 2 deletions

View File

@ -53,7 +53,13 @@ uint8_t PX4_I2C::map_bus_number(uint8_t bus) const
#else #else
return 1; return 1;
#endif #endif
case 2:
// map to expansion bus 2
#ifdef PX4_I2C_BUS_EXPANSION1
return PX4_I2C_BUS_EXPANSION1;
#else
return 2;
#endif
} }
// default to bus 1 // default to bus 1
return 1; return 1;

View File

@ -70,7 +70,7 @@ public:
} }
private: private:
static const uint8_t num_buses = 2; static const uint8_t num_buses = 3;
static DeviceBus businfo[num_buses]; static DeviceBus businfo[num_buses];
uint8_t _busnum; uint8_t _busnum;