Skip to content

Commit 263a2d2

Browse files
fix config var typo
1 parent be4be16 commit 263a2d2

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

camera/camera.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ async def blink_snapshot(self) -> bool:
445445
self.logger.debug("directory created for the photo image path")
446446
self.logger.info("saving blink foto")
447447
await camera.image_to_file(self.config.photo_image_path)
448-
if not self.detect_daylight() and self.blink_image_brightening:
448+
if not self.detect_daylight() and self.config.blink_image_brightening:
449449
self.adjust_image()
450450
except Exception as err:
451451
self.logger.error("Error: {0}".format(err))
@@ -598,7 +598,7 @@ def picam_request_download_foto(self) -> bool:
598598
)
599599
response.raise_for_status()
600600
file.write(response.content)
601-
if not self.detect_daylight() and self.picam_image_brightening:
601+
if not self.detect_daylight() and self.config.picam_image_brightening:
602602
self.adjust_image()
603603

604604
self.logger.debug(

test/test_config_util.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ def test_initialization(self):
116116
self.assertEqual(self.config.picam_rotation, 90)
117117
self.assertEqual(self.config.picam_iso, 100)
118118
self.assertEqual(self.config.picam_night_vision, True)
119+
self.assertEqual(self.config.picam_image_brightening, True)
119120
self.assertEqual(self.config.flask_enabled, True)
120121
self.assertEqual(self.config.flask_web_port, 5000)
121122
self.assertEqual(self.config.flask_secret_key, 'dummy_secret')

0 commit comments

Comments
 (0)