ソースを参照

Update __init__.py

Remove reference to w1_bus_master1 since sensors could be no several bus masters like
# CraftBeerPi 1-wire support
dtoverlay=w1-gpio,gpiopin=4
dtoverlay=w1-gpio,gpiopin=27
dtoverlay=w1-gpio,gpiopin=18
:
pull/258/head^2
Eduardo Spremolla GitHub 5年前
コミット
6a72d86952
この署名に対応する既知のキーがデータベースに存在しません GPGキーID: 4AEE18F83AFDEB23
1個のファイルの変更1行の追加1行の削除
  1. +1
    -1
      modules/base_plugins/one_wire/__init__.py

+ 1
- 1
modules/base_plugins/one_wire/__init__.py ファイルの表示

@@ -52,7 +52,7 @@ class myThread (threading.Thread):
## Test Mode
if self.sensor_name is None:
return
with open('/sys/bus/w1/devices/w1_bus_master1/%s/w1_slave' % self.sensor_name, 'r') as content_file:
with open('/sys/bus/w1/devices/%s/w1_slave' % self.sensor_name, 'r') as content_file:
content = content_file.read()
if (content.split('\n')[0].split(' ')[11] == "YES"):
temp = float(content.split("=")[-1]) / 1000 # temp in Celcius


読み込み中…
キャンセル
保存