mirror of
https://github.com/PiBrewing/craftbeerpi4.git
synced 2024-11-28 01:34:38 +01:00
further test
This commit is contained in:
parent
5f4c957fc5
commit
69da4beff7
1 changed files with 3 additions and 7 deletions
10
cbpi/cli.py
10
cbpi/cli.py
|
@ -41,15 +41,11 @@ class CraftBeerPiCli():
|
||||||
with open('/boot/config.txt', 'r') as f:
|
with open('/boot/config.txt', 'r') as f:
|
||||||
lines=f.readlines()
|
lines=f.readlines()
|
||||||
#f.write("dtoverlay=w1-gpio,gpiopin=4,pullup=on")
|
#f.write("dtoverlay=w1-gpio,gpiopin=4,pullup=on")
|
||||||
active=False
|
lines.append("dtoverlay=w1-gpio,gpiopin=4,pullup=on")
|
||||||
|
|
||||||
for line in lines:
|
for line in lines:
|
||||||
print(line)
|
print(line)
|
||||||
if line.find("dtoverlay=w1-gpio"):
|
|
||||||
active=True
|
|
||||||
if not active:
|
|
||||||
lines.append("dtoverlay=w1-gpio,gpiopin=4,pullup=on")
|
|
||||||
print("Added w1-gpio")
|
|
||||||
|
|
||||||
print("/boot/config.txt created")
|
print("/boot/config.txt created")
|
||||||
|
|
||||||
def list_one_wire(self):
|
def list_one_wire(self):
|
||||||
|
|
Loading…
Reference in a new issue