diff --git a/lib/cyberpi/src/gyro/gyro.c b/lib/cyberpi/src/gyro/gyro.c index 3cb77d6..d337b06 100644 --- a/lib/cyberpi/src/gyro/gyro.c +++ b/lib/cyberpi/src/gyro/gyro.c @@ -12,11 +12,6 @@ static float acc_y_static = 0.0; static float acc_z_static = 0.0; bool gyro_init() { - uint8_t chip_id = i2c_read( MPU6887_ADDR, WHO_AM_I); - if(chip_id != MPU6887_DEVICE_ID) - { - return false; - } data_buf = (uint8_t*)malloc(14); acc_value = (int16_t*)malloc(6); gyro_value = (int16_t*)malloc(6); diff --git a/lib/cyberpi/src/i2c/i2c.c b/lib/cyberpi/src/i2c/i2c.c index b586c92..7a6f816 100644 --- a/lib/cyberpi/src/i2c/i2c.c +++ b/lib/cyberpi/src/i2c/i2c.c @@ -12,7 +12,7 @@ void i2c_init() gpio_config(&io_conf); int i2c_master_port = I2C_NUM_1; - i2c_config_t conf; + i2c_config_t conf = {0}; conf.mode = I2C_MODE_MASTER; conf.sda_io_num = I2C_MASTER_SDA_IO; conf.sda_pullup_en = 0;