dji_mqtt_connect 0.1.5 → 0.1.6
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f3489491c80c51e9cbebab42f61424b155f1f4d59d33a148e2b44e7a4c614656
|
4
|
+
data.tar.gz: 8a54082a6edf3be34c1ddb1db361d1d684638e1570eb0a68a69ed21c7f13da1f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6881b79bc2c695280c83d1ed70515cd26a8aa842a6676c3775b038f42b36eac76712462606676239638a626a838e7a8ecfdfae64004dd6401c23d37d0ce2605a
|
7
|
+
data.tar.gz: c1f9ae6a703e2143feb06798566e1297a2e883f438ab78d1713e9392380b090c359a85b93707e7d341de9e7822509b83446e904b9c567b63e91b0806eaec56fb
|
data/Gemfile.lock
CHANGED
@@ -45,6 +45,15 @@ module DjiMqttConnect
|
|
45
45
|
unwrap "data", ["method"]
|
46
46
|
end
|
47
47
|
|
48
|
+
# Fix the legacy status code message
|
49
|
+
guard ->(message) { message.dig("data", "method") == "status_code" } do
|
50
|
+
map_value "data" do
|
51
|
+
unwrap "output", ["codes"]
|
52
|
+
end
|
53
|
+
|
54
|
+
unwrap "data", ["method"]
|
55
|
+
end
|
56
|
+
|
48
57
|
rename_keys "method" => "_method"
|
49
58
|
end
|
50
59
|
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module DjiMqttConnect
|
4
|
+
module Thing::Product
|
5
|
+
# NOTE: Message is not documented, but observed from M30 Drones
|
6
|
+
class StatusCodeEventsMessage < EventsMessage
|
7
|
+
attribute :_method, Types::String.enum("status_code")
|
8
|
+
|
9
|
+
attribute :data do
|
10
|
+
attribute :codes, Types::Array do
|
11
|
+
attribute :id, Types::Integer
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
data/lib/dji_mqtt_connect.rb
CHANGED
@@ -34,6 +34,7 @@ module DjiMqttConnect
|
|
34
34
|
module Product
|
35
35
|
# Messages
|
36
36
|
autoload :HmsEventsMessage, "dji_mqtt_connect/messages/thing/product/hms_events_message"
|
37
|
+
autoload :StatusCodeEventsMessage, "dji_mqtt_connect/messages/thing/product/status_code_events_message"
|
37
38
|
autoload :EventsMessage, "dji_mqtt_connect/messages/thing/product/events_message"
|
38
39
|
|
39
40
|
autoload :OsdMessage, "dji_mqtt_connect/messages/thing/product/osd_message"
|
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.6
|
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-05-
|
11
|
+
date: 2023-05-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -132,6 +132,7 @@ files:
|
|
132
132
|
- lib/dji_mqtt_connect/messages/thing/product/osd_message.rb
|
133
133
|
- lib/dji_mqtt_connect/messages/thing/product/remote_osd_message.rb
|
134
134
|
- lib/dji_mqtt_connect/messages/thing/product/requests_message.rb
|
135
|
+
- lib/dji_mqtt_connect/messages/thing/product/status_code_events_message.rb
|
135
136
|
- lib/dji_mqtt_connect/messages/thing/product/storage_config_get_requests_message.rb
|
136
137
|
- lib/dji_mqtt_connect/messages/thing/product/storage_config_get_requests_reply_message.rb
|
137
138
|
- lib/dji_mqtt_connect/mixins/latitude_conditional.rb
|