dji_mqtt_connect 0.1.14 → 0.1.14.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cbf7e03c9debc9957d9d8fadc1fa6126377a14574f5f0cdc24009afac5b77bc5
4
- data.tar.gz: e86ae21b238e3c0063cd42c584544350ba30b8e60eb8241c43b4d8cedb69aedf
3
+ metadata.gz: 47395f1b58ac06502a0920de3175c3410f11872f25c6248245b206bd4f4a5522
4
+ data.tar.gz: 72ff4759ad36e7f157b374a1d230d5f493e384a767b26a3d59d20e8a8f32c5c2
5
5
  SHA512:
6
- metadata.gz: 5930cd00dbb6d2779af90659fdde1b70e2cf31247a1f31dcc3f6a4301f7663117bf06d061dfc1c1d101100c43ce040003fff5152435ad5b4bf1536cea74035a9
7
- data.tar.gz: 4df8067dff28fb839f2e849b426760fa44ce2f7b9bb5f676c85daae15e54f9395030a3f6f047016f6aaa6ee9d328d75176ccc97d072615be1fb0ea6fd3d42b10
6
+ metadata.gz: acf0c009ffd5fbe14ad9b0ef6708dcb437e3d4ffdd1082e4aa567dbd7734b98f93b756155be1fbb820d291c86d4b11eb6ff14f4cca657e9abf67cb4cfbeb6ce2
7
+ data.tar.gz: fc2b1c92cc39e9d8581df7056c6531e3cc6979d66b2a8fba89e7818097e5723b7deda2bdb5c3f708cf5619eaab6d42fde52de05f7b93a06033cc1cdee60cc22c
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- dji_mqtt_connect (0.1.14)
4
+ dji_mqtt_connect (0.1.14.1)
5
5
  activesupport (>= 6.0, <= 8)
6
6
  dry-struct (~> 1.6)
7
7
  dry-transformer (~> 1.0)
@@ -190,6 +190,164 @@ module DjiMqttConnect
190
190
  )
191
191
  end
192
192
 
193
+ # OSD
194
+
195
+ def build_thing_product_dock_osd_message_with_sub_device
196
+ message_data = {
197
+ network_state: {
198
+ type: 2,
199
+ quality: 0,
200
+ rate: 0.1459999978542328
201
+ },
202
+ drone_charge_state: {
203
+ state: 0,
204
+ capacity_percent: 0
205
+ },
206
+ drone_in_dock: 0,
207
+ rainfall: 1,
208
+ wind_speed: 0,
209
+ environment_temperature: 18.8,
210
+ temperature: 19.6,
211
+ humidity: 58,
212
+ latitude: 0,
213
+ longitude: 0,
214
+ height: 0,
215
+ alternate_land_point: {
216
+ latitude: "-33.865143",
217
+ longitude: "151.209900",
218
+ height: 0,
219
+ safe_land_height: 30,
220
+ is_configured: 0
221
+ },
222
+ first_power_on: 1631945855969,
223
+ position_state: {
224
+ is_calibration: 1,
225
+ is_fixed: 1,
226
+ quality: 1,
227
+ gps_number: 0,
228
+ rtk_number: 0
229
+ },
230
+ storage: {
231
+ total: 82045336,
232
+ used: 56385704
233
+ },
234
+ mode_code: 1,
235
+ cover_state: 1,
236
+ supplement_light_state: 0,
237
+ emergency_stop_state: 0,
238
+ air_conditioner: {
239
+ air_conditioner_state: 32767,
240
+ switch_time: 32767
241
+ },
242
+ battery_store_mode: 2,
243
+ alarm_state: 0,
244
+ putter_state: 1,
245
+ sub_device: {
246
+ device_sn: "M30DRONE01",
247
+ device_model_key: "0-67-0",
248
+ device_online_status: 0,
249
+ device_paired: 0
250
+ }
251
+ }
252
+
253
+ Thing::Product::DockOsdMessage.new(
254
+ tid: Message.generate_tid,
255
+ bid: Message.generate_bid,
256
+ timestamp: Message.current_timestamp,
257
+ gateway: "gatewaysn",
258
+ data: message_data,
259
+ _data: message_data
260
+ )
261
+ end
262
+
263
+ def build_thing_product_dock_osd_message_with_maintenance_status
264
+ message_data = {
265
+ job_number: 52,
266
+ acc_time: 146930,
267
+ activation_time: 1682969151,
268
+ maintain_status: {
269
+ maintain_status_array: [
270
+ {
271
+ state: 0,
272
+ last_maintain_type: 17,
273
+ last_maintain_time: 0,
274
+ last_maintain_work_sorties: 0
275
+ }
276
+ ]
277
+ },
278
+ electric_supply_voltage: 0,
279
+ working_voltage: 0,
280
+ working_current: 0,
281
+ backup_battery: {
282
+ voltage: 24365,
283
+ temperature: 32767,
284
+ switch: 1
285
+ },
286
+ drone_battery_maintenance_info: {
287
+ batteries: [
288
+ {
289
+ index: 0,
290
+ capacity_percent: 32767,
291
+ voltage: 32767,
292
+ temperature: 32767
293
+ },
294
+ {
295
+ index: 1,
296
+ capacity_percent: 32767,
297
+ voltage: 32767,
298
+ temperature: 32767
299
+ }
300
+ ]
301
+ }
302
+ }
303
+
304
+ Thing::Product::DockOsdMessage.new(
305
+ tid: Message.generate_tid,
306
+ bid: Message.generate_bid,
307
+ timestamp: Message.current_timestamp,
308
+ gateway: "gatewaysn",
309
+ data: message_data,
310
+ _data: message_data
311
+ )
312
+ end
313
+
314
+ def build_thing_product_dock_osd_message_with_link_status
315
+ message_data = {
316
+ drc_state: 0,
317
+ flighttask_prepare_capacity: 1,
318
+ flighttask_step_code: 255,
319
+ media_file_detail: {
320
+ remain_upload: 140
321
+ },
322
+ sdr: {
323
+ down_quality: 0,
324
+ frequency_band: 5.8,
325
+ up_quality: 0
326
+ },
327
+ wireless_link: {
328
+ _4g_freq_band: 2.4,
329
+ _4g_gnd_quality: 0,
330
+ _4g_link_state: 0,
331
+ _4g_quality: 0,
332
+ _4g_uav_quality: 0,
333
+ dongle_number: 0,
334
+ link_workmode: 0,
335
+ sdr_freq_band: 2.4,
336
+ sdr_link_state: 0,
337
+ sdr_quality: 0
338
+ }
339
+ }
340
+
341
+ Thing::Product::DockOsdMessage.new(
342
+ tid: Message.generate_tid,
343
+ bid: Message.generate_bid,
344
+ timestamp: Message.current_timestamp,
345
+ gateway: "gatewaysn",
346
+ data: message_data,
347
+ _data: message_data
348
+ )
349
+ end
350
+
193
351
  # Status
194
352
 
195
353
  def build_device_online_update_topo_message
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DjiMqttConnect
4
- VERSION = "0.1.14"
4
+ VERSION = "0.1.14.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dji_mqtt_connect
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.14
4
+ version: 0.1.14.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sphere Drones