dji_mqtt_connect 0.1.25.5 → 0.1.27
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/camera_index.en.yml +38 -0
- data/lib/dji_mqtt_connect/factories/events_messages.rb +17 -0
- data/lib/dji_mqtt_connect/messages/thing/product/events/release_terminal_control_area.rb +20 -0
- data/lib/dji_mqtt_connect/messages/thing/product/state_message.rb +5 -2
- data/lib/dji_mqtt_connect/mixins/humanized_camera_index.rb +14 -0
- data/lib/dji_mqtt_connect/version.rb +1 -1
- data/lib/dji_mqtt_connect.rb +2 -0
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: febe819881174b9cea42366a7b84af6a0aeac15b67ef961bddecc3fb010b2939
|
4
|
+
data.tar.gz: fb92a5a086fb526be0a9c4a00113f270f0b146c2fb79f722ea7b14002fa3e13e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fa06a22f69a7a603152fd2ebe1c914e56b3cbb3f600cf04c6a8fc26823681a7e12b8f12e086eedcd65d7c0dab919137d0e21cf440bde6e022eadf4eeb0ed3ae5
|
7
|
+
data.tar.gz: f5692ab2e3dd027f8619efc6ffff890ab08845c5dce5856c53f7d011839a77e0aaaaa75527900d61786fb2fdc45d0e56be0134a4b4bb4084aecba8b3e0918ce8
|
@@ -0,0 +1,38 @@
|
|
1
|
+
en:
|
2
|
+
dji_mqtt_connect:
|
3
|
+
camera_index:
|
4
|
+
39-0-7: "Aircraft FPV"
|
5
|
+
176-0-0: "Vision Assist"
|
6
|
+
20-0-0: "Zenmuse Z30 Portside Camera"
|
7
|
+
20-0-1: "Zenmuse Z30 Starboard Camera"
|
8
|
+
20-0-2: "Zenmuse Z30 Upside Camera"
|
9
|
+
26-0-0: "Zenmuse XT2 Portside Camera"
|
10
|
+
26-0-1: "Zenmuse XT2 Starboard Camera"
|
11
|
+
26-0-2: "Zenmuse XT2 Upside Camera"
|
12
|
+
41-0-0: "Zenmuse XTS Portside Camera"
|
13
|
+
41-0-1: "Zenmuse XTS Starboard Camera"
|
14
|
+
41-0-2: "Zenmuse XTS Upside Camera"
|
15
|
+
42-0-0: "Zenmuse H20 Portside Camera"
|
16
|
+
42-0-1: "Zenmuse H20 Starboard Camera"
|
17
|
+
42-0-2: "Zenmuse H20 Upside Camera"
|
18
|
+
43-0-0: "Zenmuse H20T Portside Camera"
|
19
|
+
43-0-1: "Zenmuse H20T Starboard Camera"
|
20
|
+
43-0-2: "Zenmuse H20T Upside Camera"
|
21
|
+
61-0-0: "Zenmuse H20N Portside Camera"
|
22
|
+
61-0-1: "Zenmuse H20N Starboard Camera"
|
23
|
+
61-0-2: "Zenmuse H20N Upside Camera"
|
24
|
+
82-0-0: "Zenmuse H30 Portside Camera"
|
25
|
+
82-0-1: "Zenmuse H30 Starboard Camera"
|
26
|
+
82-0-2: "Zenmuse H30 Upside Camera"
|
27
|
+
83-0-0: "Zenmuse H30T Portside Camera"
|
28
|
+
83-0-1: "Zenmuse H30T Starboard Camera"
|
29
|
+
83-0-2: "Zenmuse H30T Upside Camera"
|
30
|
+
52-0-0: "Matrice 30 Camera"
|
31
|
+
53-0-0: "Matrice 30T Camera"
|
32
|
+
88-0-0: "DJI Matrice 4E Camera"
|
33
|
+
89-0-0: "DJI Matrice 4T Camera"
|
34
|
+
66-0-0: "Mavic 3E Camera"
|
35
|
+
67-0-0: "Mavic 3T Camera"
|
36
|
+
80-0-0: "Mavic 3D Camera"
|
37
|
+
81-0-0: "Matrice 3TD Camera"
|
38
|
+
165-0-7: "DJI Dock Camera"
|
@@ -256,6 +256,23 @@ module DjiMqttConnect
|
|
256
256
|
)
|
257
257
|
end
|
258
258
|
|
259
|
+
def build_thing_product_release_terminal_control_area_events_message
|
260
|
+
message_data = {
|
261
|
+
flight_id: SecureRandom.uuid,
|
262
|
+
reason: 0
|
263
|
+
}
|
264
|
+
|
265
|
+
Thing::Product::ReleaseTerminalControlAreaEventsMessage.new(
|
266
|
+
bid: Message.generate_bid,
|
267
|
+
tid: Message.generate_tid,
|
268
|
+
timestamp: Message.current_timestamp,
|
269
|
+
_method: "release_terminal_control_area",
|
270
|
+
need_reply: 1,
|
271
|
+
data: message_data,
|
272
|
+
_data: message_data
|
273
|
+
)
|
274
|
+
end
|
275
|
+
|
259
276
|
def build_thing_product_return_home_info_events_message
|
260
277
|
message_data = {
|
261
278
|
flight_id: "5c746ff3-3b3e-4787-8e06-23c491a99a13",
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module DjiMqttConnect
|
4
|
+
module Thing::Product
|
5
|
+
# NOTE: Message is not documented, but observed from Dock 3
|
6
|
+
class ReleaseTerminalControlAreaEventsMessage < EventsMessage
|
7
|
+
attribute :_method, Types::String.enum("release_terminal_control_area")
|
8
|
+
|
9
|
+
attribute :data do
|
10
|
+
attribute :flight_id, Types::String
|
11
|
+
attribute :reason, Types::Integer
|
12
|
+
end
|
13
|
+
|
14
|
+
# All the flight IDs in the message
|
15
|
+
def flight_ids
|
16
|
+
[data.flight_id]
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -98,7 +98,7 @@ module DjiMqttConnect
|
|
98
98
|
|
99
99
|
attribute? :cameras, Types::Array do
|
100
100
|
attribute? :camera_mode, Types::Integer
|
101
|
-
attribute :liveview_world_region do
|
101
|
+
attribute? :liveview_world_region do
|
102
102
|
attribute :bottom, Types::JSON::Decimal
|
103
103
|
attribute :left, Types::JSON::Decimal
|
104
104
|
attribute :right, Types::JSON::Decimal
|
@@ -145,6 +145,9 @@ module DjiMqttConnect
|
|
145
145
|
attribute :coexist_video_number_max, Types::Integer
|
146
146
|
attribute :camera_list, Types::Array do
|
147
147
|
attribute :camera_index, Types::String
|
148
|
+
|
149
|
+
include Mixins::HumanizedCameraIndex
|
150
|
+
|
148
151
|
attribute :available_video_number, Types::Integer
|
149
152
|
attribute :coexist_video_number_max, Types::Integer
|
150
153
|
attribute :video_list, Types::Array do
|
@@ -192,7 +195,7 @@ module DjiMqttConnect
|
|
192
195
|
attribute? :wireless_link_topo do
|
193
196
|
attribute :center_node do
|
194
197
|
attribute :sdr_id, Types::Integer
|
195
|
-
attribute :sn, Types::SerialNumber
|
198
|
+
attribute :sn, Types::SerialNumber.optional
|
196
199
|
end
|
197
200
|
|
198
201
|
attribute :leaf_nodes, Types::Array do
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module DjiMqttConnect
|
4
|
+
module Mixins
|
5
|
+
# Provides a conditional that returns false for nil for invalid latitude values
|
6
|
+
module HumanizedCameraIndex
|
7
|
+
def humanised_camera_index
|
8
|
+
return unless camera_index.present?
|
9
|
+
|
10
|
+
I18n.t(camera_index, scope: "dji_mqtt_connect.camera_index", default: camera_index)
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
data/lib/dji_mqtt_connect.rb
CHANGED
@@ -51,6 +51,7 @@ module DjiMqttConnect
|
|
51
51
|
autoload :HighestPriorityUploadFlighttaskMediaEventsMessage, "dji_mqtt_connect/messages/thing/product/events/highest_priority_upload_flighttask_media"
|
52
52
|
autoload :HmsEventsMessage, "dji_mqtt_connect/messages/thing/product/events/hms"
|
53
53
|
autoload :OfflineMapSyncProgressEventsMessage, "dji_mqtt_connect/messages/thing/product/events/offline_map_sync_progress"
|
54
|
+
autoload :ReleaseTerminalControlAreaEventsMessage, "dji_mqtt_connect/messages/thing/product/events/release_terminal_control_area"
|
54
55
|
autoload :ReturnHomeInfoEventsMessage, "dji_mqtt_connect/messages/thing/product/events/return_home_info"
|
55
56
|
autoload :StatusCodeEventsMessage, "dji_mqtt_connect/messages/thing/product/events/status_code"
|
56
57
|
autoload :TakeoffToPointProgressEventsMessage, "dji_mqtt_connect/messages/thing/product/events/takeoff_to_point_progress"
|
@@ -162,6 +163,7 @@ module DjiMqttConnect
|
|
162
163
|
# Mixinx
|
163
164
|
module Mixins
|
164
165
|
autoload :EventsProgressChecks, "dji_mqtt_connect/mixins/events_progress_checks"
|
166
|
+
autoload :HumanizedCameraIndex, "dji_mqtt_connect/mixins/humanized_camera_index"
|
165
167
|
autoload :LatitudeConditional, "dji_mqtt_connect/mixins/latitude_conditional"
|
166
168
|
autoload :LongitudeConditional, "dji_mqtt_connect/mixins/longitude_conditional"
|
167
169
|
autoload :ServicesOutputStatusChecks, "dji_mqtt_connect/mixins/services_output_status_checks"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dji_mqtt_connect
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.27
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sphere Drones
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-03-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -116,6 +116,7 @@ files:
|
|
116
116
|
- Gemfile
|
117
117
|
- README.md
|
118
118
|
- Rakefile
|
119
|
+
- config/locales/camera_index.en.yml
|
119
120
|
- config/locales/flighttask_status.en.yml
|
120
121
|
- config/locales/hms_event_codes.en.yml
|
121
122
|
- config/locales/hms_event_codes.zh.yml
|
@@ -173,6 +174,7 @@ files:
|
|
173
174
|
- lib/dji_mqtt_connect/messages/thing/product/events/highest_priority_upload_flighttask_media.rb
|
174
175
|
- lib/dji_mqtt_connect/messages/thing/product/events/hms.rb
|
175
176
|
- lib/dji_mqtt_connect/messages/thing/product/events/offline_map_sync_progress.rb
|
177
|
+
- lib/dji_mqtt_connect/messages/thing/product/events/release_terminal_control_area.rb
|
176
178
|
- lib/dji_mqtt_connect/messages/thing/product/events/return_home_info.rb
|
177
179
|
- lib/dji_mqtt_connect/messages/thing/product/events/status_code.rb
|
178
180
|
- lib/dji_mqtt_connect/messages/thing/product/events/takeoff_to_point_progress.rb
|
@@ -246,6 +248,7 @@ files:
|
|
246
248
|
- lib/dji_mqtt_connect/messages/thing/product/state_message.rb
|
247
249
|
- lib/dji_mqtt_connect/messages/thing/product/state_reply_message.rb
|
248
250
|
- lib/dji_mqtt_connect/mixins/events_progress_checks.rb
|
251
|
+
- lib/dji_mqtt_connect/mixins/humanized_camera_index.rb
|
249
252
|
- lib/dji_mqtt_connect/mixins/latitude_conditional.rb
|
250
253
|
- lib/dji_mqtt_connect/mixins/longitude_conditional.rb
|
251
254
|
- lib/dji_mqtt_connect/mixins/result_message.rb
|