dji_mqtt_connect 0.1.25.4 → 0.1.26
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/messages/thing/product/osd/dock.rb +6 -1
- data/lib/dji_mqtt_connect/messages/thing/product/osd/drone.rb +5 -0
- data/lib/dji_mqtt_connect/messages/thing/product/state_message.rb +3 -0
- data/lib/dji_mqtt_connect/mixins/humanized_camera_index.rb +14 -0
- data/lib/dji_mqtt_connect/types.rb +2 -0
- data/lib/dji_mqtt_connect/version.rb +1 -1
- data/lib/dji_mqtt_connect.rb +1 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 23eb2ea3616726bb5b0d39c18e2d38e30cc35eed431a3cf87276b46c82859a2b
|
4
|
+
data.tar.gz: 66c19f5c2d5590fc4c5ec2c9386103701ab6552f8358b6e06687d5e1c33916ff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d4efc4a9189f25682e33a8b55ec163f15dc5be9538340993a07ee5b2e31bdf67f87a14dd93f6be3b134d9687b9b4c61460eb8aecbaa119f2953a13ecea7e582d
|
7
|
+
data.tar.gz: 4bc20214cdde4b0c532bc09fd0502dfbdcb6a120d2cf724a828f5fdefcf2ee26aa93d7b6576c1ece731a10613e9e8ed5e8da8761af3cadf6058e830c929bc272
|
@@ -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"
|
@@ -207,7 +207,12 @@ module DjiMqttConnect
|
|
207
207
|
# {"0":"Not start","1":"fixing","2":"fix successfully","3":"fix failed"}
|
208
208
|
attribute :is_fixed, Types::Integer.enum(0, 1, 2, 3)
|
209
209
|
|
210
|
-
attribute :quality, Types::Integer
|
210
|
+
attribute :quality, Types::Integer
|
211
|
+
|
212
|
+
def quality?
|
213
|
+
quality && Types::PositionStateQuality.valid?(quality)
|
214
|
+
end
|
215
|
+
|
211
216
|
attribute :gps_number, Types::Integer
|
212
217
|
attribute :rtk_number, Types::Integer
|
213
218
|
end
|
@@ -74,6 +74,11 @@ module DjiMqttConnect
|
|
74
74
|
attribute :gps_number, Types::Integer
|
75
75
|
attribute :is_fixed, Types::Integer
|
76
76
|
attribute :quality, Types::Integer
|
77
|
+
|
78
|
+
def quality?
|
79
|
+
quality && Types::PositionStateQuality.valid?(quality)
|
80
|
+
end
|
81
|
+
|
77
82
|
attribute :rtk_number, Types::Integer
|
78
83
|
end
|
79
84
|
attribute? :storage do
|
@@ -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
|
@@ -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
|
@@ -137,6 +137,8 @@ module DjiMqttConnect
|
|
137
137
|
"plc_check"
|
138
138
|
)
|
139
139
|
|
140
|
+
PositionStateQuality = Types::Integer.enum(1, 2, 3, 4, 5, 10)
|
141
|
+
|
140
142
|
# {"sent":"sent","in_progress":"in progress","ok":"success","paused":"paused","rejected":"rejected","failed":"failed","canceled":"canceled or stopped","timeout":"timeout"}
|
141
143
|
ServicesOutputStatus = Types::String.enum(
|
142
144
|
SERVICE_OUTPUT_STATUS_SENT = "sent",
|
data/lib/dji_mqtt_connect.rb
CHANGED
@@ -162,6 +162,7 @@ module DjiMqttConnect
|
|
162
162
|
# Mixinx
|
163
163
|
module Mixins
|
164
164
|
autoload :EventsProgressChecks, "dji_mqtt_connect/mixins/events_progress_checks"
|
165
|
+
autoload :HumanizedCameraIndex, "dji_mqtt_connect/mixins/humanized_camera_index"
|
165
166
|
autoload :LatitudeConditional, "dji_mqtt_connect/mixins/latitude_conditional"
|
166
167
|
autoload :LongitudeConditional, "dji_mqtt_connect/mixins/longitude_conditional"
|
167
168
|
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.26
|
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-02-
|
11
|
+
date: 2025-02-19 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
|
@@ -246,6 +247,7 @@ files:
|
|
246
247
|
- lib/dji_mqtt_connect/messages/thing/product/state_message.rb
|
247
248
|
- lib/dji_mqtt_connect/messages/thing/product/state_reply_message.rb
|
248
249
|
- lib/dji_mqtt_connect/mixins/events_progress_checks.rb
|
250
|
+
- lib/dji_mqtt_connect/mixins/humanized_camera_index.rb
|
249
251
|
- lib/dji_mqtt_connect/mixins/latitude_conditional.rb
|
250
252
|
- lib/dji_mqtt_connect/mixins/longitude_conditional.rb
|
251
253
|
- lib/dji_mqtt_connect/mixins/result_message.rb
|