Skip to content

Commit a5925e4

Browse files
committed
Add TEMPer2_M12_V1.3
1 parent 67d544d commit a5925e4

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

temperusb/device_library.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,11 @@ def __init__(
9494
hum_sens_offsets=None,
9595
type=TemperType.FM75,
9696
),
97+
"TEMPer2_M12_V1.3": TemperConfig(
98+
temp_sens_offsets=[2, 4],
99+
hum_sens_offsets=None,
100+
type=TemperType.FM75,
101+
),
97102
# The config used if the sensor type is not recognised.
98103
# If your sensor is working but showing as unrecognised, please
99104
# add a new entry above based on "generic_fm75" below, and submit

tests/test_temper.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,16 @@
6666
[32.1],
6767
None,
6868
],
69+
[
70+
"TEMPer2_M12_V1.3",
71+
0x0C45,
72+
0x7401,
73+
2,
74+
b"\x01\x80\x33\x01\x00\x00\x00\x00",
75+
b"\x00\x00\x20\x1A\x2B\x33", # 0x201A,0x2B33 converts to 32.1C, 43.2C (fm75)
76+
[32.1, 43.2],
77+
None,
78+
],
6979
[
7080
"TEMPer1F_V1.3", # Has 1 sensor at offset 4
7181
0x0C45,

0 commit comments

Comments
 (0)