1 parent ee09f5c commit d244bc2Copy full SHA for d244bc2
1 file changed
stage.py
@@ -348,12 +348,15 @@ def clear(self):
348
class Stage:
349
buffer = bytearray(512)
350
351
- def __init__(self, display, fps=6, scale=1):
352
- self.scale = scale
+ def __init__(self, display, fps=6, scale=None):
+ if scale is None:
353
+ self.scale = max(1, display.width // 128)
354
+ else:
355
+ self.scale = scale
356
self.layers = []
357
self.display = display
- self.width = display.width // scale
- self.height = display.height // scale
358
+ self.width = display.width // self.scale
359
+ self.height = display.height // self.scale
360
self.last_tick = utime.ticks_ms()
361
self.tick_delay = 1000 // fps
362
0 commit comments