dji_mqtt_connect 0.1.31.4 → 0.1.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/config/locales/thing_product_events.en.yml +1 -0
- data/lib/dji_mqtt_connect/factories/services/camera_aim.rb +38 -0
- data/lib/dji_mqtt_connect/factories/services/camera_exposure_mode_set.rb +36 -0
- data/lib/dji_mqtt_connect/factories/services/camera_exposure_set.rb +36 -0
- data/lib/dji_mqtt_connect/factories/services/camera_focal_length_set.rb +36 -0
- data/lib/dji_mqtt_connect/factories/services/camera_focus_mode_set.rb +36 -0
- data/lib/dji_mqtt_connect/factories/services/camera_focus_value_set.rb +36 -0
- data/lib/dji_mqtt_connect/factories/services/camera_look_at.rb +38 -0
- data/lib/dji_mqtt_connect/factories/services/camera_mode_switch.rb +35 -0
- data/lib/dji_mqtt_connect/factories/services/camera_photo_stop.rb +32 -0
- data/lib/dji_mqtt_connect/factories/services/camera_photo_take.rb +32 -0
- data/lib/dji_mqtt_connect/factories/services/camera_point_focus_action.rb +37 -0
- data/lib/dji_mqtt_connect/factories/services/camera_recording_start.rb +32 -0
- data/lib/dji_mqtt_connect/factories/services/camera_recording_stop.rb +32 -0
- data/lib/dji_mqtt_connect/factories/services/camera_screen_drag.rb +37 -0
- data/lib/dji_mqtt_connect/factories/services/camera_screen_split.rb +35 -0
- data/lib/dji_mqtt_connect/factories/services/gimbal_reset.rb +35 -0
- data/lib/dji_mqtt_connect/factories/services/ir_metering_area_set.rb +38 -0
- data/lib/dji_mqtt_connect/factories/services/ir_metering_mode_set.rb +35 -0
- data/lib/dji_mqtt_connect/factories/services/ir_metering_point_set.rb +36 -0
- data/lib/dji_mqtt_connect/factories/services/live_control.rb +88 -0
- data/lib/dji_mqtt_connect/factories/services/photo_storage_set.rb +39 -0
- data/lib/dji_mqtt_connect/factories/services/video_storage_set.rb +39 -0
- data/lib/dji_mqtt_connect/factories/services_messages.rb +2 -21
- data/lib/dji_mqtt_connect/messages/thing/product/events/fly_to_point_progress.rb +10 -3
- data/lib/dji_mqtt_connect/messages/thing/product/events/takeoff_to_point_progress.rb +10 -3
- data/lib/dji_mqtt_connect/messages/thing/product/osd/dock.rb +20 -1
- data/lib/dji_mqtt_connect/messages/thing/product/osd/drone.rb +4 -4
- data/lib/dji_mqtt_connect/messages/thing/product/osd/flight_hub_dock.rb +2 -267
- data/lib/dji_mqtt_connect/messages/thing/product/osd/flight_hub_drone.rb +2 -227
- data/lib/dji_mqtt_connect/messages/thing/product/services/camera_aim.rb +40 -0
- data/lib/dji_mqtt_connect/messages/thing/product/services/camera_exposure_mode_set.rb +46 -0
- data/lib/dji_mqtt_connect/messages/thing/product/services/camera_exposure_set.rb +72 -0
- data/lib/dji_mqtt_connect/messages/thing/product/services/camera_focal_length_set.rb +34 -0
- data/lib/dji_mqtt_connect/messages/thing/product/services/camera_focus_mode_set.rb +45 -0
- data/lib/dji_mqtt_connect/messages/thing/product/services/camera_focus_value_set.rb +36 -0
- data/lib/dji_mqtt_connect/messages/thing/product/services/camera_frame_zoom.rb +46 -0
- data/lib/dji_mqtt_connect/messages/thing/product/services/camera_look_at.rb +36 -0
- data/lib/dji_mqtt_connect/messages/thing/product/services/camera_mode_switch.rb +37 -0
- data/lib/dji_mqtt_connect/messages/thing/product/services/camera_photo_stop.rb +24 -0
- data/lib/dji_mqtt_connect/messages/thing/product/services/camera_photo_take.rb +24 -0
- data/lib/dji_mqtt_connect/messages/thing/product/services/camera_point_focus_action.rb +41 -0
- data/lib/dji_mqtt_connect/messages/thing/product/services/camera_recording_start.rb +24 -0
- data/lib/dji_mqtt_connect/messages/thing/product/services/camera_recording_stop.rb +24 -0
- data/lib/dji_mqtt_connect/messages/thing/product/services/camera_screen_drag.rb +33 -0
- data/lib/dji_mqtt_connect/messages/thing/product/services/camera_screen_split.rb +27 -0
- data/lib/dji_mqtt_connect/messages/thing/product/services/gimbal_reset.rb +37 -0
- data/lib/dji_mqtt_connect/messages/thing/product/services/ir_metering_area_set.rb +38 -0
- data/lib/dji_mqtt_connect/messages/thing/product/services/ir_metering_mode_set.rb +36 -0
- data/lib/dji_mqtt_connect/messages/thing/product/services/ir_metering_point_set.rb +32 -0
- data/lib/dji_mqtt_connect/messages/thing/product/services/payload_authority_grab.rb +25 -0
- data/lib/dji_mqtt_connect/messages/thing/product/services/photo_storage_set.rb +37 -0
- data/lib/dji_mqtt_connect/messages/thing/product/services/video_storage_set.rb +37 -0
- data/lib/dji_mqtt_connect/messages/thing/product/services_reply/camera_aim.rb +19 -0
- data/lib/dji_mqtt_connect/messages/thing/product/services_reply/camera_exposure_mode_set.rb +15 -0
- data/lib/dji_mqtt_connect/messages/thing/product/services_reply/camera_exposure_set.rb +15 -0
- data/lib/dji_mqtt_connect/messages/thing/product/services_reply/camera_focal_length_set.rb +15 -0
- data/lib/dji_mqtt_connect/messages/thing/product/services_reply/camera_focus_mode_set.rb +15 -0
- data/lib/dji_mqtt_connect/messages/thing/product/services_reply/camera_focus_value_set.rb +15 -0
- data/lib/dji_mqtt_connect/messages/thing/product/services_reply/camera_frame_zoom.rb +15 -0
- data/lib/dji_mqtt_connect/messages/thing/product/services_reply/camera_look_at.rb +15 -0
- data/lib/dji_mqtt_connect/messages/thing/product/services_reply/camera_mode_switch.rb +15 -0
- data/lib/dji_mqtt_connect/messages/thing/product/services_reply/camera_photo_stop.rb +15 -0
- data/lib/dji_mqtt_connect/messages/thing/product/services_reply/camera_photo_take.rb +20 -0
- data/lib/dji_mqtt_connect/messages/thing/product/services_reply/camera_point_focus_action.rb +15 -0
- data/lib/dji_mqtt_connect/messages/thing/product/services_reply/camera_recording_start.rb +15 -0
- data/lib/dji_mqtt_connect/messages/thing/product/services_reply/camera_recording_stop.rb +15 -0
- data/lib/dji_mqtt_connect/messages/thing/product/services_reply/camera_screen_drag.rb +15 -0
- data/lib/dji_mqtt_connect/messages/thing/product/services_reply/camera_screen_split.rb +15 -0
- data/lib/dji_mqtt_connect/messages/thing/product/services_reply/gimbal_reset.rb +15 -0
- data/lib/dji_mqtt_connect/messages/thing/product/services_reply/ir_metering_area_set.rb +15 -0
- data/lib/dji_mqtt_connect/messages/thing/product/services_reply/ir_metering_mode_set.rb +15 -0
- data/lib/dji_mqtt_connect/messages/thing/product/services_reply/ir_metering_point_set.rb +15 -0
- data/lib/dji_mqtt_connect/messages/thing/product/services_reply/payload_authority_grab.rb +15 -0
- data/lib/dji_mqtt_connect/messages/thing/product/services_reply/photo_storage_set.rb +15 -0
- data/lib/dji_mqtt_connect/messages/thing/product/services_reply/video_storage_set.rb +15 -0
- data/lib/dji_mqtt_connect/mixins/network_state_quality.rb +4 -0
- data/lib/dji_mqtt_connect/types.rb +3 -0
- data/lib/dji_mqtt_connect/version.rb +1 -1
- data/lib/dji_mqtt_connect.rb +63 -141
- metadata +70 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4c70af295485bc5edde118d40c19de933dba2d74d395cae814f4a6d560431016
|
|
4
|
+
data.tar.gz: 44b3ec92411d71321f14664b19d72fc43ecf29289abab127f8b7612677d8fd6a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0d740139578c73299418021f0b0ce9d6c8ee7ce1bb089c5541f0bd3353843d08d1881659c85a31fa47fda5925732e537ba401b2468bcd91bbf75bed40a299061
|
|
7
|
+
data.tar.gz: 0a7dec5e7aae7b415589acfdace9c8cda13d3be52d3457bf8624b4993e5fcf22bcbd94299c03b2fbcf444c46595a78022f7acda6b364f26ae7fc76ad927ad83c
|
|
@@ -13,6 +13,7 @@ en:
|
|
|
13
13
|
flight_areas_sync_progress: "Syncing flight areas: %{status} (%{reason})"
|
|
14
14
|
flighttask_progress: "%{current_step} (%{status} %{percent}%)"
|
|
15
15
|
flighttask_progress_with_break_point: "Flight Halted: %{break_reason} [%{current_step}] (%{status} %{percent}%)"
|
|
16
|
+
fly_to_point_progress: "Fly to Point: %{status} (%{way_point_index}/- | %{remaining_time} sec | %{remaining_distance} left)"
|
|
16
17
|
highest_priority_upload_flighttask_media: "Highest priority flight task media upload"
|
|
17
18
|
offline_map_sync_progress: "Syncing offline maps: %{status} (%{reason})"
|
|
18
19
|
takeoff_to_point_progress: "Takeoff to Point: %{status} (%{way_point_index}/- | %{remaining_time} sec | %{remaining_distance} left)"
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module DjiMqttConnect
|
|
4
|
+
module Factories::ServicesMessages
|
|
5
|
+
### Payload control - Double tap to AIM ###
|
|
6
|
+
|
|
7
|
+
def build_thing_product_camera_aim_services_message(data: build_thing_product_camera_aim_services_message_data)
|
|
8
|
+
Thing::Product::CameraAimServicesMessage.build(
|
|
9
|
+
data: data
|
|
10
|
+
)
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
def build_thing_product_camera_aim_services_message_data
|
|
14
|
+
{
|
|
15
|
+
locked: true,
|
|
16
|
+
payload_index: "39-0-7",
|
|
17
|
+
camera_type: Thing::Product::CameraAimServicesMessage::CAMERA_TYPE_WIDE,
|
|
18
|
+
x: 0.5,
|
|
19
|
+
y: 0.5
|
|
20
|
+
}
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def build_thing_product_camera_aim_services_reply_message(result: 0)
|
|
24
|
+
message_data = {
|
|
25
|
+
result: result
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
Thing::Product::CameraAimServicesReplyMessage.new(
|
|
29
|
+
bid: SecureRandom.uuid,
|
|
30
|
+
tid: SecureRandom.uuid,
|
|
31
|
+
timestamp: Message.current_timestamp,
|
|
32
|
+
_method: "camera_aim",
|
|
33
|
+
_data: message_data,
|
|
34
|
+
data: message_data
|
|
35
|
+
)
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module DjiMqttConnect
|
|
4
|
+
module Factories::ServicesMessages
|
|
5
|
+
### Payload control - Camera exposure mode setting ###
|
|
6
|
+
|
|
7
|
+
def build_thing_product_camera_exposure_mode_set_services_message(data: build_thing_product_camera_exposure_mode_set_services_message_data)
|
|
8
|
+
Thing::Product::CameraExposureModeSetServicesMessage.build(
|
|
9
|
+
data: data
|
|
10
|
+
)
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
def build_thing_product_camera_exposure_mode_set_services_message_data
|
|
14
|
+
{
|
|
15
|
+
camera_type: "zoom",
|
|
16
|
+
exposure_mode: 1,
|
|
17
|
+
payload_index: "39-0-7"
|
|
18
|
+
}
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def build_thing_product_camera_exposure_mode_set_services_reply_message(result: 0)
|
|
22
|
+
message_data = {
|
|
23
|
+
result: result
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
Thing::Product::CameraExposureModeSetServicesReplyMessage.new(
|
|
27
|
+
bid: SecureRandom.uuid,
|
|
28
|
+
tid: SecureRandom.uuid,
|
|
29
|
+
timestamp: Message.current_timestamp,
|
|
30
|
+
_method: "camera_exposure_mode_set",
|
|
31
|
+
_data: message_data,
|
|
32
|
+
data: message_data
|
|
33
|
+
)
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module DjiMqttConnect
|
|
4
|
+
module Factories::ServicesMessages
|
|
5
|
+
### Payload control - Camera exposure mode setting ###
|
|
6
|
+
|
|
7
|
+
def build_thing_product_camera_exposure_set_services_message(data: build_thing_product_camera_exposure_set_services_message_data)
|
|
8
|
+
Thing::Product::CameraExposureSetServicesMessage.build(
|
|
9
|
+
data: data
|
|
10
|
+
)
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
def build_thing_product_camera_exposure_set_services_message_data
|
|
14
|
+
{
|
|
15
|
+
camera_type: Thing::Product::CameraExposureSetServicesMessage::CAMERA_TYPE_ZOOM,
|
|
16
|
+
exposure_value: Thing::Product::CameraExposureSetServicesMessage::EXPOSURE_VALUE_FIXED,
|
|
17
|
+
payload_index: "39-0-7"
|
|
18
|
+
}
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def build_thing_product_camera_exposure_set_services_reply_message(result: 0)
|
|
22
|
+
message_data = {
|
|
23
|
+
result: result
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
Thing::Product::CameraExposureSetServicesReplyMessage.new(
|
|
27
|
+
bid: SecureRandom.uuid,
|
|
28
|
+
tid: SecureRandom.uuid,
|
|
29
|
+
timestamp: Message.current_timestamp,
|
|
30
|
+
_method: "camera_exposure_set",
|
|
31
|
+
_data: message_data,
|
|
32
|
+
data: message_data
|
|
33
|
+
)
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module DjiMqttConnect
|
|
4
|
+
module Factories::ServicesMessages
|
|
5
|
+
### Payload control - Zoom ###
|
|
6
|
+
|
|
7
|
+
def build_thing_product_camera_focal_length_set_services_message(data: build_thing_product_camera_focal_length_set_services_message_data)
|
|
8
|
+
Thing::Product::CameraFocalLengthSetServicesMessage.build(
|
|
9
|
+
data: data
|
|
10
|
+
)
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
def build_thing_product_camera_focal_length_set_services_message_data
|
|
14
|
+
{
|
|
15
|
+
payload_index: "39-0-7",
|
|
16
|
+
camera_type: Thing::Product::CameraFocalLengthSetServicesMessage::CAMERA_TYPE_WIDE,
|
|
17
|
+
zoom_factor: 10.0
|
|
18
|
+
}
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def build_thing_product_camera_focal_length_set_services_reply_message(result: 0)
|
|
22
|
+
message_data = {
|
|
23
|
+
result: result
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
Thing::Product::CameraFocalLengthSetServicesReplyMessage.new(
|
|
27
|
+
bid: SecureRandom.uuid,
|
|
28
|
+
tid: SecureRandom.uuid,
|
|
29
|
+
timestamp: Message.current_timestamp,
|
|
30
|
+
_method: "camera_focal_length_set",
|
|
31
|
+
_data: message_data,
|
|
32
|
+
data: message_data
|
|
33
|
+
)
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module DjiMqttConnect
|
|
4
|
+
module Factories::ServicesMessages
|
|
5
|
+
### Payload control - Camera exposure mode setting ###
|
|
6
|
+
|
|
7
|
+
def build_thing_product_camera_focus_mode_set_services_message(data: build_thing_product_camera_focus_mode_set_services_message_data)
|
|
8
|
+
Thing::Product::CameraFocusModeSetServicesMessage.build(
|
|
9
|
+
data: data
|
|
10
|
+
)
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
def build_thing_product_camera_focus_mode_set_services_message_data
|
|
14
|
+
{
|
|
15
|
+
camera_type: Thing::Product::CameraFocusModeSetServicesMessage::CAMERA_TYPE_ZOOM,
|
|
16
|
+
focus_mode: Thing::Product::CameraFocusModeSetServicesMessage::FOCUS_MODE_MF,
|
|
17
|
+
payload_index: "39-0-7"
|
|
18
|
+
}
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def build_thing_product_camera_focus_mode_set_services_reply_message(result: 0)
|
|
22
|
+
message_data = {
|
|
23
|
+
result: result
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
Thing::Product::CameraFocusModeSetServicesReplyMessage.new(
|
|
27
|
+
bid: SecureRandom.uuid,
|
|
28
|
+
tid: SecureRandom.uuid,
|
|
29
|
+
timestamp: Message.current_timestamp,
|
|
30
|
+
_method: "camera_focus_mode_set",
|
|
31
|
+
_data: message_data,
|
|
32
|
+
data: message_data
|
|
33
|
+
)
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module DjiMqttConnect
|
|
4
|
+
module Factories::ServicesMessages
|
|
5
|
+
### Payload control - Camera focus value setting ###
|
|
6
|
+
|
|
7
|
+
def build_thing_product_camera_focus_value_set_services_message(data: build_thing_product_camera_focus_value_set_services_message_data)
|
|
8
|
+
Thing::Product::CameraFocusValueSetServicesMessage.build(
|
|
9
|
+
data: data
|
|
10
|
+
)
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
def build_thing_product_camera_focus_value_set_services_message_data
|
|
14
|
+
{
|
|
15
|
+
camera_type: Thing::Product::CameraFocusValueSetServicesMessage::CAMERA_TYPE_ZOOM,
|
|
16
|
+
focus_value: 10,
|
|
17
|
+
payload_index: "39-0-7"
|
|
18
|
+
}
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def build_thing_product_camera_focus_value_set_services_reply_message(result: 0)
|
|
22
|
+
message_data = {
|
|
23
|
+
result: result
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
Thing::Product::CameraFocusValueSetServicesReplyMessage.new(
|
|
27
|
+
bid: SecureRandom.uuid,
|
|
28
|
+
tid: SecureRandom.uuid,
|
|
29
|
+
timestamp: Message.current_timestamp,
|
|
30
|
+
_method: "camera_focus_value_set",
|
|
31
|
+
_data: message_data,
|
|
32
|
+
data: message_data
|
|
33
|
+
)
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module DjiMqttConnect
|
|
4
|
+
module Factories::ServicesMessages
|
|
5
|
+
### Payload control - Reset gimbal ###
|
|
6
|
+
|
|
7
|
+
def build_thing_product_camera_look_at_services_message(data: build_thing_product_camera_look_at_services_message_data)
|
|
8
|
+
Thing::Product::CameraLookAtServicesMessage.build(
|
|
9
|
+
data: data
|
|
10
|
+
)
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
def build_thing_product_camera_look_at_services_message_data
|
|
14
|
+
{
|
|
15
|
+
payload_index: "39-0-7",
|
|
16
|
+
locked: true,
|
|
17
|
+
latitude: "37.7749",
|
|
18
|
+
longitude: "-122.4194",
|
|
19
|
+
height: "100.0"
|
|
20
|
+
}
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def build_thing_product_camera_look_at_services_reply_message(result: 0)
|
|
24
|
+
message_data = {
|
|
25
|
+
result: result
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
Thing::Product::CameraLookAtServicesReplyMessage.new(
|
|
29
|
+
bid: SecureRandom.uuid,
|
|
30
|
+
tid: SecureRandom.uuid,
|
|
31
|
+
timestamp: Message.current_timestamp,
|
|
32
|
+
_method: "camera_look_at",
|
|
33
|
+
_data: message_data,
|
|
34
|
+
data: message_data
|
|
35
|
+
)
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module DjiMqttConnect
|
|
4
|
+
module Factories::ServicesMessages
|
|
5
|
+
# Payload control - Switch Camera Mode
|
|
6
|
+
|
|
7
|
+
def build_thing_product_camera_mode_switch_services_message(data: build_thing_product_camera_mode_switch_services_message_data)
|
|
8
|
+
Thing::Product::CameraModeSwitchServicesMessage.build(
|
|
9
|
+
data: data
|
|
10
|
+
)
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
def build_thing_product_camera_mode_switch_services_message_data
|
|
14
|
+
{
|
|
15
|
+
camera_mode: 0,
|
|
16
|
+
payload_index: "39-0-7"
|
|
17
|
+
}
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def build_thing_product_camera_mode_switch_services_reply_message(result: 0)
|
|
21
|
+
message_data = {
|
|
22
|
+
result: result
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
Thing::Product::CameraModeSwitchServicesReplyMessage.new(
|
|
26
|
+
bid: SecureRandom.uuid,
|
|
27
|
+
tid: SecureRandom.uuid,
|
|
28
|
+
timestamp: Message.current_timestamp,
|
|
29
|
+
_method: "camera_mode_switch",
|
|
30
|
+
_data: message_data,
|
|
31
|
+
data: message_data
|
|
32
|
+
)
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module DjiMqttConnect
|
|
4
|
+
module Factories::ServicesMessages
|
|
5
|
+
### Payload control - Stop capturing ###
|
|
6
|
+
|
|
7
|
+
def build_thing_product_camera_photo_stop_services_message(payload_index: "39-0-7")
|
|
8
|
+
message_data = {
|
|
9
|
+
payload_index: payload_index
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
Thing::Product::CameraPhotoStopServicesMessage.build(
|
|
13
|
+
data: message_data
|
|
14
|
+
)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def build_thing_product_camera_photo_stop_services_reply_message(result: 0)
|
|
18
|
+
message_data = {
|
|
19
|
+
result: result
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
Thing::Product::CameraPhotoStopServicesReplyMessage.new(
|
|
23
|
+
bid: SecureRandom.uuid,
|
|
24
|
+
tid: SecureRandom.uuid,
|
|
25
|
+
timestamp: Message.current_timestamp,
|
|
26
|
+
_method: "camera_photo_stop",
|
|
27
|
+
_data: message_data,
|
|
28
|
+
data: message_data
|
|
29
|
+
)
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module DjiMqttConnect
|
|
4
|
+
module Factories::ServicesMessages
|
|
5
|
+
### Payload control - Start capturing ###
|
|
6
|
+
|
|
7
|
+
def build_thing_product_camera_photo_take_services_message(payload_index: "39-0-7")
|
|
8
|
+
message_data = {
|
|
9
|
+
payload_index: payload_index
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
Thing::Product::CameraPhotoTakeServicesMessage.build(
|
|
13
|
+
data: message_data
|
|
14
|
+
)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def build_thing_product_camera_photo_take_services_reply_message(result: 0)
|
|
18
|
+
message_data = {
|
|
19
|
+
result: result
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
Thing::Product::CameraPhotoTakeServicesReplyMessage.new(
|
|
23
|
+
bid: SecureRandom.uuid,
|
|
24
|
+
tid: SecureRandom.uuid,
|
|
25
|
+
timestamp: Message.current_timestamp,
|
|
26
|
+
_method: "camera_photo_take",
|
|
27
|
+
_data: message_data,
|
|
28
|
+
data: message_data
|
|
29
|
+
)
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module DjiMqttConnect
|
|
4
|
+
module Factories::ServicesMessages
|
|
5
|
+
### Payload control - Spot AF ###
|
|
6
|
+
|
|
7
|
+
def build_thing_product_camera_point_focus_action_services_message(data: build_thing_product_camera_point_focus_action_services_message_data)
|
|
8
|
+
Thing::Product::CameraPointFocusActionServicesMessage.build(
|
|
9
|
+
data: data
|
|
10
|
+
)
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
def build_thing_product_camera_point_focus_action_services_message_data
|
|
14
|
+
{
|
|
15
|
+
camera_type: Thing::Product::CameraPointFocusActionServicesMessage::CAMERA_TYPE_ZOOM,
|
|
16
|
+
x: 0.5,
|
|
17
|
+
y: 0.5,
|
|
18
|
+
payload_index: "39-0-7"
|
|
19
|
+
}
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
def build_thing_product_camera_point_focus_action_services_reply_message(result: 0)
|
|
23
|
+
message_data = {
|
|
24
|
+
result: result
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
Thing::Product::CameraPointFocusActionServicesReplyMessage.new(
|
|
28
|
+
bid: SecureRandom.uuid,
|
|
29
|
+
tid: SecureRandom.uuid,
|
|
30
|
+
timestamp: Message.current_timestamp,
|
|
31
|
+
_method: "camera_point_focus_action",
|
|
32
|
+
_data: message_data,
|
|
33
|
+
data: message_data
|
|
34
|
+
)
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module DjiMqttConnect
|
|
4
|
+
module Factories::ServicesMessages
|
|
5
|
+
### Payload control - Start capturing ###
|
|
6
|
+
|
|
7
|
+
def build_thing_product_camera_recording_start_services_message(payload_index: "39-0-7")
|
|
8
|
+
message_data = {
|
|
9
|
+
payload_index: payload_index
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
Thing::Product::CameraRecordingStartServicesMessage.build(
|
|
13
|
+
data: message_data
|
|
14
|
+
)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def build_thing_product_camera_recording_start_services_reply_message(result: 0)
|
|
18
|
+
message_data = {
|
|
19
|
+
result: result
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
Thing::Product::CameraRecordingStartServicesReplyMessage.new(
|
|
23
|
+
bid: SecureRandom.uuid,
|
|
24
|
+
tid: SecureRandom.uuid,
|
|
25
|
+
timestamp: Message.current_timestamp,
|
|
26
|
+
_method: "camera_recording_start",
|
|
27
|
+
_data: message_data,
|
|
28
|
+
data: message_data
|
|
29
|
+
)
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module DjiMqttConnect
|
|
4
|
+
module Factories::ServicesMessages
|
|
5
|
+
### Payload control - Stop Recording ###
|
|
6
|
+
|
|
7
|
+
def build_thing_product_camera_recording_stop_services_message(payload_index: "39-0-7")
|
|
8
|
+
message_data = {
|
|
9
|
+
payload_index: payload_index
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
Thing::Product::CameraRecordingStopServicesMessage.build(
|
|
13
|
+
data: message_data
|
|
14
|
+
)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def build_thing_product_camera_recording_stop_services_reply_message(result: 0)
|
|
18
|
+
message_data = {
|
|
19
|
+
result: result
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
Thing::Product::CameraRecordingStopServicesReplyMessage.new(
|
|
23
|
+
bid: SecureRandom.uuid,
|
|
24
|
+
tid: SecureRandom.uuid,
|
|
25
|
+
timestamp: Message.current_timestamp,
|
|
26
|
+
_method: "camera_recording_stop",
|
|
27
|
+
_data: message_data,
|
|
28
|
+
data: message_data
|
|
29
|
+
)
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module DjiMqttConnect
|
|
4
|
+
module Factories::ServicesMessages
|
|
5
|
+
### Payload control - Screen Drag Control ###
|
|
6
|
+
|
|
7
|
+
def build_thing_product_camera_screen_drag_services_message(data: build_thing_product_camera_screen_drag_services_message_data)
|
|
8
|
+
Thing::Product::CameraScreenDragServicesMessage.build(
|
|
9
|
+
data: data
|
|
10
|
+
)
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
def build_thing_product_camera_screen_drag_services_message_data
|
|
14
|
+
{
|
|
15
|
+
locked: true,
|
|
16
|
+
payload_index: "39-0-7",
|
|
17
|
+
pitch_speed: 0.1,
|
|
18
|
+
yaw_speed: 0.1
|
|
19
|
+
}
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
def build_thing_product_camera_screen_drag_services_reply_message(result: 0)
|
|
23
|
+
message_data = {
|
|
24
|
+
result: result
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
Thing::Product::CameraScreenDragServicesReplyMessage.new(
|
|
28
|
+
bid: SecureRandom.uuid,
|
|
29
|
+
tid: SecureRandom.uuid,
|
|
30
|
+
timestamp: Message.current_timestamp,
|
|
31
|
+
_method: "camera_screen_drag",
|
|
32
|
+
_data: message_data,
|
|
33
|
+
data: message_data
|
|
34
|
+
)
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module DjiMqttConnect
|
|
4
|
+
module Factories::ServicesMessages
|
|
5
|
+
### Payload control - Split Screen ###
|
|
6
|
+
#
|
|
7
|
+
def build_thing_product_camera_screen_split_services_message(data: build_thing_product_camera_screen_split_services_message_data)
|
|
8
|
+
Thing::Product::CameraScreenSplitServicesMessage.build(
|
|
9
|
+
data: data
|
|
10
|
+
)
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
def build_thing_product_camera_screen_split_services_message_data
|
|
14
|
+
{
|
|
15
|
+
payload_index: "39-0-7",
|
|
16
|
+
enable: true
|
|
17
|
+
}
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def build_thing_product_camera_screen_split_services_reply_message(result: 0)
|
|
21
|
+
message_data = {
|
|
22
|
+
result: result
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
Thing::Product::CameraScreenSplitServicesReplyMessage.new(
|
|
26
|
+
bid: SecureRandom.uuid,
|
|
27
|
+
tid: SecureRandom.uuid,
|
|
28
|
+
timestamp: Message.current_timestamp,
|
|
29
|
+
_method: "camera_screen_split",
|
|
30
|
+
_data: message_data,
|
|
31
|
+
data: message_data
|
|
32
|
+
)
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module DjiMqttConnect
|
|
4
|
+
module Factories::ServicesMessages
|
|
5
|
+
### Payload control - Reset gimbal ###
|
|
6
|
+
|
|
7
|
+
def build_thing_product_gimbal_reset_services_message(data: build_thing_product_gimbal_reset_services_message_data)
|
|
8
|
+
Thing::Product::GimbalResetServicesMessage.build(
|
|
9
|
+
data: data
|
|
10
|
+
)
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
def build_thing_product_gimbal_reset_services_message_data
|
|
14
|
+
{
|
|
15
|
+
payload_index: "39-0-7",
|
|
16
|
+
reset_mode: Thing::Product::GimbalResetServicesMessage::RESET_MODE_RESET
|
|
17
|
+
}
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def build_thing_product_gimbal_reset_services_reply_message(result: 0)
|
|
21
|
+
message_data = {
|
|
22
|
+
result: result
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
Thing::Product::GimbalResetServicesReplyMessage.new(
|
|
26
|
+
bid: SecureRandom.uuid,
|
|
27
|
+
tid: SecureRandom.uuid,
|
|
28
|
+
timestamp: Message.current_timestamp,
|
|
29
|
+
_method: "gimbal_reset",
|
|
30
|
+
_data: message_data,
|
|
31
|
+
data: message_data
|
|
32
|
+
)
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module DjiMqttConnect
|
|
4
|
+
module Factories::ServicesMessages
|
|
5
|
+
### Payload control - Infrared temperature measurement area setting ###
|
|
6
|
+
|
|
7
|
+
def build_thing_product_ir_metering_area_set_services_message(data: build_thing_product_ir_metering_area_set_services_message_data)
|
|
8
|
+
Thing::Product::IrMeteringAreaSetServicesMessage.build(
|
|
9
|
+
data: data
|
|
10
|
+
)
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
def build_thing_product_ir_metering_area_set_services_message_data
|
|
14
|
+
{
|
|
15
|
+
x: 0.5,
|
|
16
|
+
y: 0.5,
|
|
17
|
+
width: 0.3,
|
|
18
|
+
height: 0.3,
|
|
19
|
+
payload_index: "39-0-7"
|
|
20
|
+
}
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def build_thing_product_ir_metering_area_set_services_reply_message(result: 0)
|
|
24
|
+
message_data = {
|
|
25
|
+
result: result
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
Thing::Product::IrMeteringAreaSetServicesReplyMessage.new(
|
|
29
|
+
bid: SecureRandom.uuid,
|
|
30
|
+
tid: SecureRandom.uuid,
|
|
31
|
+
timestamp: Message.current_timestamp,
|
|
32
|
+
_method: "ir_metering_area_set",
|
|
33
|
+
_data: message_data,
|
|
34
|
+
data: message_data
|
|
35
|
+
)
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module DjiMqttConnect
|
|
4
|
+
module Factories::ServicesMessages
|
|
5
|
+
### Payload control - Infrared temperature measurement mode setting ###
|
|
6
|
+
|
|
7
|
+
def build_thing_product_ir_metering_mode_set_services_message(data: build_thing_product_ir_metering_mode_set_services_message_data)
|
|
8
|
+
Thing::Product::IrMeteringModeSetServicesMessage.build(
|
|
9
|
+
data: data
|
|
10
|
+
)
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
def build_thing_product_ir_metering_mode_set_services_message_data
|
|
14
|
+
{
|
|
15
|
+
mode: Thing::Product::IrMeteringModeSetServicesMessage::MODE_POINT,
|
|
16
|
+
payload_index: "39-0-7"
|
|
17
|
+
}
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def build_thing_product_ir_metering_mode_set_services_reply_message(result: 0)
|
|
21
|
+
message_data = {
|
|
22
|
+
result: result
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
Thing::Product::IrMeteringModeSetServicesReplyMessage.new(
|
|
26
|
+
bid: SecureRandom.uuid,
|
|
27
|
+
tid: SecureRandom.uuid,
|
|
28
|
+
timestamp: Message.current_timestamp,
|
|
29
|
+
_method: "ir_metering_mode_set",
|
|
30
|
+
_data: message_data,
|
|
31
|
+
data: message_data
|
|
32
|
+
)
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|