Skip to content

Commit

Permalink
Add TEMPer2_M12_V1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
davet2001 committed Jan 9, 2025
1 parent 1ffb5ea commit 6a47e0a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
5 changes: 5 additions & 0 deletions temperusb/device_library.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,11 @@ def __init__(
hum_sens_offsets=None,
type=TemperType.FM75,
),
"TEMPer2_M12_V1.3": TemperConfig(
temp_sens_offsets=[2, 4],
hum_sens_offsets=None,
type=TemperType.FM75,
),
# The config used if the sensor type is not recognised.
# If your sensor is working but showing as unrecognised, please
# add a new entry above based on "generic_fm75" below, and submit
Expand Down
10 changes: 10 additions & 0 deletions tests/test_temper.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,16 @@
[32.1],
None,
],
[
"TEMPer2_M12_V1.3",
0x0C45,
0x7401,
2,
b"\x01\x80\x33\x01\x00\x00\x00\x00",
b"\x00\x00\x20\x1A\x2B\x33", # 0x201A,0x2B33 converts to 32.1C, 43.2C (fm75)
[32.1, 43.2],
None,
],
[
"TEMPer1F_V1.3", # Has 1 sensor at offset 4
0x0C45,
Expand Down

0 comments on commit 6a47e0a

Please sign in to comment.