Skip to content

Commit af290cf

Browse files
Update ProtocolDefinitions
1 parent f408739 commit af290cf

6 files changed

Lines changed: 98 additions & 1 deletion

File tree

protocol/blueye/protocol/protos.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
from .types.control import AutoPilotHeaveCtrl
3939
from .types.control import AutoPilotSurgeYawCtrl
4040
from .types.control import CalibrateDvlGyroCtrl
41+
from .types.control import CameraPanTiltZoomCtrl
4142
from .types.control import CancelCalibrationCtrl
4243
from .types.control import ClearMissionCtrl
4344
from .types.control import DeactivateGuestPortsCtrl
@@ -85,6 +86,7 @@
8586
from .types.message_formats import BatteryBQ40Z50
8687
from .types.message_formats import BinlogRecord
8788
from .types.message_formats import CalibrationState
89+
from .types.message_formats import CameraPanTiltZoom
8890
from .types.message_formats import CameraParameters
8991
from .types.message_formats import CanisterHumidity
9092
from .types.message_formats import CanisterTemperature
@@ -258,6 +260,7 @@
258260
from .types.telemetry import CalibratedImuHpTel
259261
from .types.telemetry import CalibratedImuTel
260262
from .types.telemetry import CalibrationStateTel
263+
from .types.telemetry import CameraPanTiltZoomTel
261264
from .types.telemetry import CanisterBottomHumidityTel
262265
from .types.telemetry import CanisterBottomTemperatureTel
263266
from .types.telemetry import ConnectedClientsTel
@@ -359,6 +362,9 @@
359362
'Camera',
360363
'CameraAction',
361364
'CameraCommand',
365+
'CameraPanTiltZoom',
366+
'CameraPanTiltZoomCtrl',
367+
'CameraPanTiltZoomTel',
362368
'CameraParameters',
363369
'CancelCalibrationCtrl',
364370
'CanisterBottomHumidityTel',

protocol/blueye/protocol/types/__init__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
AutoPilotHeaveCtrl,
4141
AutoPilotSurgeYawCtrl,
4242
CalibrateDvlGyroCtrl,
43+
CameraPanTiltZoomCtrl,
4344
CancelCalibrationCtrl,
4445
ClearMissionCtrl,
4546
DeactivateGuestPortsCtrl,
@@ -89,6 +90,7 @@
8990
BatteryBQ40Z50,
9091
BinlogRecord,
9192
CalibrationState,
93+
CameraPanTiltZoom,
9294
CameraParameters,
9395
CanisterHumidity,
9496
CanisterTemperature,
@@ -268,6 +270,7 @@
268270
CalibratedImuHpTel,
269271
CalibratedImuTel,
270272
CalibrationStateTel,
273+
CameraPanTiltZoomTel,
271274
CanisterBottomHumidityTel,
272275
CanisterBottomTemperatureTel,
273276
ConnectedClientsTel,
@@ -345,6 +348,7 @@
345348
'AutoPilotHeaveCtrl',
346349
'AutoPilotSurgeYawCtrl',
347350
'CalibrateDvlGyroCtrl',
351+
'CameraPanTiltZoomCtrl',
348352
'CancelCalibrationCtrl',
349353
'ClearMissionCtrl',
350354
'DeactivateGuestPortsCtrl',
@@ -392,6 +396,7 @@
392396
'BatteryBQ40Z50',
393397
'BinlogRecord',
394398
'CalibrationState',
399+
'CameraPanTiltZoom',
395400
'CameraParameters',
396401
'CanisterHumidity',
397402
'CanisterTemperature',
@@ -565,6 +570,7 @@
565570
'CalibratedImuHpTel',
566571
'CalibratedImuTel',
567572
'CalibrationStateTel',
573+
'CameraPanTiltZoomTel',
568574
'CanisterBottomHumidityTel',
569575
'CanisterBottomTemperatureTel',
570576
'ConnectedClientsTel',

protocol/blueye/protocol/types/control.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@
7070
'EndDiveCtrl',
7171
'FormatRemovableStorageDeviceCtrl',
7272
'SetTurbidityFilterCtrl',
73+
'CameraPanTiltZoomCtrl',
7374
},
7475
)
7576

@@ -645,4 +646,21 @@ class SetTurbidityFilterCtrl(proto.Message):
645646
)
646647

647648

649+
class CameraPanTiltZoomCtrl(proto.Message):
650+
r"""Issue a command to set the digital pan, tilt, and zoom of the
651+
main camera.
652+
Only supported on X3 Ultra.
653+
654+
Attributes:
655+
camera_pan_tilt_zoom (blueye.protocol.types.CameraPanTiltZoom):
656+
The desired pan, tilt, and zoom state.
657+
"""
658+
659+
camera_pan_tilt_zoom: message_formats.CameraPanTiltZoom = proto.Field(
660+
proto.MESSAGE,
661+
number=1,
662+
message=message_formats.CameraPanTiltZoom,
663+
)
664+
665+
648666
__all__ = tuple(sorted(__protobuf__.manifest))

protocol/blueye/protocol/types/message_formats.py

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@
136136
'SurfaceUnitBatteryInfo',
137137
'SurfaceUnitVersionInfo',
138138
'FilterMessage',
139+
'CameraPanTiltZoom',
139140
},
140141
)
141142

@@ -515,6 +516,9 @@ class Resolution(proto.Enum):
515516
RESOLUTION_UHD_4K (3):
516517
4K Ultra HD (3840x2160, Only supported on X3
517518
Ultra).
519+
RESOLUTION_QHD_2K (5):
520+
2K QHD (2560x1440, Only supported on X3
521+
Ultra).
518522
"""
519523
RESOLUTION_UNSPECIFIED = 0
520524
"""Resolution not specified."""
@@ -526,11 +530,17 @@ class Resolution(proto.Enum):
526530
"""1080p Full HD (1920x1080)."""
527531
RESOLUTION_UHD_4K = 3
528532
"""4K Ultra HD (3840x2160, Only supported on X3 Ultra)."""
533+
RESOLUTION_QHD_2K = 5
534+
"""2K QHD (2560x1440, Only supported on X3 Ultra)."""
529535

530536

531537
class Framerate(proto.Enum):
532538
r"""Available camera frame rates.
533539
540+
If the requested frame rate is higher than what is supported at
541+
the current resolution, the frame rate will be reduced while the
542+
resolution is respected.
543+
534544
Attributes:
535545
FRAMERATE_UNSPECIFIED (0):
536546
Framerate not specified.
@@ -539,13 +549,19 @@ class Framerate(proto.Enum):
539549
FRAMERATE_FPS_25 (2):
540550
25 frames per second. (Only supported on
541551
Pioneer/Pro/X1/X3)
552+
FRAMERATE_FPS_60 (3):
553+
60 frames per second. (Only supported on X3
554+
Ultra at QHD, 1080p and 720p)
542555
"""
543556
FRAMERATE_UNSPECIFIED = 0
544557
"""Framerate not specified."""
545558
FRAMERATE_FPS_30 = 1
546559
"""30 frames per second."""
547560
FRAMERATE_FPS_25 = 2
548561
"""25 frames per second. (Only supported on Pioneer/Pro/X1/X3)"""
562+
FRAMERATE_FPS_60 = 3
563+
"""60 frames per second. (Only supported on X3 Ultra at QHD,
564+
1080p and 720p)"""
549565

550566

551567
class Camera(proto.Enum):
@@ -5247,4 +5263,36 @@ class FilterMessage(proto.Message):
52475263
)
52485264

52495265

5266+
class CameraPanTiltZoom(proto.Message):
5267+
r"""Digital pan, tilt, and zoom state for the main camera.
5268+
5269+
Only supported on X3 Ultra. Controls digital (not mechanical)
5270+
zoom.
5271+
5272+
Attributes:
5273+
pan (float):
5274+
Horizontal pan (-1.0..1.0), where 0.0 is
5275+
center.
5276+
tilt (float):
5277+
Vertical tilt (-1.0..1.0), where 0.0 is
5278+
center.
5279+
zoom (float):
5280+
Zoom level (0.0..1.0), where 0.0 is no zoom
5281+
and 1.0 is maximum zoom.
5282+
"""
5283+
5284+
pan: float = proto.Field(
5285+
proto.FLOAT,
5286+
number=1,
5287+
)
5288+
tilt: float = proto.Field(
5289+
proto.FLOAT,
5290+
number=2,
5291+
)
5292+
zoom: float = proto.Field(
5293+
proto.FLOAT,
5294+
number=3,
5295+
)
5296+
5297+
52505298
__all__ = tuple(sorted(__protobuf__.manifest))

protocol/blueye/protocol/types/telemetry.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@
8787
'SurfaceUnitTel',
8888
'LogEntryTel',
8989
'TurbidityFilterTel',
90+
'CameraPanTiltZoomTel',
9091
},
9192
)
9293

@@ -1068,4 +1069,22 @@ class TurbidityFilterTel(proto.Message):
10681069
)
10691070

10701071

1072+
class CameraPanTiltZoomTel(proto.Message):
1073+
r"""Digital pan, tilt, and zoom telemetry from the main camera.
1074+
1075+
Reports the actual pan, tilt, and zoom state of the camera. Only
1076+
supported on X3 Ultra.
1077+
1078+
Attributes:
1079+
camera_pan_tilt_zoom (blueye.protocol.types.CameraPanTiltZoom):
1080+
Current pan, tilt, and zoom state.
1081+
"""
1082+
1083+
camera_pan_tilt_zoom: message_formats.CameraPanTiltZoom = proto.Field(
1084+
proto.MESSAGE,
1085+
number=1,
1086+
message=message_formats.CameraPanTiltZoom,
1087+
)
1088+
1089+
10711090
__all__ = tuple(sorted(__protobuf__.manifest))

0 commit comments

Comments
 (0)