Skip to content

Commit 35e3b1a

Browse files
committed
tests: Add 25C empirical offset to LIS2MDL in temperature comparison.
1 parent 0b5d148 commit 35e3b1a

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

tests/scenarios/board_temperature_comparison.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,10 @@ tests:
4848
temps['WSEN-PADS'] = pads.temperature()
4949
5050
# LIS2MDL (auxiliary, offset not guaranteed by datasheet)
51+
# Add 25°C empirical offset (raw value has no guaranteed zero point)
5152
from lis2mdl.device import LIS2MDL
5253
mag = LIS2MDL(i2c)
53-
temps['LIS2MDL'] = mag.read_temperature_c()
54+
temps['LIS2MDL'] = 25.0 + mag.read_temperature_raw() / 8.0
5455
5556
# Print comparison table
5657
print('--- Temperature Comparison ---')

0 commit comments

Comments
 (0)