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: b81ef7e12ef07f8f3d42d5bae091f2f5d3e99c4afe3bea10cf1b5bacf8592a83
4
- data.tar.gz: b374963480351bdbb3de7418d3fbcbd8bf6a6c8785b7e107051c3fcddf870676
3
+ metadata.gz: f3489491c80c51e9cbebab42f61424b155f1f4d59d33a148e2b44e7a4c614656
4
+ data.tar.gz: 8a54082a6edf3be34c1ddb1db361d1d684638e1570eb0a68a69ed21c7f13da1f
5
5
  SHA512:
6
- metadata.gz: e97c71486c48d8c475b212e804c1ad8e12e5e32dc9769dd2332465b34a86c9ff5429e37727000cc606704eba10916d62226f1ebc3ebbef2b23382292ab5274b5
7
- data.tar.gz: 6f35209caa9a35bbf8ca3e82fa24d103b6387d026334e7ecb4f3454c0327c03b598ed67b1e614f40742d26ff87f78c5391e9d8e1c947c58ff1d7a076f3d02588
6
+ metadata.gz: 6881b79bc2c695280c83d1ed70515cd26a8aa842a6676c3775b038f42b36eac76712462606676239638a626a838e7a8ecfdfae64004dd6401c23d37d0ce2605a
7
+ data.tar.gz: c1f9ae6a703e2143feb06798566e1297a2e883f438ab78d1713e9392380b090c359a85b93707e7d341de9e7822509b83446e904b9c567b63e91b0806eaec56fb
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- dji_mqtt_connect (0.1.5)
4
+ dji_mqtt_connect (0.1.6)
5
5
  activesupport (>= 6.0, <= 8)
6
6
  dry-struct (~> 1.6)
7
7
  dry-transformer (~> 1.0)
@@ -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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DjiMqttConnect
4
- VERSION = "0.1.5"
4
+ VERSION = "0.1.6"
5
5
  end
@@ -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.5
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-16 00:00:00.000000000 Z
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