i2c: use board-specific bus numbering for '-X -b <bus>' CLI

As boards don't have their external buses labeled consistently, it was not
useful to use an abstraction.
This commit is contained in:
Beat Küng
2020-09-03 15:32:35 -04:00
committed by Daniel Agar
parent fdcd9b2de1
commit 787f9c1213
8 changed files with 9 additions and 15 deletions
+2 -8
View File
@@ -504,14 +504,8 @@ int I2CSPIDriverBase::module_start(const BusCLIArguments &cli, BusInstanceIterat
// print some info that we are running
switch (iterator.busType()) {
case BOARD_I2C_BUS:
PX4_INFO_RAW("%s #%i on I2C bus %d", instance->ItemName(), runtime_instance, iterator.bus());
if (iterator.external()) {
PX4_INFO_RAW(" (external, equal to '-b %i')\n", iterator.externalBusIndex());
} else {
PX4_INFO_RAW("\n");
}
PX4_INFO_RAW("%s #%i on I2C bus %d%s\n", instance->ItemName(), runtime_instance, iterator.bus(),
iterator.external() ? " (external)" : "");
break;