diff --git a/pandora-box.py b/pandora-box.py index 363c700..e832d95 100755 --- a/pandora-box.py +++ b/pandora-box.py @@ -91,9 +91,11 @@ def display_image(status): image = "images/pandora-box5.png" else: return - os.system("convert -resize %s -background black -gravity center -extent %s %s bgra:/dev/fb0" % (SCREEN_SIZE, SCREEN_SIZE, image)) # os.system("killall -9 fbi 2>/dev/null") # os.system("fbi -T 1 -d /dev/fb0 -noverbose -a %s" % image) + #os.system("convert -resize %s -background black -gravity center -extent %s %s bgra:/dev/fb0" % (SCREEN_SIZE, SCREEN_SIZE, image)) + os.system("killall fim 2>/dev/null") + os.system("fim -qa %s /dev/null &" % image) # ----------------------------------------------------------- diff --git a/tests/loop.py b/tests/loop.py new file mode 100755 index 0000000..0bb9bb9 --- /dev/null +++ b/tests/loop.py @@ -0,0 +1,19 @@ +#!/usr/bin/python3 +import os; + +def waitMouseClick(): + mouse = open( "/dev/input/mice", "rb" ) + while True: + buf = mouse.read(3) + if ((buf[0] & 0x1)==1): + break; + mouse.close() + +while True: + os.system("killall fim") + os.system("fim -qa image1.png 2>/dev/null &") + waitMouseClick() + os.system("killall fim") + os.system("fim -qa image2.png 2>/dev/null &") + waitMouseClick() +