From 9f827ecb555c9d175883bc5ec784f18ace187a8c Mon Sep 17 00:00:00 2001 From: Alejandro Diaz Date: Wed, 13 Sep 2023 13:36:06 -0600 Subject: [PATCH] chagen path camera --- ui/main/views.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ui/main/views.py b/ui/main/views.py index c1d3996..d40eba1 100644 --- a/ui/main/views.py +++ b/ui/main/views.py @@ -26,7 +26,7 @@ def home(request): def take_photo(request): - pin_control.capture_image("/tmp/static/photo.jpg") + pin_control.capture_image(b'/tmp/static/photo.jpg') return HttpResponse("Ok") @@ -41,12 +41,12 @@ def led(request, led): def turn_off_all(): for pin in leds_gpio.values(): - pin_control.turn_on_pin(pin) + pin_control.turn_off_pin(pin) return HttpResponse("Ok") def turn_on_all(): for pin in leds_gpio.values(): - pin_control.turn_off_pin(pin) + pin_control.turn_on_pin(pin) return HttpResponse("Ok") def toggle_led(led, turn_on): @@ -56,4 +56,4 @@ def toggle_led(led, turn_on): else: pin_control.turn_on_pin(gpio_pin) leds_state[led] = not turn_on - return HttpResponse(f"Turn on {led}" if turn_on else f"Turn off {led}") \ No newline at end of file + return HttpResponse(f"Turn off {led}" if turn_on else f"Turn on {led}") \ No newline at end of file