Compare commits
No commits in common. "8da647dff7cae434167add11802fbeee6a5ecddc" and "d2451c935e2e6d828cf81f765d7883efd1686516" have entirely different histories.
8da647dff7
...
d2451c935e
7
INSTALL
7
INSTALL
@ -1,7 +0,0 @@
|
|||||||
sudo apt update
|
|
||||||
sudo apt install libcap-dev xinit
|
|
||||||
|
|
||||||
python3 -m venv venv
|
|
||||||
. venv/bin/activate
|
|
||||||
pip install pygame qrcode escpos picamera2
|
|
||||||
|
|
||||||
6
main.py
6
main.py
@ -6,12 +6,6 @@ import picamera
|
|||||||
from Fotobox import Fotobox
|
from Fotobox import Fotobox
|
||||||
|
|
||||||
with picamera.PiCamera() as camera:
|
with picamera.PiCamera() as camera:
|
||||||
camera.vflip = False
|
|
||||||
camera.hflip = True
|
|
||||||
camera.resolution = (2592, 1944)
|
|
||||||
camera.rotation = 0
|
|
||||||
camera.start_preview()
|
|
||||||
|
|
||||||
fotobox = Fotobox(camera)
|
fotobox = Fotobox(camera)
|
||||||
try:
|
try:
|
||||||
fotobox.run()
|
fotobox.run()
|
||||||
|
|||||||
64
picamera.py
64
picamera.py
@ -1,32 +1,32 @@
|
|||||||
# import time
|
import time
|
||||||
#
|
|
||||||
# from PIL import Image
|
from PIL import Image
|
||||||
#
|
|
||||||
# from config import DEBUG
|
from config import DEBUG
|
||||||
#
|
|
||||||
#
|
|
||||||
# # noinspection PyMethodMayBeStatic,PyShadowingBuiltins
|
# noinspection PyMethodMayBeStatic,PyShadowingBuiltins
|
||||||
# class PiCamera:
|
class PiCamera:
|
||||||
# def __init__(self):
|
def __init__(self):
|
||||||
# pass
|
pass
|
||||||
#
|
|
||||||
# def start_preview(self):
|
def start_preview(self):
|
||||||
# pass
|
pass
|
||||||
#
|
|
||||||
# def capture(self, output, format):
|
def capture(self, output, format):
|
||||||
# with Image.open("./data/demo.jpg") as img:
|
with Image.open("./data/demo.jpg") as img:
|
||||||
# img.save(output, "JPEG")
|
img.save(output, "JPEG")
|
||||||
# if not DEBUG:
|
if not DEBUG:
|
||||||
# time.sleep(0.5)
|
time.sleep(0.5)
|
||||||
#
|
|
||||||
# def stop_preview(self):
|
def stop_preview(self):
|
||||||
# pass
|
pass
|
||||||
#
|
|
||||||
# def close(self):
|
def close(self):
|
||||||
# pass
|
pass
|
||||||
#
|
|
||||||
# def __enter__(self):
|
def __enter__(self):
|
||||||
# return self
|
return self
|
||||||
#
|
|
||||||
# def __exit__(self, exc_type, exc_val, exc_tb):
|
def __exit__(self, exc_type, exc_val, exc_tb):
|
||||||
# self.close()
|
self.close()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user