MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / cleanup

Method cleanup

pager/pager_menu.py:143–156  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

141 self.gfx.clear_input_events() # Flush stale events from service takeover
142
143 def cleanup(self):
144 if hasattr(self, 'gfx'):
145 try:
146 # Clear screen to black before releasing hardware so the
147 # display doesn't freeze on the last drawn frame while
148 # pineapplepager is restarting.
149 self.gfx.clear(Pager.BLACK)
150 self.gfx.flip()
151 except Exception:
152 pass
153 try:
154 self.gfx.cleanup()
155 except Exception:
156 pass
157
158 def _adjust_brightness(self, direction):
159 """Adjust screen brightness. direction: +1 or -1."""

Callers 3

run_testsFunction · 0.95
mainFunction · 0.95
run_testsFunction · 0.95

Calls 2

clearMethod · 0.45
flipMethod · 0.45

Tested by 2

run_testsFunction · 0.76
run_testsFunction · 0.76