SITL: correct compilation when AP_SIM_IS31FL3195_ENABLED off

object won't exist in that case
This commit is contained in:
Peter Barker 2023-06-17 12:54:48 +10:00 committed by Peter Barker
parent e30cc65f14
commit 5791aea3fc

View File

@ -117,8 +117,10 @@ void I2C::init()
i.device.init();
}
#if AP_SIM_IS31FL3195_ENABLED
// IS31FL3195 needs to know its own address:
is31fl3195.set_product_id(SIM_IS31FL3195_ADDR);
#endif
// sanity check the i2c_devices structure to ensure we don't have
// two devices at the same address on the same bus: