Skip to content

Commit

Permalink
Add serial getter/setter. Use empty string as default serial
Browse files Browse the repository at this point in the history
  • Loading branch information
civerachb-cpr committed Nov 15, 2024
1 parent 9a50424 commit f674e83
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions clearpath_config/sensors/types/cameras.py
Original file line number Diff line number Diff line change
Expand Up @@ -1063,7 +1063,7 @@ def __init__(
name: str = None,
topic: str = BaseCamera.TOPIC,
fps: int = FPS,
serial: str = None,
serial: str = '',
device_type: str = Q62,

hostname: str = HOSTNAME,
Expand Down Expand Up @@ -1116,7 +1116,7 @@ def __init__(
) -> None:
# ROS Parameter Template
ros_parameters_template = {
self.ROS_PARAMETER_KEYS.SERIAL: None,
self.ROS_PARAMETER_KEYS.SERIAL: '',

self.ROS_PARAMETER_KEYS.HOSTNAME: AxisCamera.hostname,
self.ROS_PARAMETER_KEYS.HTTP_PORT: AxisCamera.http_port,
Expand Down Expand Up @@ -1219,6 +1219,14 @@ def __init__(
self.scale_tilt = scale_tilt
self.scale_zoom = scale_zoom

@property
def serial(self) -> str:
return self._serial

@serial.setter
def serial(self, s: str) -> None:
self._serial = s

@property
def device_type(self) -> str:
return self._device_type
Expand Down

0 comments on commit f674e83

Please sign in to comment.