|
124 | 124 | begin = time.monotonic()
|
125 | 125 | print(begin)
|
126 | 126 | # when feather is powered up it shows the initial graphic splash
|
127 |
| -minitft.display.show(graphics[mode]) |
| 127 | +minitft.display.root_group = graphics[mode] |
128 | 128 |
|
129 | 129 | while True:
|
130 | 130 | # setup minitft featherwing buttons
|
|
153 | 153 | if mode > 3:
|
154 | 154 | mode = 0
|
155 | 155 | print("Mode:,", mode)
|
156 |
| - minitft.display.show(graphics[mode]) |
| 156 | + minitft.display.root_group = graphics[mode] |
157 | 157 | # scroll up to change slide duration and graphic
|
158 | 158 | if buttons.up and up_state == "pressed":
|
159 | 159 | # blocks the button if the slider is sliding or
|
|
167 | 167 | if mode < 0:
|
168 | 168 | mode = 3
|
169 | 169 | print("Mode: ", mode)
|
170 |
| - minitft.display.show(graphics[mode]) |
| 170 | + minitft.display.root_group = graphics[mode] |
171 | 171 | # workaround so that the menu graphics show after a slide is finished
|
172 | 172 | if mode == mode and pause == 0 and onOff == 0:
|
173 |
| - minitft.display.show(graphics[mode]) |
| 173 | + minitft.display.root_group = graphics[mode] |
174 | 174 | # starts slide
|
175 | 175 | if buttons.select and select_state == "pressed" or z == 2:
|
176 | 176 | # blocks the button if the slider is sliding or
|
|
180 | 180 | select_state = None
|
181 | 181 | else:
|
182 | 182 | # shows the slider is sliding graphic
|
183 |
| - minitft.display.show(progBarGroup) |
| 183 | + minitft.display.root_group = progBarGroup |
184 | 184 | # gets time of button press
|
185 | 185 | press = time.monotonic()
|
186 | 186 | print(press)
|
|
230 | 230 | check = 0
|
231 | 231 | if end < 10:
|
232 | 232 | # displays the stopping graphic for the last 10 secs.
|
233 |
| - minitft.display.show(stopGroup) |
| 233 | + minitft.display.root_group = stopGroup |
234 | 234 | # changes states after slide has completed
|
235 | 235 | kit.stepper1.release()
|
236 | 236 | pause = 1
|
|
240 | 240 | # delay for safety
|
241 | 241 | time.sleep(2)
|
242 | 242 | # shows choice menu
|
243 |
| - minitft.display.show(reverseqGroup) |
| 243 | + minitft.display.root_group = reverseqGroup |
244 | 244 | # b is defined to stop the slider
|
245 | 245 | # only active if the slider is in the 'stopped' state
|
246 | 246 | if buttons.b and b_state == "pressed" and stop == 1:
|
|
249 | 249 | if z == 0:
|
250 | 250 | b_state = None
|
251 | 251 | time.sleep(1)
|
252 |
| - minitft.display.show(backingUpGroup) |
| 252 | + minitft.display.root_group = backingUpGroup |
253 | 253 | # delay for safety
|
254 | 254 | time.sleep(2)
|
255 | 255 | # brings camera back to 'home' at double speed
|
|
286 | 286 | a_state = None
|
287 | 287 | # same script as the 'regular' slide loop
|
288 | 288 | time.sleep(2)
|
289 |
| - minitft.display.show(progBarGroup) |
| 289 | + minitft.display.root_group = progBarGroup |
290 | 290 | press = time.monotonic()
|
291 | 291 | print(press)
|
292 | 292 | text_area.text = slide_begin[mode]
|
|
322 | 322 | if check > 19:
|
323 | 323 | check = 0
|
324 | 324 | if end < 10:
|
325 |
| - minitft.display.show(stopGroup) |
| 325 | + minitft.display.root_group = stopGroup |
326 | 326 | # state changes
|
327 | 327 | kit.stepper1.release()
|
328 | 328 | pause = 1
|
|
331 | 331 | z = 1
|
332 | 332 | check = 0
|
333 | 333 | time.sleep(2)
|
334 |
| - minitft.display.show(reverseqGroup) |
| 334 | + minitft.display.root_group = reverseqGroup |
0 commit comments