Browse Source

rename debug_loop to loop

Thomas Buck 11 months ago
parent
commit
8b1509c216
14 changed files with 20 additions and 20 deletions
  1. 1
    1
      camp_small.py
  2. 1
    1
      draw.py
  3. 1
    1
      image.py
  4. 1
    1
      life.py
  5. 1
    1
      manager.py
  6. 5
    5
      mapper.py
  7. 1
    1
      net.py
  8. 2
    2
      pi.py
  9. 1
    1
      qr.py
  10. 1
    1
      snake.py
  11. 1
    1
      solid.py
  12. 1
    1
      splash.py
  13. 2
    2
      test.py
  14. 1
    1
      tetris.py

+ 1
- 1
camp_small.py View File

@@ -69,4 +69,4 @@ if __name__ == "__main__":
69 69
     m.add(Solid(t, 1.0))
70 70
 
71 71
     m.restart()
72
-    t.debug_loop(m.draw)
72
+    t.loop(m.draw)

+ 1
- 1
draw.py View File

@@ -179,4 +179,4 @@ if __name__ == "__main__":
179 179
                      1, 75, (0, 255, 0), (0, 0, 25)))
180 180
 
181 181
     m.restart()
182
-    t.debug_loop(m.draw)
182
+    t.loop(m.draw)

+ 1
- 1
image.py View File

@@ -109,4 +109,4 @@ if __name__ == "__main__":
109 109
         m.add(ImageScreen(t, filename))
110 110
 
111 111
     m.restart()
112
-    t.debug_loop(m.draw)
112
+    t.loop(m.draw)

+ 1
- 1
life.py View File

@@ -149,4 +149,4 @@ if __name__ == "__main__":
149 149
             g.restart()
150 150
         g.draw()
151 151
 
152
-    t.debug_loop(helper)
152
+    t.loop(helper)

+ 1
- 1
manager.py View File

@@ -81,4 +81,4 @@ if __name__ == "__main__":
81 81
     m.add(Solid(t, 1.0))
82 82
 
83 83
     m.restart()
84
-    t.debug_loop(m.draw)
84
+    t.loop(m.draw)

+ 5
- 5
mapper.py View File

@@ -23,8 +23,8 @@ class MapperNull:
23 23
     def loop_end(self):
24 24
         self.gui.loop_end()
25 25
 
26
-    def debug_loop(self, func = None):
27
-        self.gui.debug_loop(func)
26
+    def loop(self, func = None):
27
+        self.gui.loop(func)
28 28
 
29 29
     def set_pixel(self, x, y, color):
30 30
         self.gui.set_pixel(x, y, color)
@@ -36,9 +36,9 @@ class MapperNull:
36 36
 class MapperColorAdjust(MapperNull):
37 37
     def set_pixel(self, x, y, color):
38 38
         # right-most panel, with maximum x coordinates,
39
-        # is "old" type with less bright LEDs.
40
-        # rest of panels to the left are brighter.
41
-        # so adjust brightness of left panel rg channels down.
39
+        # is "new" type with brighter LEDs.
40
+        # rest of panels to the left are less bright.
41
+        # so adjust brightness of right panel rg channels down.
42 42
         if x < self.gui.panelW:
43 43
             color = (int(color[0] * 0.75), int(color[1] * 0.75), color[2])
44 44
 

+ 1
- 1
net.py View File

@@ -66,4 +66,4 @@ if __name__ == "__main__":
66 66
     d.success(ScrollText(t, "Success", "ib8x8u"))
67 67
     d.fail(ScrollText(t, "Failure", "ib8x8u"))
68 68
 
69
-    t.debug_loop(d.draw)
69
+    t.loop(d.draw)

+ 2
- 2
pi.py View File

@@ -76,7 +76,7 @@ class PiMatrix:
76 76
     def loop_end(self):
77 77
         self.matrix.SetImage(self.image.convert('RGB'))
78 78
 
79
-    def debug_loop(self, func = None):
79
+    def loop(self, func = None):
80 80
         while True:
81 81
             if self.loop_start():
82 82
                 break
@@ -92,4 +92,4 @@ class PiMatrix:
92 92
 
93 93
 if __name__ == "__main__":
94 94
     t = PiMatrix(32, 32)
95
-    t.debug_loop(lambda: t.set_pixel(15, 15, (255, 255, 255)))
95
+    t.loop(lambda: t.set_pixel(15, 15, (255, 255, 255)))

+ 1
- 1
qr.py View File

@@ -91,4 +91,4 @@ if __name__ == "__main__":
91 91
     t = util.getTarget()
92 92
 
93 93
     d = QRScreen(t, "Hello World", 10.0, "Drinks:", "tom-thumb", (255, 255, 255), (0, 0, 0))
94
-    t.debug_loop(d.draw)
94
+    t.loop(d.draw)

+ 1
- 1
snake.py View File

@@ -164,4 +164,4 @@ if __name__ == "__main__":
164 164
     i = InputWrapper()
165 165
 
166 166
     d = Snake(t, i)
167
-    t.debug_loop(d.draw)
167
+    t.loop(d.draw)

+ 1
- 1
solid.py View File

@@ -61,4 +61,4 @@ if __name__ == "__main__":
61 61
 
62 62
         d.draw()
63 63
 
64
-    t.debug_loop(helper)
64
+    t.loop(helper)

+ 1
- 1
splash.py View File

@@ -40,4 +40,4 @@ if __name__ == "__main__":
40 40
     import util
41 41
     t = util.getTarget()
42 42
     s = SplashScreen(t)
43
-    t.debug_loop(s.draw)
43
+    t.loop(s.draw)

+ 2
- 2
test.py View File

@@ -45,7 +45,7 @@ class TestGUI:
45 45
         pygame.display.flip()
46 46
         self.clock.tick(30)
47 47
 
48
-    def debug_loop(self, func = None):
48
+    def loop(self, func = None):
49 49
         while True:
50 50
             if self.loop_start():
51 51
                 break
@@ -62,4 +62,4 @@ class TestGUI:
62 62
 
63 63
 if __name__ == "__main__":
64 64
     t = TestGUI(32, 32)
65
-    t.debug_loop(lambda: t.set_pixel(15, 15, (255, 255, 255)))
65
+    t.loop(lambda: t.set_pixel(15, 15, (255, 255, 255)))

+ 1
- 1
tetris.py View File

@@ -263,4 +263,4 @@ if __name__ == "__main__":
263 263
     i = InputWrapper()
264 264
 
265 265
     d = Tetris(t, i, 0.1)
266
-    t.debug_loop(d.draw)
266
+    t.loop(d.draw)

Loading…
Cancel
Save