#22 don't use setters for initializer
This commit is contained in:
@@ -2,8 +2,8 @@ from utils.utils import round_resolution
|
|||||||
|
|
||||||
class PiCam:
|
class PiCam:
|
||||||
def __init__(self, config: dict):
|
def __init__(self, config: dict):
|
||||||
self.capture_resolution = config["capture_resolution"]
|
self.capture_resolution = round_resolution(config["capture_resolution"])
|
||||||
self.preview_resolution = config["preview_resolution"]
|
self.preview_resolution = round_resolution(config["preview_resolution"])
|
||||||
|
|
||||||
def set_capture_resolution(self, resolution: "tuple[int, int]") -> None:
|
def set_capture_resolution(self, resolution: "tuple[int, int]") -> None:
|
||||||
"""Set capture resolution for camera
|
"""Set capture resolution for camera
|
||||||
|
|||||||
Reference in New Issue
Block a user