mirror of
https://github.com/PiBrewing/craftbeerpi4.git
synced 2024-11-09 17:07:43 +01:00
next onewire setup test
This commit is contained in:
parent
f00a646a2a
commit
76ee4b74a7
1 changed files with 7 additions and 8 deletions
11
cbpi/cli.py
11
cbpi/cli.py
|
@ -43,15 +43,14 @@ class CraftBeerPiCli():
|
||||||
#f.write("dtoverlay=w1-gpio,gpiopin=4,pullup=on")
|
#f.write("dtoverlay=w1-gpio,gpiopin=4,pullup=on")
|
||||||
lines.append("dtoverlay=w1-gpio,gpiopin=4,pullup=on")
|
lines.append("dtoverlay=w1-gpio,gpiopin=4,pullup=on")
|
||||||
|
|
||||||
for line in lines:
|
configtempfile=os.path.join(self.config.get_file_path(""),"config.txt")
|
||||||
print(line)
|
|
||||||
|
|
||||||
configtemppath=os.path.join(self.config.get_file_path(""),"config.txt")
|
with open(configtempfile, 'w') as f:
|
||||||
print(configtemppath)
|
|
||||||
|
|
||||||
with open(configtemppath, 'w') as f:
|
|
||||||
for line in lines:
|
for line in lines:
|
||||||
f.write(line)
|
f.write(line)
|
||||||
|
destfile="/boot/config.txt"
|
||||||
|
|
||||||
|
shutil.os.system('sudo mv "{}" "{}"'.format(configtempfile,destfile))
|
||||||
|
|
||||||
print("/boot/config.txt created")
|
print("/boot/config.txt created")
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue