Skip to content

Commit 516df04

Browse files
brentrubrentru
authored andcommitted
remove unused btn b code
1 parent 4ce1533 commit 516df04

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

Pi_Hole_Ad_Blocker/mini_pitft_stats.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,7 @@
6666

6767
# Add buttons as inputs
6868
buttonA = digitalio.DigitalInOut(board.D23)
69-
buttonB = digitalio.DigitalInOut(board.D24)
7069
buttonA.switch_to_input()
71-
buttonB.switch_to_input()
7270

7371
while True:
7472
# Draw a black filled box to clear the image.
@@ -100,7 +98,7 @@
10098
continue
10199

102100
y = top
103-
if buttonB.value and not buttonA.value: # just button A pressed
101+
if not buttonA.value: # just button A pressed
104102
draw.text((x, y), IP, font=font, fill="#FFFF00")
105103
y += font.getsize(IP)[1]
106104
draw.text((x, y), CPU, font=font, fill="#FFFF00")
@@ -110,7 +108,7 @@
110108
draw.text((x, y), Disk, font=font, fill="#0000FF")
111109
y += font.getsize(Disk)[1]
112110
draw.text((x, y), "DNS Queries: {}".format(DNSQUERIES), font=font, fill="#FF00FF")
113-
if buttonA.value and buttonB.value: # none pressed
111+
else:
114112
draw.text((x, y), IP, font=font, fill="#FFFF00")
115113
y += font.getsize(IP)[1]
116114
draw.text((x, y), HOST, font=font, fill="#FFFF00")

0 commit comments

Comments
 (0)