diff --git a/error_sdr/error_sdr.h b/error_sdr/error_sdr.h index 1fdb8b7..619e6b2 100644 --- a/error_sdr/error_sdr.h +++ b/error_sdr/error_sdr.h @@ -115,6 +115,7 @@ typedef enum _ERROR_CODE ERROR_LORA_CMD_ERROR , /* Error with LoRa command */ ERROR_IMU_I2C_ERROR , /* Error with IMU I2C handle */ ERROR_BARO_I2C_ERROR , /* Error with Baro I2C handle */ + ERROR_BARO_INVALID_STATE_ERROR , /* Invalid state reached with baro FSM */ } ERROR_CODE; /* Error callback table entry */ diff --git a/sensor/sensor.c b/sensor/sensor.c index 68a4d72..0b15bb5 100644 --- a/sensor/sensor.c +++ b/sensor/sensor.c @@ -235,7 +235,7 @@ sensor_data_ptr->gps_rmc_status = gps_data.rmc_status; imu_status = get_imu_it( &imu_raw ); /* Baro Read */ -baro_status = get_baro_it( &(sensor_data_ptr->baro_pressure), &(sensor_data_ptr->baro_temp) ); +baro_status = baro_get_IT( &(sensor_data_ptr->baro_pressure), &(sensor_data_ptr->baro_temp) ); /*Compute State Estimations*/ @@ -588,7 +588,7 @@ if( start_imu_read_IT() != IMU_OK ) { return SENSOR_IMU_FAIL; } -if( start_baro_read_IT() != BARO_OK ) +if( baro_start_read_IT() != BARO_OK ) { return SENSOR_BARO_ERROR; } @@ -794,4 +794,4 @@ imu_data->imu_converted.mag_z = mag_z; /******************************************************************************* * END OF FILE * -*******************************************************************************/ \ No newline at end of file +*******************************************************************************/