Skip to content

Commit

Permalink
Merge pull request openmv#482 from openmv/fix_temp
Browse files Browse the repository at this point in the history
Fix temperature equation.
  • Loading branch information
iabdalkader authored Mar 11, 2019
2 parents 7c5c5cf + 960e61a commit 1383234
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/omv/py/py_sensor.c
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ static mp_obj_t py_sensor_ioctl(uint n_args, const mp_obj_t *args)
if (sensor_ioctl(request, &temp) != 0) {
nlr_raise(mp_obj_new_exception_msg(&mp_type_ValueError, "Sensor control failed!"));
}
ret_obj = mp_obj_new_int(temp);
ret_obj = mp_obj_new_float((((float) temp) / 100) - 273.15f);
}

case IOCTL_LEPTON_SET_MEASUREMENT_MODE:
Expand Down

0 comments on commit 1383234

Please sign in to comment.