Merge pull request #482 from openmv/fix_temp

Fix temperature equation.
This commit is contained in:
Ibrahim Abd Elkader 2019-03-11 19:39:56 +02:00 committed by GitHub
commit 1383234122
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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: