fixed preview script
This commit is contained in:
parent
bf90fc3031
commit
b502912d7f
@ -4,18 +4,18 @@ import sys
|
||||
import os
|
||||
import time
|
||||
import argparse
|
||||
import random
|
||||
from http.server import HTTPServer
|
||||
import shutil
|
||||
import yaml
|
||||
|
||||
sys.path.insert(0,
|
||||
os.path.join(os.path.dirname(os.path.realpath(__file__)),
|
||||
'../sdcard/rootfs/root/pwnagotchi/scripts/'))
|
||||
|
||||
from pwnagotchi.ui.view import View
|
||||
from pwnagotchi.ui.display import Display, VideoHandler
|
||||
import core
|
||||
|
||||
|
||||
class CustomDisplay(Display):
|
||||
|
||||
def _http_serve(self):
|
||||
@ -28,7 +28,6 @@ class CustomDisplay(Display):
|
||||
else:
|
||||
core.log("could not get ip of usb0, video server not starting")
|
||||
|
||||
|
||||
def _on_view_rendered(self, img):
|
||||
CustomVideoHandler.render(img)
|
||||
|
||||
@ -107,12 +106,11 @@ def main():
|
||||
type: {display}
|
||||
video:
|
||||
enabled: true
|
||||
address: "127.0.0.1"
|
||||
address: "0.0.0.0"
|
||||
port: {port}
|
||||
'''.format(display=args.display,
|
||||
port=args.port,
|
||||
lang=args.lang),
|
||||
Loader=yaml.FullLoader)
|
||||
lang=args.lang))
|
||||
|
||||
DISPLAY = CustomDisplay(config=CONFIG, state={'name': '%s>' % 'preview'})
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user