Skip to content

Commit

Permalink
Update ProtocolDefinitions
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Jan 9, 2024
1 parent 5c958a7 commit 1e6f4db
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ProtocolDefinitions
6 changes: 6 additions & 0 deletions blueye/protocol/protos.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@
from .types.message_formats import GuestPortRestartInfo
from .types.message_formats import HeadingSource
from .types.message_formats import Imu
from .types.message_formats import IntervalType
from .types.message_formats import IperfStatus
from .types.message_formats import Laser
from .types.message_formats import LatLongPosition
Expand Down Expand Up @@ -146,6 +147,7 @@
from .types.message_formats import TiltAngle
from .types.message_formats import TiltStabilizationState
from .types.message_formats import TiltVelocity
from .types.message_formats import TimeLapseState
from .types.message_formats import Vector3
from .types.message_formats import WaterDensity
from .types.message_formats import WaterTemperature
Expand Down Expand Up @@ -248,6 +250,7 @@
from .types.telemetry import ThicknessGaugeTel
from .types.telemetry import TiltAngleTel
from .types.telemetry import TiltStabilizationTel
from .types.telemetry import TimeLapseStateTel
from .types.telemetry import VideoStorageSpaceTel
from .types.telemetry import WaterTemperatureTel

Expand Down Expand Up @@ -379,6 +382,7 @@
'Imu2Tel',
'Instruction',
'InstructionType',
'IntervalType',
'IperfStatus',
'IperfTel',
'Laser',
Expand Down Expand Up @@ -474,6 +478,8 @@
'TiltStabilizationTel',
'TiltVelocity',
'TiltVelocityCtrl',
'TimeLapseState',
'TimeLapseStateTel',
'Type',
'Vector3',
'VideoStorageSpaceTel',
Expand Down
6 changes: 6 additions & 0 deletions blueye/protocol/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
ClientInfo,
ConnectedClient,
RecordState,
TimeLapseState,
WaterDensity,
PingerConfiguration,
WaterTemperature,
Expand Down Expand Up @@ -80,6 +81,7 @@
Vector3,
Imu,
MedusaSpectrometerData,
IntervalType,
HeadingSource,
ResetCoordinateSource,
NotificationType,
Expand Down Expand Up @@ -228,6 +230,7 @@
LaserTel,
PilotGPSPositionTel,
RecordStateTel,
TimeLapseStateTel,
BatteryTel,
BatteryBQ40Z50Tel,
DiveTimeTel,
Expand Down Expand Up @@ -284,6 +287,7 @@
'ClientInfo',
'ConnectedClient',
'RecordState',
'TimeLapseState',
'WaterDensity',
'PingerConfiguration',
'WaterTemperature',
Expand Down Expand Up @@ -328,6 +332,7 @@
'Vector3',
'Imu',
'MedusaSpectrometerData',
'IntervalType',
'HeadingSource',
'ResetCoordinateSource',
'NotificationType',
Expand Down Expand Up @@ -466,6 +471,7 @@
'LaserTel',
'PilotGPSPositionTel',
'RecordStateTel',
'TimeLapseStateTel',
'BatteryTel',
'BatteryBQ40Z50Tel',
'DiveTimeTel',
Expand Down
30 changes: 30 additions & 0 deletions blueye/protocol/types/message_formats.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
__protobuf__ = proto.module(
package='blueye.protocol',
manifest={
'IntervalType',
'HeadingSource',
'ResetCoordinateSource',
'NotificationType',
Expand Down Expand Up @@ -64,6 +65,7 @@
'ClientInfo',
'ConnectedClient',
'RecordState',
'TimeLapseState',
'WaterDensity',
'PingerConfiguration',
'WaterTemperature',
Expand Down Expand Up @@ -112,6 +114,13 @@
)


class IntervalType(proto.Enum):
r"""Interval type for time-lapse photos."""
INTERVAL_TYPE_UNSPECIFIED = 0
INTERVAL_TYPE_TIME = 1
INTERVAL_TYPE_DISTANCE = 2


class HeadingSource(proto.Enum):
r"""Heading source used during reset of the position estimate."""
HEADING_SOURCE_UNSPECIFIED = 0
Expand Down Expand Up @@ -677,6 +686,27 @@ class RecordState(proto.Message):
guestport_seconds = proto.Field(proto.INT32, number=4)


class TimeLapseState(proto.Message):
r"""Time-lapse state published if time-lapse mission is running.
Attributes:
interval (float):
Interval between photos
photos_taken (int):
Number of photos taken
interval_type (blueye.protocol.types.IntervalType):
Interval type for photos, distance or time
"""

interval = proto.Field(proto.FLOAT, number=1)

photos_taken = proto.Field(proto.INT32, number=2)

interval_type = proto.Field(proto.ENUM, number=3,
enum='IntervalType',
)


class WaterDensity(proto.Message):
r"""Water density.
Used to specify the water density the drone is operating in, to
Expand Down
14 changes: 14 additions & 0 deletions blueye/protocol/types/telemetry.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
'LaserTel',
'PilotGPSPositionTel',
'RecordStateTel',
'TimeLapseStateTel',
'BatteryTel',
'BatteryBQ40Z50Tel',
'DiveTimeTel',
Expand Down Expand Up @@ -292,6 +293,19 @@ class RecordStateTel(proto.Message):
)


class TimeLapseStateTel(proto.Message):
r"""Time-lapse state from the drone.
Attributes:
time_lapse_state (blueye.protocol.types.TimeLapseState):
"""

time_lapse_state = proto.Field(proto.MESSAGE, number=1,
message=message_formats.TimeLapseState,
)


class BatteryTel(proto.Message):
r"""Receive essential information about the battery status.
Expand Down

0 comments on commit 1e6f4db

Please sign in to comment.