i2c_spi_buses: print an error if a driver does not pass the I2C address

This commit is contained in:
Beat Küng 2020-03-30 16:49:20 +02:00 committed by Daniel Agar
parent 82c7908a2d
commit a556a44a57
1 changed files with 4 additions and 0 deletions

View File

@ -476,6 +476,10 @@ int I2CSPIDriverBase::module_start(const BusCLIArguments &cli, BusInstanceIterat
continue;
}
if (cli.i2c_address != 0 && instance->_i2c_address == 0) {
PX4_ERR("Bug: driver %s does not pass the I2C address to I2CSPIDriverBase", instance->ItemName());
}
iterator.addInstance(instance);
started = true;