dji_mqtt_connect 0.1.1.1 → 0.1.1.3
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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/dji_mqtt_connect/client.rb +10 -0
- data/lib/dji_mqtt_connect/messages/sys/product/update_topo_status_message.rb +10 -7
- data/lib/dji_mqtt_connect/messages/thing/product/drone_osd_message.rb +2 -2
- data/lib/dji_mqtt_connect/types.rb +5 -0
- data/lib/dji_mqtt_connect/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: abc508b271fced7206c38e5b17e8b88ebab2aa0cbb36b57850d24000d76cfe11
|
4
|
+
data.tar.gz: 4c70a5157dea47a23f223787ce336489c3f02e754deb07818a6583191f22c044
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 10334f0dce7e9b22918197c365e0be293a26b27a644eb5bdb11d97296376bf619904bb84c5e90c1eac4494f26c75be4a49c398d6fe227fb8884d6ef81a105b11
|
7
|
+
data.tar.gz: 91eeb380280df101ca3275bdf4570809492092d1bfc4c1ba899af8d27eefc99b394d509eb9a2d479e7d9fbb74c5ab0fc9635e69c5c24e409b77fea2e6e61d0f8
|
data/Gemfile.lock
CHANGED
@@ -46,6 +46,16 @@ module DjiMqttConnect
|
|
46
46
|
Thing::Product::OsdTopicRepository.new(self)
|
47
47
|
end
|
48
48
|
|
49
|
+
# Handles topic thing/product/#{pid}/requests
|
50
|
+
def thing_product_requests_topic
|
51
|
+
Thing::Product::RequestsTopicRepository.new(self)
|
52
|
+
end
|
53
|
+
|
54
|
+
# Handles topic thing/product/#{pid}/requests_reply
|
55
|
+
def thing_product_requests_reply_topic
|
56
|
+
Thing::Product::RequestsReplyTopicRepository.new(self)
|
57
|
+
end
|
58
|
+
|
49
59
|
attr_reader :mqtt_client
|
50
60
|
end
|
51
61
|
end
|
@@ -4,20 +4,23 @@ module DjiMqttConnect
|
|
4
4
|
module Sys::Product
|
5
5
|
class UpdateTopoStatusMessage < StatusMessage
|
6
6
|
attribute :data do
|
7
|
-
attribute :
|
8
|
-
attribute :
|
7
|
+
attribute? :domain, Types::DeviceDomain
|
8
|
+
attribute :type, Types::DeviceType
|
9
|
+
attribute :sub_type, Types::DeviceSubType
|
9
10
|
attribute :device_secret, Types::String
|
10
|
-
attribute? :domain, Types::Integer
|
11
11
|
attribute :nonce, Types::String
|
12
|
-
|
12
|
+
|
13
|
+
attribute? :version, Types::Integer
|
14
|
+
attribute? :thing_version, Types::String # dock contains thing_version instead of version
|
15
|
+
|
13
16
|
attribute :sub_devices, Types::Array do
|
14
17
|
attribute :sn, Types::String
|
15
|
-
attribute :type, Types::
|
16
|
-
attribute :sub_type, Types::
|
18
|
+
attribute :type, Types::DeviceType
|
19
|
+
attribute :sub_type, Types::DeviceSubType
|
17
20
|
attribute :index, Types::String
|
18
21
|
attribute :device_secret, Types::String
|
19
22
|
attribute :nonce, Types::String
|
20
|
-
attribute :version, Types::Integer
|
23
|
+
attribute? :version, Types::Integer
|
21
24
|
end
|
22
25
|
end
|
23
26
|
end
|
@@ -14,9 +14,9 @@ module DjiMqttConnect
|
|
14
14
|
attribute :index, Types::Integer
|
15
15
|
attribute :loop_times, Types::Integer
|
16
16
|
attribute :sn, Types::String
|
17
|
-
attribute :sub_type, Types::
|
17
|
+
attribute :sub_type, Types::DeviceSubType
|
18
18
|
attribute :temperature, Types::JSON::Decimal
|
19
|
-
attribute :type, Types::
|
19
|
+
attribute :type, Types::DeviceType
|
20
20
|
attribute :voltage, Types::Integer
|
21
21
|
end
|
22
22
|
attribute :capacity_percent, Types::Integer
|
@@ -19,5 +19,10 @@ module DjiMqttConnect
|
|
19
19
|
# lat/lng coordinates
|
20
20
|
Latitude = NullInteger | Types::JSON::Decimal.constrained(gteq: -90, lteq: 90)
|
21
21
|
Longitude = NullInteger | Types::JSON::Decimal.constrained(gteq: -180, lteq: 180)
|
22
|
+
|
23
|
+
# Device Details
|
24
|
+
DeviceDomain = Types::Coercible::Integer # dock returns this value as string
|
25
|
+
DeviceType = Types::Integer
|
26
|
+
DeviceSubType = Types::Integer
|
22
27
|
end
|
23
28
|
end
|