mirror of https://github.com/ArduPilot/ardupilot
HAL_F4Light: Fixed I2C initalization for Airspeed sensor on MatekF405CTR board
This commit is contained in:
parent
06da94dcea
commit
8cea9a3beb
|
@ -187,13 +187,16 @@ void I2CDevice::init(){
|
||||||
if(_dev) {
|
if(_dev) {
|
||||||
i2c_init(_dev, _offs, _slow?I2C_250KHz_SPEED:I2C_400KHz_SPEED);
|
i2c_init(_dev, _offs, _slow?I2C_250KHz_SPEED:I2C_400KHz_SPEED);
|
||||||
|
|
||||||
}else {
|
}else if (s_i2c){
|
||||||
s_i2c->init( );
|
s_i2c->init( );
|
||||||
|
|
||||||
if(_slow) {
|
if(_slow) {
|
||||||
s_i2c->set_low_speed(true);
|
s_i2c->set_low_speed(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else { // neither hardware nor software initalization was successful
|
||||||
|
return;
|
||||||
|
}
|
||||||
_initialized=true;
|
_initialized=true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue