dji_mqtt_connect 0.1.23.1 → 0.1.23.3
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/state_messages.rb +17 -0
- data/lib/dji_mqtt_connect/messages/thing/product/requests/airport_organization_bind.rb +3 -3
- data/lib/dji_mqtt_connect/messages/thing/product/requests_message.rb +1 -0
- data/lib/dji_mqtt_connect/messages/thing/product/requests_reply/offline_map_get.rb +9 -1
- data/lib/dji_mqtt_connect/messages/thing/product/state_message.rb +4 -0
- data/lib/dji_mqtt_connect/topics/thing/product/events.rb +3 -3
- data/lib/dji_mqtt_connect/topics/thing/product/osd.rb +3 -3
- data/lib/dji_mqtt_connect/topics/thing/product/requests.rb +3 -3
- data/lib/dji_mqtt_connect/topics/thing/product/services_reply.rb +3 -3
- data/lib/dji_mqtt_connect/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c02edaaaf852b86b7a232011a4cbddeac70d5002a0ed80b988280e74e7b53ed4
|
4
|
+
data.tar.gz: c626c5ec70d72cb5661f6ce0562143630d025b2ee9c7639a47d137c3c910c2cc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 569aab752ec15a303bee5846f38772057ef6a6df823c9655dd9483395d4cf47e18e491abceb64ff64382ff59129382280a6cd8a6fc08c042b7049ef5936adc44
|
7
|
+
data.tar.gz: 2a8d79beaa54ebfa8c94d8fe78c9ecf57f5ca0e6c8493b30113f3c6cc75dd4d3379ca9d3d61341657486cc5a95efd235001b43ad67e4bb2de54d9fa466ce28a2
|
data/Gemfile.lock
CHANGED
@@ -4,6 +4,23 @@ module DjiMqttConnect
|
|
4
4
|
module Factories::StateMessages
|
5
5
|
### Gateway Messages ###
|
6
6
|
|
7
|
+
def build_thing_product_firmware_version_state_message
|
8
|
+
message_data = {
|
9
|
+
firmware_version: "10.01.1607",
|
10
|
+
compatible_status: 0,
|
11
|
+
firmware_upgrade_status: 0
|
12
|
+
}
|
13
|
+
|
14
|
+
Thing::Product::StateMessage.new(
|
15
|
+
bid: Message.generate_bid,
|
16
|
+
tid: Message.generate_tid,
|
17
|
+
timestamp: Message.current_timestamp,
|
18
|
+
gateway: "GATEWAYSN",
|
19
|
+
_data: message_data,
|
20
|
+
data: message_data
|
21
|
+
)
|
22
|
+
end
|
23
|
+
|
7
24
|
def build_thing_product_gateway_live_capacity_state_message
|
8
25
|
message_data = {
|
9
26
|
live_capacity: {
|
@@ -11,10 +11,10 @@ module DjiMqttConnect
|
|
11
11
|
attribute :device_binding_code, Types::String | Types::Nil
|
12
12
|
attribute :organization_id, Types::String | Types::Nil
|
13
13
|
attribute :device_callsign, Types::String | Types::Nil
|
14
|
-
attribute :sn, Types::String
|
14
|
+
attribute :sn, Types::String | Types::Nil
|
15
15
|
attribute :device_model_key, Types::String
|
16
|
-
attribute :device_nonce, Types::String
|
17
|
-
attribute :device_secret, Types::String
|
16
|
+
attribute :device_nonce, Types::String | Types::Nil
|
17
|
+
attribute :device_secret, Types::String | Types::Nil
|
18
18
|
end
|
19
19
|
end
|
20
20
|
end
|
@@ -8,7 +8,10 @@ module DjiMqttConnect
|
|
8
8
|
new(
|
9
9
|
_method: offline_map_get._method,
|
10
10
|
data: {
|
11
|
-
result: result
|
11
|
+
result: result,
|
12
|
+
output: {
|
13
|
+
files: []
|
14
|
+
}
|
12
15
|
},
|
13
16
|
tid: offline_map_get.tid,
|
14
17
|
bid: offline_map_get.bid,
|
@@ -23,6 +26,11 @@ module DjiMqttConnect
|
|
23
26
|
attribute :_method, Types::String.enum("offline_map_get")
|
24
27
|
attribute :data do
|
25
28
|
attribute :result, Types::ResultCode
|
29
|
+
|
30
|
+
# Debugging issues related to the offline map
|
31
|
+
attribute :output do
|
32
|
+
attribute :files, Types::Array.default([].freeze)
|
33
|
+
end
|
26
34
|
end
|
27
35
|
end
|
28
36
|
end
|
@@ -171,6 +171,10 @@ module DjiMqttConnect
|
|
171
171
|
attribute? :uom_real_name_state, Types::Integer
|
172
172
|
attribute? :wpmz_version, Types::String
|
173
173
|
|
174
|
+
attribute? :firmware_version, Types::String
|
175
|
+
attribute? :compatible_status, Types::Integer
|
176
|
+
attribute? :firmware_upgrade_status, Types::Integer
|
177
|
+
|
174
178
|
attribute? :low_battery_warning_threshold, Types::Integer
|
175
179
|
attribute? :serious_low_battery_warning_threshold, Types::Integer
|
176
180
|
end
|
@@ -17,6 +17,9 @@ module DjiMqttConnect
|
|
17
17
|
|
18
18
|
logger.info("Received #{message} from #{device_sn}")
|
19
19
|
|
20
|
+
# Broadcast a generic received events message event
|
21
|
+
broadcast(:received_events_message, device_sn, message)
|
22
|
+
|
20
23
|
if message.instance_of?(EventsMessage)
|
21
24
|
# Broadcast an unsupported message event
|
22
25
|
broadcast(:unsupported_message, topic, raw_message)
|
@@ -25,9 +28,6 @@ module DjiMqttConnect
|
|
25
28
|
event_name = message.class.name.demodulize.sub(/sMessage\z/, "").underscore.to_sym
|
26
29
|
broadcast(event_name, device_sn, message)
|
27
30
|
end
|
28
|
-
|
29
|
-
# Broadcast a generic received events message event
|
30
|
-
broadcast(:received_events_message, device_sn, message)
|
31
31
|
rescue ParseError => error
|
32
32
|
broadcast(:parse_error, error, topic, raw_message)
|
33
33
|
end
|
@@ -17,6 +17,9 @@ module DjiMqttConnect
|
|
17
17
|
|
18
18
|
logger.info("Received #{message} from #{device_sn}")
|
19
19
|
|
20
|
+
# Broadcast a generic received osd message event
|
21
|
+
broadcast(:received_osd_message, device_sn, message)
|
22
|
+
|
20
23
|
if message.instance_of?(OsdMessage)
|
21
24
|
# Broadcast an unsupported message event
|
22
25
|
broadcast(:unsupported_message, topic, raw_message)
|
@@ -25,9 +28,6 @@ module DjiMqttConnect
|
|
25
28
|
event_name = message.class.name.demodulize.sub(/Message\z/, "Update").underscore.to_sym
|
26
29
|
broadcast(event_name, device_sn, message)
|
27
30
|
end
|
28
|
-
|
29
|
-
# Broadcast a generic received osd message event
|
30
|
-
broadcast(:received_osd_message, device_sn, message)
|
31
31
|
rescue ParseError => error
|
32
32
|
broadcast(:parse_error, error, topic, raw_message)
|
33
33
|
end
|
@@ -17,6 +17,9 @@ module DjiMqttConnect
|
|
17
17
|
|
18
18
|
logger.info("Received #{message} from #{gateway_sn}")
|
19
19
|
|
20
|
+
# Broadcast a generic received requests message event
|
21
|
+
broadcast(:received_requests_message, gateway_sn, message)
|
22
|
+
|
20
23
|
if message.instance_of?(RequestsMessage)
|
21
24
|
# Broadcast an unsupported message event
|
22
25
|
broadcast(:unsupported_message, topic, raw_message)
|
@@ -24,9 +27,6 @@ module DjiMqttConnect
|
|
24
27
|
# Build event name and broadcast (i.e. ::ConfigRequestsMessage => config)
|
25
28
|
broadcast(message._method.to_sym, gateway_sn, message)
|
26
29
|
end
|
27
|
-
|
28
|
-
# Broadcast a generic received requests message event
|
29
|
-
broadcast(:received_requests_message, gateway_sn, message)
|
30
30
|
rescue ParseError => error
|
31
31
|
broadcast(:parse_error, error, topic, raw_message)
|
32
32
|
end
|
@@ -17,6 +17,9 @@ module DjiMqttConnect
|
|
17
17
|
|
18
18
|
logger.info("Received #{message} from #{gateway_sn}")
|
19
19
|
|
20
|
+
# Broadcast a generic received services reply message event
|
21
|
+
broadcast(:received_services_reply_message, gateway_sn, message)
|
22
|
+
|
20
23
|
if message.instance_of?(ServicesReplyMessage)
|
21
24
|
# Broadcast an unsupported message event
|
22
25
|
broadcast(:unsupported_message, topic, raw_message)
|
@@ -25,9 +28,6 @@ module DjiMqttConnect
|
|
25
28
|
event_name = "#{message._method.to_sym}_reply"
|
26
29
|
broadcast(event_name, gateway_sn, message)
|
27
30
|
end
|
28
|
-
|
29
|
-
# Broadcast a generic received services reply message event
|
30
|
-
broadcast(:received_services_reply_message, gateway_sn, message)
|
31
31
|
rescue ParseError => error
|
32
32
|
broadcast(:parse_error, error, topic, raw_message)
|
33
33
|
end
|
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.23.
|
4
|
+
version: 0.1.23.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sphere Drones
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-08-
|
11
|
+
date: 2024-08-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|