add log2mem functionality and refracture

This commit is contained in:
dadav
2020-01-18 09:29:28 +01:00
parent 5606ad7281
commit 6a4d7a895e
8 changed files with 305 additions and 110 deletions

View File

@ -1,6 +1,7 @@
import os
from threading import Lock
frame_path = '/root/pwnagotchi.png'
frame_path = '/var/tmp/pwnagotchi/pwnagotchi.png'
frame_format = 'PNG'
frame_ctype = 'image/png'
frame_lock = Lock()
@ -8,5 +9,7 @@ frame_lock = Lock()
def update_frame(img):
global frame_lock, frame_path, frame_format
if not os.path.exists(os.path.basename(frame_path)):
os.makedirs(os.path.basename(frame_path))
with frame_lock:
img.save(frame_path, format=frame_format)