tarina

git clone https://git.tarina.org/tarina
Log | Files | Refs | README | LICENSE

commit 8b1f0c35adf8c6cf571e741c3c4052267dc59a35
parent dde51d3ae14dac3181acd0b24fbc60f5a1057d01
Author: rob <rob@tarina.org>
Date:   Sat,  1 Jul 2023 19:52:28 +0100

turn off preview when screen off

Diffstat:
Mtarina.py | 4++++
1 file changed, 4 insertions(+), 0 deletions(-)

diff --git a/tarina.py b/tarina.py @@ -266,6 +266,8 @@ def main(): camera.stop_preview() camera.close() camera = startcamera(lens,fps) + fps=10 + flip = 'no' #PICTURE elif pressed == 'picture': if os.path.isdir(foldername) == False: @@ -633,9 +635,11 @@ def main(): # requires wiringpi installed run_command('gpio -g pwm 19 1023') backlight = True + camera.start_preview() elif backlight == True: run_command('gpio -g pwm 19 0') backlight = False + camera.stop_preview() elif pressed == 'showmenu': if showmenu == 1: # requires wiringpi installed