src/domain/measurements.py
BeforeProposed
+2−2
3737
3838
3939def calibrate(row, unit, item):
40 raw = row['raw'] * item['gain'] + item['offset']
41 corrected = celsius(raw, unit)
40 raw = celsius(row['raw'], unit)
41 corrected = raw * item['gain'] + item['offset']
4242 valid = item['lower'] <= corrected <= item['upper']
4343 return {
4444 'id': row['id'],