dji_mqtt_connect 0.1.29.2 → 0.1.30

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.
Files changed (30) hide show
  1. checksums.yaml +4 -4
  2. data/config/locales/thing_product_osd.en.yml +1 -0
  3. data/lib/dji_mqtt_connect/factories.rb +71 -0
  4. data/lib/dji_mqtt_connect/marshals/thing/product/osd_marshal.rb +3 -3
  5. data/lib/dji_mqtt_connect/marshals/thing/product/requests_marshal.rb +9 -0
  6. data/lib/dji_mqtt_connect/messages/sys/product/status_message.rb +1 -1
  7. data/lib/dji_mqtt_connect/messages/sys/product/status_reply_message.rb +1 -1
  8. data/lib/dji_mqtt_connect/messages/thing/product/events/device_log.rb +1 -1
  9. data/lib/dji_mqtt_connect/messages/thing/product/events/fileupload_progress.rb +1 -1
  10. data/lib/dji_mqtt_connect/messages/thing/product/events_message.rb +1 -1
  11. data/lib/dji_mqtt_connect/messages/thing/product/events_reply_message.rb +1 -1
  12. data/lib/dji_mqtt_connect/messages/thing/product/osd/flight_hub_dock.rb +12 -0
  13. data/lib/dji_mqtt_connect/messages/thing/product/osd/flight_hub_drone.rb +135 -0
  14. data/lib/dji_mqtt_connect/messages/thing/product/osd_message.rb +1 -1
  15. data/lib/dji_mqtt_connect/messages/thing/product/requests/offline_map_get_v2.rb +1 -1
  16. data/lib/dji_mqtt_connect/messages/thing/product/requests_message.rb +1 -1
  17. data/lib/dji_mqtt_connect/messages/thing/product/requests_reply_message.rb +1 -1
  18. data/lib/dji_mqtt_connect/messages/thing/product/services/fileupload_start.rb +2 -2
  19. data/lib/dji_mqtt_connect/messages/thing/product/services/flighttask_prepare.rb +3 -3
  20. data/lib/dji_mqtt_connect/messages/thing/product/services/flighttask_stop.rb +1 -1
  21. data/lib/dji_mqtt_connect/messages/thing/product/services/live_stop_push.rb +1 -1
  22. data/lib/dji_mqtt_connect/messages/thing/product/services_message.rb +1 -1
  23. data/lib/dji_mqtt_connect/messages/thing/product/services_reply_message.rb +1 -1
  24. data/lib/dji_mqtt_connect/messages/thing/product/state_message.rb +1 -1
  25. data/lib/dji_mqtt_connect/messages/thing/product/state_reply_message.rb +1 -1
  26. data/lib/dji_mqtt_connect/translations.rb +4 -0
  27. data/lib/dji_mqtt_connect/types.rb +5 -2
  28. data/lib/dji_mqtt_connect/version.rb +1 -1
  29. data/lib/dji_mqtt_connect.rb +1 -0
  30. metadata +3 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bbbbf8d76b4b59cfa044b9bc78b1f15d29da687eb415ff3ace8b5b5eea8c65fc
4
- data.tar.gz: 249408710024a2b88f9b43550c62051b712d18ff2e9c90ce14e2ba049a05a180
3
+ metadata.gz: 1970e0a7336ae5097dce7afb34a8ebd0d5267eee02c326199716ed2c95e7d276
4
+ data.tar.gz: 21baf8d1756fb4add30ce19ae7cc4f7f3df7d893cbe18853a748d7c08a5aec06
5
5
  SHA512:
6
- metadata.gz: e7459b05b6ab7bdf2940280bf5b9512e5dc71c371ddca6c738d8e857fcc78d9f017758b298dbb2514e0f9e5d76bc811406660e71fc19d1084936334c7d715e8e
7
- data.tar.gz: b590ee8f812a960bd32f4dc66307cc992014236da45647bb2d9189fe751e742ab07f45bbdc26b93eb2054b37fc28eb1e4b47816817eb0a4e4c6b57d65a18b330
6
+ metadata.gz: f7a5b75dad5eba4150c375d573ed4ebbc9a808f20d388de161383e1e306254bf01177e229035b4f55836302699ff32fd431d78ffff9a09bb035e52198d6e10bf
7
+ data.tar.gz: 46da87f973ee3ef4eb11beec649c3dcb4e7c392a778c72b66a82e766391b1102de9f585f614da69de81a2142e58b04a0ae3558a0c0e49eda3f712aabeac01f27
@@ -3,6 +3,7 @@ en:
3
3
  thing_product_osd_summary:
4
4
  default: "Received OSD message"
5
5
  flight_hub_dock: "Received OSD message from FlightHub Dock"
6
+ flight_hub_drone: "Received OSD message from FlightHub Drone"
6
7
  dock: "Received OSD message from Dock"
7
8
  drone: "Received OSD message from Drone"
8
9
  remote: "Received OSD message from Remote"
@@ -243,6 +243,77 @@ module DjiMqttConnect
243
243
  )
244
244
  end
245
245
 
246
+ def build_thing_product_flight_hub_drone_osd_message
247
+ message_data = {
248
+ host: {
249
+ activation_time: 1682969151,
250
+ attitude_head: 164.2085418701172,
251
+ attitude_pitch: -2.0999999046325684,
252
+ attitude_roll: 0.30000001192092896,
253
+ battery: {
254
+ batteries: [
255
+ {
256
+ capacity_percent: 95,
257
+ firmware_version: "01.00.0600",
258
+ index: 0,
259
+ loop_times: 27,
260
+ sn: "BATTERY01",
261
+ sub_type: 67,
262
+ temperature: 38,
263
+ type: 2,
264
+ voltage: 24200
265
+ }
266
+ ],
267
+ capacity_percent: 95,
268
+ landing_power: 20,
269
+ remain_flight_time: 19,
270
+ return_home_power: 25
271
+ },
272
+ distance_limit_status: {
273
+ distance_limit: 500,
274
+ is_near_distance_limit: 0,
275
+ state: 1
276
+ },
277
+ elevation: 62.20537567138672,
278
+ firmware_version: "01.00.0600",
279
+ gear: 0,
280
+ height: 62.20537567138672,
281
+ height_limit: 500,
282
+ home_distance: 23.390625,
283
+ horizontal_speed: 0.10000000149011612,
284
+ latitude: -33.768706649492614,
285
+ longitude: 150.9497880000493,
286
+ mode_code: 0,
287
+ position_state: {
288
+ gps_number: 6,
289
+ is_fixed: 3,
290
+ quality: 5,
291
+ rtk_number: 30
292
+ },
293
+ storage: {
294
+ total: 53082240,
295
+ used: 14370264
296
+ },
297
+ total_flight_distance: 1234.5,
298
+ total_flight_time: 146930,
299
+ track_id: nil,
300
+ vertical_speed: -0.30000001192092896,
301
+ wind_direction: 180,
302
+ wind_speed: 0.800000011920929
303
+ },
304
+ sn: "DRONE01"
305
+ }
306
+
307
+ Thing::Product::FlightHubDroneOsdMessage.new(
308
+ OrganizationUUID: "b13d0443-4379-461b-b985-18184ffd324d",
309
+ biz_code: "device_osd",
310
+ version: "1.0",
311
+ timestamp: Message.current_timestamp,
312
+ data: message_data,
313
+ _data: message_data
314
+ )
315
+ end
316
+
246
317
  # Status
247
318
 
248
319
  def build_thing_product_update_topo_message_with_online_device
@@ -59,7 +59,9 @@ module DjiMqttConnect
59
59
 
60
60
  message_data = parsed_message.fetch("data", {})
61
61
 
62
- message_class = if parsed_message.key?("OrganizationUUID")
62
+ message_class = if FlightHubDroneOsdMessage.matches?(parsed_message)
63
+ FlightHubDroneOsdMessage
64
+ elsif FlightHubDockOsdMessage.matches?(parsed_message)
63
65
  FlightHubDockOsdMessage
64
66
  elsif drone_osd_data_attributes.all? { |attribute| message_data.key?(attribute.to_s) }
65
67
  DroneOsdMessage
@@ -74,8 +76,6 @@ module DjiMqttConnect
74
76
 
75
77
  transformed_message = osd_transformer.call(parsed_message)
76
78
 
77
- puts JSON.pretty_generate(transformed_message)
78
-
79
79
  build_message(message_class, transformed_message)
80
80
  end
81
81
 
@@ -12,9 +12,18 @@ module DjiMqttConnect
12
12
  # Rename pesky `method` argument to `_method` and makes a copy of the raw data
13
13
  class RequestsTransformer < Dry::Transformer::Pipe
14
14
  import Dry::Transformer::HashTransformations
15
+ import Dry::Transformer::Conditional
15
16
 
16
17
  define! do
18
+ # Convert nil data to empty hash
19
+ guard ->(data) { data["data"].nil? } do
20
+ map_value "data", ->(_) { {} }
21
+ end
22
+
23
+ # Keep a copy of the original data hash
17
24
  copy_keys "data" => "_data"
25
+
26
+ # Prevent clash with Ruby reserved word
18
27
  rename_keys "method" => "_method"
19
28
  end
20
29
  end
@@ -6,7 +6,7 @@ module DjiMqttConnect
6
6
  class StatusMessage < DjiMqttConnect::Message
7
7
  attribute :tid, Types::UUID
8
8
  attribute :bid, Types::UUID
9
- attribute :timestamp, Types::Timestamp
9
+ attribute :timestamp, Types::TimestampMS
10
10
 
11
11
  attribute :_data, Types::Hash
12
12
  attribute :_method, Types::String
@@ -8,7 +8,7 @@ module DjiMqttConnect
8
8
 
9
9
  attribute :tid, Types::UUID
10
10
  attribute :bid, Types::UUID
11
- attribute :timestamp, Types::Timestamp
11
+ attribute :timestamp, Types::TimestampMS
12
12
 
13
13
  attribute :_method, Types::String
14
14
 
@@ -12,7 +12,7 @@ module DjiMqttConnect
12
12
  attribute :level, Types::Integer
13
13
  attribute :key, Types::Integer
14
14
  attribute :module, Types::Integer
15
- attribute :create_time, Types::Timestamp
15
+ attribute :create_time, Types::TimestampMS
16
16
  attribute :args, Types::Hash
17
17
  end
18
18
  end
@@ -26,7 +26,7 @@ module DjiMqttConnect
26
26
  attribute :current_step, Types::Integer
27
27
  attribute? :total_step, Types::Integer
28
28
  attribute :progress, Types::Integer
29
- attribute? :finish_time, Types::Timestamp
29
+ attribute? :finish_time, Types::TimestampMS
30
30
  attribute :upload_rate, Types::Integer
31
31
  attribute? :result, Types::Integer
32
32
  attribute :status, Types::String
@@ -5,7 +5,7 @@ module DjiMqttConnect
5
5
  class EventsMessage < DjiMqttConnect::Message
6
6
  attribute :bid, Types::UUID
7
7
  attribute :tid, Types::UUID
8
- attribute :timestamp, Types::Timestamp
8
+ attribute :timestamp, Types::TimestampMS
9
9
 
10
10
  # Can be determined from the topic, but included for convenience
11
11
  attribute? :gateway, Types::SerialNumber
@@ -22,7 +22,7 @@ module DjiMqttConnect
22
22
 
23
23
  attribute :bid, Types::UUID
24
24
  attribute :tid, Types::UUID
25
- attribute :timestamp, Types::Timestamp
25
+ attribute :timestamp, Types::TimestampMS
26
26
 
27
27
  attribute :_method, Types::String
28
28
 
@@ -3,6 +3,18 @@
3
3
  module DjiMqttConnect
4
4
  module Thing::Product
5
5
  class FlightHubDockOsdMessage < OsdMessage
6
+ def self.matches?(parsed_message_data)
7
+ parsed_message_data.key?("OrganizationUUID") &&
8
+ parsed_message_data.dig("data", "host").is_a?(Hash) &&
9
+ FlightHubDockOsdMessage::Data::Host.schema.keys.all? do |key|
10
+ key.required? ? parsed_message_data.dig("data", "host").key?(key.name.to_s) : true
11
+ end
12
+ end
13
+
14
+ attribute :OrganizationUUID, Types::UUID
15
+ attribute :biz_code, Types::String
16
+ attribute :version, Types::String
17
+
6
18
  attribute :data do
7
19
  attribute :host do
8
20
  attribute? :acc_time, Types::Integer
@@ -0,0 +1,135 @@
1
+ # frozen_string_literal: true
2
+
3
+ module DjiMqttConnect
4
+ module Thing::Product
5
+ class FlightHubDroneOsdMessage < OsdMessage
6
+ def self.matches?(parsed_message_data)
7
+ required_keys = FlightHubDroneOsdMessage::Data::Host.schema.keys.select(&:required?)
8
+
9
+ parsed_message_data.key?("OrganizationUUID") &&
10
+ parsed_message_data.dig("data", "host").is_a?(Hash) &&
11
+ required_keys.all? do |key|
12
+ parsed_message_data.dig("data", "host").key?(key.name.to_s)
13
+ end
14
+ end
15
+
16
+ attribute :OrganizationUUID, Types::UUID
17
+ attribute :biz_code, Types::String
18
+ attribute :version, Types::String
19
+
20
+ attribute :data do
21
+ attribute :host do
22
+ attribute :activation_time, Types::Timestamp | Types::NullInteger
23
+
24
+ attribute :attitude_head, Types::JSON::Decimal
25
+
26
+ attribute :attitude_pitch, Types::JSON::Decimal
27
+
28
+ attribute :attitude_roll, Types::JSON::Decimal
29
+
30
+ attribute :battery do
31
+ attribute :batteries, Types::Array do
32
+ attribute :capacity_percent, Types::Integer
33
+ include Mixins::CapacityPercent
34
+
35
+ attribute :firmware_version, Types::String | Types::Nil
36
+ attribute? :high_voltage_storage_days, Types::Integer
37
+
38
+ attribute :index, Types::Integer
39
+
40
+ attribute :loop_times, Types::Integer
41
+
42
+ attribute :sn, Types::SerialNumber | Types::Nil
43
+
44
+ attribute :sub_type, Types::DeviceSubType
45
+
46
+ attribute :temperature, Types::Temperature
47
+ include Mixins::Temperature
48
+
49
+ attribute :type, Types::DeviceType
50
+
51
+ attribute :voltage, Types::Integer
52
+ end
53
+
54
+ attribute :capacity_percent, Types::Integer
55
+ include Mixins::CapacityPercent
56
+
57
+ attribute :landing_power, Types::Integer
58
+
59
+ attribute :remain_flight_time, Types::Integer
60
+
61
+ attribute :return_home_power, Types::Integer
62
+ end
63
+ attribute? :distance_limit_status do
64
+ attribute :distance_limit, Types::Integer
65
+
66
+ # {"0":"Not reached","1":"Reached"}
67
+ attribute? :is_near_distance_limit, Types::Integer.enum(0, 1)
68
+
69
+ # {"0":"Not set","1":"Have been set"}
70
+
71
+ attribute :state, Types::Integer.enum(0, 1)
72
+ end
73
+
74
+ attribute :elevation, Types::JSON::Decimal
75
+
76
+ attribute? :firmware_version, Types::String | Types::Nil
77
+
78
+ attribute :gear, Types::Integer
79
+
80
+ attribute :height, Types::JSON::Decimal
81
+
82
+ attribute? :height_limit, Types::JSON::Decimal
83
+
84
+ attribute :home_distance, Types::JSON::Decimal
85
+
86
+ attribute :horizontal_speed, Types::JSON::Decimal
87
+
88
+ attribute :latitude, Types::Latitude
89
+ include Mixins::Latitude
90
+
91
+ attribute :longitude, Types::Longitude
92
+ include Mixins::Longitude
93
+
94
+ # {"0":"Standby","1":"Takeoff preparation","2":"Takeoff preparation completed","3":"Manual flight","4":"Automatic takeoff","5":"Wayline flight","6":"Panoramic photography","7":"Intelligent tracking","8":"ADS-B avoidance","9":"Auto returning to home","10":"Automatic landing","11":"Forced landing","12":"Three-blade landing","13":"Upgrading","14":"Not connected","15":"APAS","16":"Virtual stick state","17":"Live Flight Controls","18":"Airborne RTK fixing mode","19":"Dock address selecting","20":"POI"}
95
+
96
+ attribute :mode_code, Types::DroneModeCode
97
+
98
+ attribute :position_state do
99
+ attribute :gps_number, Types::Integer
100
+
101
+ attribute :is_fixed, Types::Integer
102
+
103
+ attribute :quality, Types::Integer
104
+ include Mixins::PositionStateQuality
105
+
106
+ attribute :rtk_number, Types::Integer
107
+ end
108
+ attribute? :storage do
109
+ attribute :total, Types::Integer
110
+
111
+ attribute :used, Types::Integer
112
+ end
113
+
114
+ attribute :total_flight_distance, Types::JSON::Decimal
115
+
116
+ attribute :total_flight_time, Types::JSON::Decimal
117
+
118
+ attribute? :track_id, Types::String | Types::Nil
119
+
120
+ attribute :vertical_speed, Types::JSON::Decimal
121
+
122
+ attribute :wind_direction, Types::JSON::Decimal
123
+
124
+ attribute :wind_speed, Types::JSON::Decimal
125
+ end # end #data
126
+
127
+ attribute :sn, Types::SerialNumber
128
+ end
129
+
130
+ def humanized_summary
131
+ Translations.thing_product_flight_hub_drone_osd_summary(**humanized_summary_interpolation)
132
+ end
133
+ end
134
+ end
135
+ end
@@ -5,7 +5,7 @@ module DjiMqttConnect
5
5
  class OsdMessage < DjiMqttConnect::Message
6
6
  attribute? :tid, Types::UUID
7
7
  attribute? :bid, Types::UUID
8
- attribute :timestamp, Types::Timestamp
8
+ attribute :timestamp, Types::TimestampMS
9
9
 
10
10
  # Can be determined from the topic, but included for convenience
11
11
  attribute? :gateway, Types::SerialNumber
@@ -6,7 +6,7 @@ module DjiMqttConnect
6
6
  attribute :_method, Types::String.enum("offline_map_get_v2")
7
7
 
8
8
  attribute :data do
9
- attribute :tile_type, Types::Array.of(Types::String).default([].freeze)
9
+ attribute? :tile_type, Types::Array.of(Types::String).default([].freeze)
10
10
  end
11
11
  end
12
12
  end
@@ -5,7 +5,7 @@ module DjiMqttConnect
5
5
  class RequestsMessage < DjiMqttConnect::Message
6
6
  attribute :tid, Types::UUID
7
7
  attribute :bid, Types::UUID
8
- attribute :timestamp, Types::Timestamp
8
+ attribute :timestamp, Types::TimestampMS
9
9
 
10
10
  # Can be determined from the topic, but included for convenience
11
11
  attribute? :gateway, Types::SerialNumber
@@ -8,7 +8,7 @@ module DjiMqttConnect
8
8
 
9
9
  attribute :tid, Types::UUID
10
10
  attribute :bid, Types::UUID
11
- attribute :timestamp, Types::Timestamp
11
+ attribute :timestamp, Types::TimestampMS
12
12
 
13
13
  attribute :_method, Types::String
14
14
 
@@ -29,9 +29,9 @@ module DjiMqttConnect
29
29
  attribute :files, Types::Array do
30
30
  attribute :list, Types::Array do
31
31
  attribute :boot_index, Types::Integer
32
- attribute :end_time, Types::Timestamp
32
+ attribute :end_time, Types::TimestampMS
33
33
  attribute :size, Types::Integer
34
- attribute :start_time, Types::Timestamp
34
+ attribute :start_time, Types::TimestampMS
35
35
  end
36
36
  attribute :module, Types::Coercible::String.enum("0", "3")
37
37
  attribute :object_key, Types::String
@@ -20,7 +20,7 @@ module DjiMqttConnect
20
20
  attribute :data do
21
21
  # Millisecond timestamp of task execution time.
22
22
  # Optional field. When the task_type is 0 or 1, it is required. When the task_type is 2, it is not required.
23
- attribute? :execute_time, Types::Timestamp
23
+ attribute? :execute_time, Types::TimestampMS
24
24
 
25
25
  attribute :flight_id, Types::FlightID
26
26
 
@@ -47,9 +47,9 @@ module DjiMqttConnect
47
47
  attribute? :ready_conditions do
48
48
  attribute? :battery_capacity, Types::Integer
49
49
 
50
- attribute? :begin_time, Types::Timestamp
50
+ attribute? :begin_time, Types::TimestampMS
51
51
 
52
- attribute? :end_time, Types::Timestamp
52
+ attribute? :end_time, Types::TimestampMS
53
53
  end
54
54
 
55
55
  # Optional field. Pre-check conditions added for task execution on the device side. If any condition is not satisfied, execution will fail.
@@ -17,7 +17,7 @@ module DjiMqttConnect
17
17
 
18
18
  attribute :tid, Types::UUID
19
19
  attribute :bid, Types::UUID
20
- attribute :timestamp, Types::Timestamp
20
+ attribute :timestamp, Types::TimestampMS
21
21
 
22
22
  attribute :_method, Types::String.enum("flighttask_stop")
23
23
 
@@ -17,7 +17,7 @@ module DjiMqttConnect
17
17
 
18
18
  attribute :tid, Types::UUID
19
19
  attribute :bid, Types::UUID
20
- attribute :timestamp, Types::Timestamp
20
+ attribute :timestamp, Types::TimestampMS
21
21
 
22
22
  attribute :_method, Types::String.enum("live_stop_push")
23
23
 
@@ -8,7 +8,7 @@ module DjiMqttConnect
8
8
 
9
9
  attribute :tid, Types::UUID
10
10
  attribute :bid, Types::UUID
11
- attribute :timestamp, Types::Timestamp
11
+ attribute :timestamp, Types::TimestampMS
12
12
 
13
13
  attribute :_method, Types::String
14
14
 
@@ -5,7 +5,7 @@ module DjiMqttConnect
5
5
  class ServicesReplyMessage < DjiMqttConnect::Message
6
6
  attribute :tid, Types::UUID
7
7
  attribute :bid, Types::UUID
8
- attribute :timestamp, Types::Timestamp
8
+ attribute :timestamp, Types::TimestampMS
9
9
 
10
10
  attribute :_data, Types::Hash
11
11
  attribute :_method, Types::String
@@ -77,7 +77,7 @@ module DjiMqttConnect
77
77
  class StateMessage < DjiMqttConnect::Message
78
78
  attribute? :tid, Types::UUID
79
79
  attribute? :bid, Types::UUID
80
- attribute :timestamp, Types::Timestamp
80
+ attribute :timestamp, Types::TimestampMS
81
81
 
82
82
  # Can be determined from the topic, but included for convenience
83
83
  attribute? :gateway, Types::SerialNumber
@@ -20,7 +20,7 @@ module DjiMqttConnect
20
20
 
21
21
  attribute :bid, Types::UUID
22
22
  attribute :tid, Types::UUID
23
- attribute :timestamp, Types::Timestamp
23
+ attribute :timestamp, Types::TimestampMS
24
24
 
25
25
  attribute :data do
26
26
  attribute :result, Types::ResultCode
@@ -157,6 +157,10 @@ module DjiMqttConnect
157
157
  I18n.t("flight_hub_dock", **data, scope: "dji_mqtt_connect.thing_product_osd_summary", default: :default)
158
158
  end
159
159
 
160
+ def thing_product_flight_hub_drone_osd_summary(**data)
161
+ I18n.t("flight_hub_drone", **data, scope: "dji_mqtt_connect.thing_product_osd_summary", default: :default)
162
+ end
163
+
160
164
  def thing_product_dock_osd_summary(**data)
161
165
  I18n.t("dock", **data, scope: "dji_mqtt_connect.thing_product_osd_summary", default: :default)
162
166
  end
@@ -16,8 +16,11 @@ module DjiMqttConnect
16
16
  # Not a Strict UUID format... turns out DJI doesn't follow one
17
17
  UUID = Strict::String.constrained(format: /\A[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}\z/i)
18
18
 
19
- # Just make sure Timestamps are 13 digits long
20
- Timestamp = Types::Integer & Types::Coercible::String.constrained(format: /\A[1-9][0-9]{12}\z/)
19
+ # Timestamp in seconds since epoch
20
+ Timestamp = Types::Integer & Types::Coercible::String.constrained(format: /\A[1-9][0-9]{9}\z/)
21
+
22
+ # Just make sure Timestamps are 13 digits long (millisecond precision)
23
+ TimestampMS = Types::Integer & Types::Coercible::String.constrained(format: /\A[1-9][0-9]{12}\z/)
21
24
 
22
25
  # Serial Numbers are alphanumeric with optional hyphen
23
26
  SerialNumber = Types::String.constrained(format: /\A[0-9A-Z]+(-[0-9A-Z]+)?\z/)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DjiMqttConnect
4
- VERSION = "0.1.29.2"
4
+ VERSION = "0.1.30"
5
5
  end
@@ -65,6 +65,7 @@ module DjiMqttConnect
65
65
 
66
66
  autoload :OsdMessage, "dji_mqtt_connect/messages/thing/product/osd_message"
67
67
  autoload :FlightHubDockOsdMessage, "dji_mqtt_connect/messages/thing/product/osd/flight_hub_dock"
68
+ autoload :FlightHubDroneOsdMessage, "dji_mqtt_connect/messages/thing/product/osd/flight_hub_drone"
68
69
  autoload :DockOsdMessage, "dji_mqtt_connect/messages/thing/product/osd/dock"
69
70
  autoload :DroneOsdMessage, "dji_mqtt_connect/messages/thing/product/osd/drone"
70
71
  autoload :RemoteOsdMessage, "dji_mqtt_connect/messages/thing/product/osd/remote"
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.29.2
4
+ version: 0.1.30
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-10-03 00:00:00.000000000 Z
11
+ date: 2025-10-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -187,6 +187,7 @@ files:
187
187
  - lib/dji_mqtt_connect/messages/thing/product/osd/dock.rb
188
188
  - lib/dji_mqtt_connect/messages/thing/product/osd/drone.rb
189
189
  - lib/dji_mqtt_connect/messages/thing/product/osd/flight_hub_dock.rb
190
+ - lib/dji_mqtt_connect/messages/thing/product/osd/flight_hub_drone.rb
190
191
  - lib/dji_mqtt_connect/messages/thing/product/osd/remote.rb
191
192
  - lib/dji_mqtt_connect/messages/thing/product/osd_message.rb
192
193
  - lib/dji_mqtt_connect/messages/thing/product/requests/airport_bind_status.rb