mbb? 응답 시 TMP235 → IMU Temp 변경
This commit is contained in:
+2
-12
@@ -1046,23 +1046,13 @@ static int cmd_mbb(const uint8_t *data, uint8_t data_len)
|
||||
|
||||
if (status == ECHO_STATUS_OK)
|
||||
{
|
||||
DBG_PRINTF("[MBB] imu read\r\n");
|
||||
if (imu_read(accel, gyro) != 0)
|
||||
DBG_PRINTF("[MBB] imu/temp read\r\n");
|
||||
if (imu_read_with_temperature(accel, gyro, &temp_cdeg) != 0)
|
||||
{
|
||||
status = ECHO_STATUS_IMU;
|
||||
}
|
||||
}
|
||||
|
||||
if (status == ECHO_STATUS_OK)
|
||||
{
|
||||
DBG_PRINTF("[MBB] temp read\r\n");
|
||||
temp_cdeg = temp_read_cdeg();
|
||||
if (temp_cdeg == INT16_MIN)
|
||||
{
|
||||
status = ECHO_STATUS_TEMP;
|
||||
}
|
||||
}
|
||||
|
||||
if (status == ECHO_STATUS_OK)
|
||||
{
|
||||
/* rbb: 센서(배터리+IMU+온도) 정보 패킷 */
|
||||
|
||||
Reference in New Issue
Block a user