From 8457e23eab8c726524d45067d0f3b8dbb8646381 Mon Sep 17 00:00:00 2001 From: avollkopf <43980694+avollkopf@users.noreply.github.com> Date: Thu, 19 Oct 2023 07:14:22 +0200 Subject: [PATCH] test on onewire setup --- cbpi/__init__.py | 2 +- cbpi/cli.py | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/cbpi/__init__.py b/cbpi/__init__.py index 7aca342..906a12e 100644 --- a/cbpi/__init__.py +++ b/cbpi/__init__.py @@ -1,3 +1,3 @@ -__version__ = "4.2.0.a5" +__version__ = "4.2.0.a6" __codename__ = "Indian Summer" diff --git a/cbpi/cli.py b/cbpi/cli.py index 3618f86..46e8e38 100644 --- a/cbpi/cli.py +++ b/cbpi/cli.py @@ -38,8 +38,11 @@ class CraftBeerPiCli(): def setup_one_wire(self): print("Setting up 1Wire") - with open('/boot/config.txt', 'w') as f: - f.write("dtoverlay=w1-gpio,gpiopin=4,pullup=on") + with open('/boot/config.txt', 'r') as f: + lines=f.readlines() + #f.write("dtoverlay=w1-gpio,gpiopin=4,pullup=on") + + print(lines) print("/boot/config.txt created") def list_one_wire(self):