dji_mqtt_connect 0.1.18 → 0.1.19

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3117bb4030bc57798727bd9662d823aae2cbd7db679d9050920ebb70b388e5d4
4
- data.tar.gz: e2e53cf583b2ce534e299f943b6df75dcd76f5d71a17d53d18ff880606cf6a93
3
+ metadata.gz: d79c6acb7c5be4e14a79b1592039fd385c1fb0bdb7886e9c07282bef039b1a66
4
+ data.tar.gz: 0f715b3bcc5964fe3c3d6f26378ac833eea6c97d4cce49d6d2ab612586a89af7
5
5
  SHA512:
6
- metadata.gz: 42fd75bc917811fea4a3aeb2e70a13208ee382a0c5cd3d46bb187dcf74afe8127a66453f955567724f8d737625e4d20ecfc384d8593e3f02d6d559f828177a49
7
- data.tar.gz: 679082d2bfb093adb333a4b091971bb6fd8a55b9048d55cecc80d6823b85af1b92fdeccc5fcc6ab56a42fe7209b9b3ba7d707dd2f06956587b5a2d74f4c20fb0
6
+ metadata.gz: 8e5f42c56bbf32787b3d50abbb60929bb6ead17d29e7288d0fec9db11473d77e9671354162f8afdf340a07e407c4d3299ae7353b15bda17de8df02cb0ca6d0d1
7
+ data.tar.gz: eeae798ff32212fa8bc0af6f6200667cef77d347201da7681dd52db6a97ac76d34a6806a9d377f7ff4b5488bd6cd0f1c2055646d567244731e8299a8b8decc78
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- dji_mqtt_connect (0.1.18)
4
+ dji_mqtt_connect (0.1.19)
5
5
  activesupport (>= 6.0, <= 8)
6
6
  dry-struct (~> 1.6)
7
7
  dry-transformer (~> 1.0)
@@ -557,6 +557,47 @@ module DjiMqttConnect
557
557
  )
558
558
  end
559
559
 
560
+ def build_thing_product_flight_areas_drone_location_events_message
561
+ message_data = {
562
+ drone_locations: [
563
+ {
564
+ area_id: "d275c4e1-d864-4736-8b5d-5f5882ee9bdd",
565
+ area_distance: 100.11,
566
+ is_in_area: true
567
+ }
568
+ ]
569
+ }
570
+
571
+ Thing::Product::FlightAreasDroneLocationEventsMessage.new(
572
+ _method: "flight_areas_drone_location",
573
+ tid: Message.generate_tid,
574
+ bid: Message.generate_bid,
575
+ timestamp: Message.current_timestamp,
576
+ data: message_data,
577
+ _data: message_data.deep_stringify_keys
578
+ )
579
+ end
580
+
581
+ def build_thing_product_flight_areas_sync_progress_events_message
582
+ message_data = {
583
+ file: {
584
+ name: "geofence_xxx.json",
585
+ checksum: "sha256"
586
+ },
587
+ status: "synchronized",
588
+ reason: 0
589
+ }
590
+
591
+ Thing::Product::FlightAreasSyncProgressEventsMessage.new(
592
+ _method: "flight_areas_sync_progress",
593
+ tid: Message.generate_tid,
594
+ bid: Message.generate_bid,
595
+ timestamp: Message.current_timestamp,
596
+ data: message_data,
597
+ _data: message_data.deep_stringify_keys
598
+ )
599
+ end
600
+
560
601
  def build_thing_product_flight_areas_get_requests_message
561
602
  message_data = {}
562
603
 
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ module DjiMqttConnect
4
+ module Thing::Product
5
+ class FlightAreasDroneLocationEventsMessage < EventsMessage
6
+ attribute :_method, Types::String.enum("flight_areas_drone_location")
7
+
8
+ attribute :data do
9
+ attribute :drone_locations, Types::Array do
10
+ attribute :area_id, Types::String
11
+ attribute :area_distance, Types::JSON::Decimal
12
+ attribute :is_in_area, Types::Bool
13
+ end
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,27 @@
1
+ # frozen_string_literal: true
2
+
3
+ module DjiMqttConnect
4
+ module Thing::Product
5
+ class FlightAreasSyncProgressEventsMessage < EventsMessage
6
+ attribute :_method, Types::String.enum("flight_areas_sync_progress")
7
+
8
+ attribute :data do
9
+ attribute :file, (Class.new(Dry::Struct) do
10
+ attribute :name, Types::String
11
+ attribute :checksum, Types::String
12
+ end) | Types::Nil
13
+
14
+ # {"wait_sync":"wait for synchronize","synchronizing":"synchronizing","synchronized":"synchronized","fail":"Fail"}
15
+ attribute :status, Types::String.enum(
16
+ "wait_sync",
17
+ "synchronizing",
18
+ "synchronized",
19
+ "fail"
20
+ )
21
+
22
+ # {"1":"Failed to parse file information returned from the cloud.","2":"Failed to retrieve file information from the aircraft's end.","3":"Failed to download the file from the cloud.","4":"Link flipping failed.","5":"File transmission failed."}
23
+ attribute :reason, Types::Integer.enum(0, 1, 2, 3, 4, 5)
24
+ end
25
+ end
26
+ end
27
+ end
@@ -26,6 +26,8 @@ module DjiMqttConnect
26
26
  "device_reboot",
27
27
  "file_upload_callback",
28
28
  "fileupload_progress",
29
+ "flight_areas_drone_location",
30
+ "flight_areas_sync_progress",
29
31
  "flighttask_progress",
30
32
  "flighttask_ready",
31
33
  "highest_priority_upload_flighttask_media"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DjiMqttConnect
4
- VERSION = "0.1.18"
4
+ VERSION = "0.1.19"
5
5
  end
@@ -41,6 +41,8 @@ module DjiMqttConnect
41
41
  autoload :DeviceExitHomingNotifyEventsMessage, "dji_mqtt_connect/messages/thing/product/events/device_exit_homing_notify"
42
42
  autoload :FileUploadCallbackEventsMessage, "dji_mqtt_connect/messages/thing/product/events/file_upload_callback"
43
43
  autoload :FileuploadProgressEventsMessage, "dji_mqtt_connect/messages/thing/product/events/fileupload_progress"
44
+ autoload :FlightAreasDroneLocationEventsMessage, "dji_mqtt_connect/messages/thing/product/events/flight_areas_drone_location"
45
+ autoload :FlightAreasSyncProgressEventsMessage, "dji_mqtt_connect/messages/thing/product/events/flight_areas_sync_progress"
44
46
  autoload :FlighttaskProgressEventsMessage, "dji_mqtt_connect/messages/thing/product/events/flighttask_progress"
45
47
  autoload :FlighttaskReadyEventsMessage, "dji_mqtt_connect/messages/thing/product/events/flighttask_ready"
46
48
  autoload :HighestPriorityUploadFlighttaskMediaEventsMessage, "dji_mqtt_connect/messages/thing/product/events/highest_priority_upload_flighttask_media"
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.18
4
+ version: 0.1.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sphere Drones
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-10-05 00:00:00.000000000 Z
11
+ date: 2023-10-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -134,6 +134,8 @@ files:
134
134
  - lib/dji_mqtt_connect/messages/thing/product/events/device_reboot.rb
135
135
  - lib/dji_mqtt_connect/messages/thing/product/events/file_upload_callback.rb
136
136
  - lib/dji_mqtt_connect/messages/thing/product/events/fileupload_progress.rb
137
+ - lib/dji_mqtt_connect/messages/thing/product/events/flight_areas_drone_location.rb
138
+ - lib/dji_mqtt_connect/messages/thing/product/events/flight_areas_sync_progress.rb
137
139
  - lib/dji_mqtt_connect/messages/thing/product/events/flighttask_progress.rb
138
140
  - lib/dji_mqtt_connect/messages/thing/product/events/flighttask_ready.rb
139
141
  - lib/dji_mqtt_connect/messages/thing/product/events/highest_priority_upload_flighttask_media.rb