dji_mqtt_connect 0.1.18 → 0.1.19
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/dji_mqtt_connect/factories.rb +41 -0
- data/lib/dji_mqtt_connect/messages/thing/product/events/flight_areas_drone_location.rb +17 -0
- data/lib/dji_mqtt_connect/messages/thing/product/events/flight_areas_sync_progress.rb +27 -0
- data/lib/dji_mqtt_connect/messages/thing/product/events_reply_message.rb +2 -0
- data/lib/dji_mqtt_connect/version.rb +1 -1
- data/lib/dji_mqtt_connect.rb +2 -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: d79c6acb7c5be4e14a79b1592039fd385c1fb0bdb7886e9c07282bef039b1a66
|
4
|
+
data.tar.gz: 0f715b3bcc5964fe3c3d6f26378ac833eea6c97d4cce49d6d2ab612586a89af7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8e5f42c56bbf32787b3d50abbb60929bb6ead17d29e7288d0fec9db11473d77e9671354162f8afdf340a07e407c4d3299ae7353b15bda17de8df02cb0ca6d0d1
|
7
|
+
data.tar.gz: eeae798ff32212fa8bc0af6f6200667cef77d347201da7681dd52db6a97ac76d34a6806a9d377f7ff4b5488bd6cd0f1c2055646d567244731e8299a8b8decc78
|
data/Gemfile.lock
CHANGED
@@ -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
|
data/lib/dji_mqtt_connect.rb
CHANGED
@@ -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.
|
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-
|
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
|