File tree Expand file tree Collapse file tree 1 file changed +2
-11
lines changed
drivers/sensor/bosch/bmi323 Expand file tree Collapse file tree 1 file changed +2
-11
lines changed Original file line number Diff line number Diff line change @@ -108,15 +108,6 @@ static void bosch_bmi323_value_to_sensor_value(struct sensor_value *result, int1
108108 result -> val2 = frac_part ;
109109}
110110
111- static void bosch_bmi323_sensor_value_from_micro (struct sensor_value * result , int64_t micro )
112- {
113- int32_t int_part = (int32_t )(micro / 1000000 );
114- int32_t frac_part = (int32_t )(micro % 1000000 );
115-
116- result -> val1 = int_part ;
117- result -> val2 = frac_part ;
118- }
119-
120111static bool bosch_bmi323_value_is_valid (int16_t value )
121112{
122113 return ((uint16_t )value == 0x8000 ) ? false : true;
@@ -995,9 +986,9 @@ static int bosch_bmi323_driver_api_fetch_temperature(const struct device *dev)
995986
996987 micro += IMU_BOSCH_DIE_TEMP_OFFSET_MICRO_DEG_CELSIUS ;
997988
998- bosch_bmi323_sensor_value_from_micro (& data -> temperature , micro );
989+ ret = sensor_value_from_micro (& data -> temperature , micro );
999990
1000- data -> temperature_valid = true ;
991+ data -> temperature_valid = ( ret == 0 ) ;
1001992
1002993 return 0 ;
1003994}
You can’t perform that action at this time.
0 commit comments