Skip to content

Commit 25708de

Browse files
authored
Merge branch 'master' into python312
2 parents 403bb0e + 5b12605 commit 25708de

File tree

5 files changed

+30
-2
lines changed

5 files changed

+30
-2
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
runs-on: ubuntu-latest
88
strategy:
99
matrix:
10-
python-version: ["3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
10+
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
1111
steps:
1212
- uses: actions/checkout@v2
1313
- name: Set up Python ${{ matrix.python-version }}

etc/99-tempsensor.rules

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
SUBSYSTEMS=="usb", ACTION=="add", ATTRS{idVendor}=="0c45", ATTRS{idProduct}=="7401", MODE="666"
22
SUBSYSTEMS=="usb", ACTION=="add", ATTRS{idVendor}=="0c45", ATTRS{idProduct}=="7402", MODE="666"
3+
SUBSYSTEMS=="usb", ACTION=="add", ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="e025", MODE="666"

temperusb/device_library.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,11 @@ def __init__(
5959
hum_sens_offsets=[4],
6060
type=TemperType.SI7021,
6161
),
62+
"TEMPerHumiV1.0": TemperConfig(
63+
temp_sens_offsets=[2],
64+
hum_sens_offsets=[4],
65+
type=TemperType.FM75,
66+
),
6267
"TEMPerHumiV1.1": TemperConfig(
6368
temp_sens_offsets=[2],
6469
hum_sens_offsets=[4],
@@ -79,6 +84,11 @@ def __init__(
7984
hum_sens_offsets=None,
8085
type=TemperType.FM75,
8186
),
87+
"TEMPer2_V3.7": TemperConfig(
88+
temp_sens_offsets=[2, 10],
89+
hum_sens_offsets=None,
90+
type=TemperType.FM75,
91+
),
8292
"TEMPer2V1.4": TemperConfig(
8393
temp_sens_offsets=[2],
8494
hum_sens_offsets=None,

temperusb/temper.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
VIDPIDS = [
2020
(0x0c45, 0x7401),
2121
(0x0c45, 0x7402),
22+
(0x1a86, 0xe025),
2223
]
2324
REQ_INT_LEN = 8
2425
ENDPOINT = 0x82
@@ -193,6 +194,12 @@ def set_sensor_count(self, count):
193194

194195
self._sensor_count = int(count)
195196

197+
def get_product(self):
198+
"""
199+
Get device product name.
200+
"""
201+
return self._device.product
202+
196203
def get_ports(self):
197204
"""
198205
Get device USB ports.

tests/test_temper.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,17 @@
8787
[87.6],
8888
],
8989
[
90-
"TEMPer1F_H1_V1.4",
90+
"TEMPerHumiV1.0",
91+
0x0C45,
92+
0x7401,
93+
1,
94+
b"\x01\x80\x33\x01\x00\x00\x00\x00",
95+
b"\x00\x00\x20\x1A\x0C\x0C", # 0x201A,0x0C0C converts to 32.1C,98.7% (fm75)
96+
[32.1],
97+
[98.7],
98+
],
99+
[
100+
"TEMPerHumiV1.1",
91101
0x0C45,
92102
0x7401,
93103
1,

0 commit comments

Comments
 (0)