Fix PTC calculation (#18265)

This commit is contained in:
rudihorn 2020-06-12 02:46:25 +01:00 committed by GitHub
parent 2ddd7d2d8d
commit eef2931150
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -179,7 +179,7 @@ float ProbeTempComp::get_offset_for_temperature(const TempSensorID tsi, const fl
};
// Linear interpolation
uint8_t idx = static_cast<uint8_t>(temp - start_temp / res_temp);
uint8_t idx = static_cast<uint8_t>((temp - start_temp) / res_temp);
// offset in um
float offset = 0.0f;