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
+1 -1
View File
@@ -73,7 +73,7 @@ bool I2CBusIterator::next()
if (px4_i2c_bus_external(bus_data)) {
++_external_bus_counter;
if (_bus == _external_bus_counter || _bus == -1) {
if (_bus == bus_data.bus || _bus == -1) {
return true;
}
}