Skip to content

Commit 5495668

Browse files
author
Kevin J Walters
committed
Removing unused code and debug print.
1 parent 6902555 commit 5495668

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

zhhclock/zhhclock.py

+2-5
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@
5454
import mcp7940
5555

5656
from zc_comboclock import ComboClock
57-
from zc_bg import HaloBackground
5857
from zc_bg_blank import Blank
5958
from zc_bg_digitalrain import DigitalRain
6059
from zc_bg_pendulum import Pendulum
@@ -93,7 +92,6 @@
9392
VERY_LONG_PRESS_DURATION_MS = 2000
9493
LONG_PRESS_DURATION_MS = 1000
9594
SHORT_PRESS_DURATION_MS = 175
96-
PAUSE_AFTER_BUTTON_MS = 200
9795

9896

9997
### MicroPython on micro:bit does not have these methods used by MCP7940
@@ -115,7 +113,6 @@ def writeto_mem(self, addr, memaddr, buf, *, addrsize=8):
115113

116114
ei2c = EnhancedI2C(i2c)
117115
mcp = mcp7940.MCP7940(ei2c)
118-
print("MCP", mcp.time)
119116

120117
zip_px = neopixel.NeoPixel(pin8, ZIPCOUNT)
121118
zip_px.fill(BLACK)
@@ -229,7 +226,7 @@ def show_display_image():
229226
if ms_idx is not None:
230227
bri = (min(255, zip_px[ms_idx][0] + 32 if clock.stopwatch_running else 24) if zip_px[ms_idx][0] < 8 else 0)
231228
zip_px[ms_idx] = (bri, zip_px[ms_idx][1], zip_px[ms_idx][2])
232-
updates |= HaloBackground.HALO_CHANGED
229+
##updates |= HaloBackground.HALO_CHANGED
233230

234231
if display_char is not None:
235232
display.show(display_char)
@@ -297,7 +294,7 @@ def show_display_image():
297294
clock.sync_clocks()
298295
mode_idx = MODE_CLOCK
299296
elif utime.ticks_diff(t2_ms, t1_ms) < LONG_PRESS_DURATION_MS:
300-
background_idx = (background_idx + 1 ) % len(background)
297+
background_idx = (background_idx + 1) % len(background)
301298
bg.stop()
302299
gc.collect()
303300
bg = background[background_idx]

0 commit comments

Comments
 (0)