def tidy_up(self):
# NOTE: This was the __del__ method, but seems more reliable to call explicitly
print "Tidying up PhotoBooth instance"
ButtonHandler().light_button_leds('slr', False) # Turn off all LEDs
pygame.quit() # End our pygame session
GPIO.cleanup() # Make sure we properly reset the GPIO ports we've used before exiting
# Restore monitor blanking (TODO can we store previous values?)
os.system("setterm -blank 30 -powerdown 30")
评论列表
文章目录