From e1ff0112b79cd39c480cb8b51c9dbc6cb07374b6 Mon Sep 17 00:00:00 2001 From: James Hodgson Date: Fri, 7 Oct 2022 17:28:52 +0100 Subject: [PATCH] #22 don't use setters for initializer --- src/picam/picam.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/picam/picam.py b/src/picam/picam.py index 4672efb..db78a5f 100644 --- a/src/picam/picam.py +++ b/src/picam/picam.py @@ -2,8 +2,8 @@ from utils.utils import round_resolution class PiCam: def __init__(self, config: dict): - self.capture_resolution = config["capture_resolution"] - self.preview_resolution = config["preview_resolution"] + self.capture_resolution = round_resolution(config["capture_resolution"]) + self.preview_resolution = round_resolution(config["preview_resolution"]) def set_capture_resolution(self, resolution: "tuple[int, int]") -> None: """Set capture resolution for camera