dji_mqtt_connect 0.1.22.1 → 0.1.22.2
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8648b1f1ab8a35bab447677cacc7e465716a7b30b31dc9cf26230d9e4f00000f
|
4
|
+
data.tar.gz: 33fa2572acded95529962bc32703599c6750118c3238879584aad4a06db0bcf5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ce0796ec8ca31bf90482a16fb3e601e40d2dccc1cdf045ecbc149fc0838f294a7297af69aef3d8cebfdb7e9714e33b4c5464b3680acadf38a1e771d78f163f32
|
7
|
+
data.tar.gz: b75eaafa64707ec784514792188fe3722bb17abbce767c4ea5843ddf61f8c3e4d170980301ec31606e50cac0f9f04ea1ea42ece7daa0e2c56c20c38fc4470ad7
|
data/Gemfile.lock
CHANGED
@@ -20,6 +20,9 @@ module DjiMqttConnect
|
|
20
20
|
wind_speed
|
21
21
|
]
|
22
22
|
|
23
|
+
CAMERA_MODE_PHOTO_TAKING = 0
|
24
|
+
CAMREA_MODE_RECORDING = 1
|
25
|
+
|
23
26
|
attribute :data do
|
24
27
|
include Mixins::LatitudeConditional
|
25
28
|
include Mixins::LongitudeConditional
|
@@ -90,7 +93,14 @@ module DjiMqttConnect
|
|
90
93
|
attribute :payload_index, Types::String
|
91
94
|
|
92
95
|
# {"0":"Photo taking","1":"Recording"}
|
93
|
-
attribute? :camera_mode, Types::Integer.enum(
|
96
|
+
attribute? :camera_mode, Types::Integer.enum(
|
97
|
+
CAMERA_MODE_PHOTO_TAKING,
|
98
|
+
CAMREA_MODE_RECORDING
|
99
|
+
) | Types::ErrorInteger
|
100
|
+
|
101
|
+
def camera_mode?
|
102
|
+
camera_mode && !Types::ErrorInteger.valid?(camera_mode)
|
103
|
+
end
|
94
104
|
|
95
105
|
# {"min":2,"max":20}
|
96
106
|
attribute? :ir_zoom_factor, Types::JSON::Decimal
|
@@ -10,6 +10,9 @@ module DjiMqttConnect
|
|
10
10
|
# DJI does not like null, so it returns Integer 0 instead of a Decimal...
|
11
11
|
NullInteger = Types::Strict::Integer.constrained(eql: 0)
|
12
12
|
|
13
|
+
# Negative values indicate a fault
|
14
|
+
ErrorInteger = Types::Strict::Integer.constrained(lt: 0)
|
15
|
+
|
13
16
|
# Not a Strict UUID format... turns out DJI doesn't follow one
|
14
17
|
UUID = Strict::String.constrained(format: /\A[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}\z/i)
|
15
18
|
|