mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-11-27 01:50:34 +08:00
i2c_spi_buses: print an error if a driver does not pass the I2C address
This commit is contained in:
1 parent
82c7908a2d
commit
a556a44a57
1 file changed
+4
@@ -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;
|
||||
|
||||
|
||||
Reference in new issue
Block a user