dji_mqtt_connect 0.1.14.1 → 0.1.15
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: 9dc11cccab3b3a496ba3fabbbc78499f8a614996da46761ddaf2eb9686de35c1
|
4
|
+
data.tar.gz: 512c5d6ce41c476f961e9b797f5cb023b2f69f44dab30637b601bdf9a9595f07
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9ba2eed8daee1e0d08d4fd44f33b84429c455425ca7e34a48f3bc9ef70dfd0a7ae87766fc596f977b34a2d8b50fb734c4617f5722d7164a75cf73c7ed6ebc6e6
|
7
|
+
data.tar.gz: 26dcb1c2aed6ef0aaad6cf93aa601860c8bcb40c4344948e20ff3b81f64c5cf7a6f80cc7e8442e42467e6aa7e25d2abe1649b9d7c56c07464f1ac6fb429211bb
|
data/Gemfile.lock
CHANGED
@@ -161,11 +161,36 @@ module DjiMqttConnect
|
|
161
161
|
|
162
162
|
attribute? :height, Types::JSON::Decimal
|
163
163
|
attribute? :humidity, Types::Integer
|
164
|
-
|
164
|
+
|
165
165
|
attribute? :temperature, Types::Temperature
|
166
166
|
attribute? :wind_speed, Types::JSON::Decimal
|
167
167
|
attribute? :environment_temperature, Types::Temperature
|
168
168
|
|
169
|
+
# {"0":"No rain","1":"Light rain","2":"Moderate rain","3":"Heavy rain"}
|
170
|
+
attribute? :rainfall, Types::Integer.enum(
|
171
|
+
RAINFALL_NONE = 0,
|
172
|
+
RAINFALL_LIGHT = 1,
|
173
|
+
RAINFALL_MODERATE = 2,
|
174
|
+
RAINFALL_HEAVY = 3
|
175
|
+
)
|
176
|
+
|
177
|
+
def humanized_rainfall
|
178
|
+
return unless rainfall
|
179
|
+
|
180
|
+
rainfall_key = case rainfall
|
181
|
+
when RAINFALL_NONE
|
182
|
+
"None"
|
183
|
+
when RAINFALL_LIGHT
|
184
|
+
"Light"
|
185
|
+
when RAINFALL_MODERATE
|
186
|
+
"Moderate"
|
187
|
+
when RAINFALL_HEAVY
|
188
|
+
"Heavy"
|
189
|
+
end
|
190
|
+
|
191
|
+
I18n.t(rainfall_key.downcase, scope: "dji_mqtt_connect.rainfall", default: rainfall_key)
|
192
|
+
end
|
193
|
+
|
169
194
|
attribute? :alternate_land_point do
|
170
195
|
attribute :latitude, Types::Latitude
|
171
196
|
attribute :longitude, Types::Longitude
|
@@ -8,6 +8,11 @@ module DjiMqttConnect
|
|
8
8
|
module Mixins
|
9
9
|
# Provides checks for the output object that contains a Types::ServicesOutputStatus status value
|
10
10
|
module ServicesOutputStatusChecks
|
11
|
+
# Provide accessors for each status value
|
12
|
+
DjiMqttConnect::Types::ServicesOutputStatus.values.each do |status_value|
|
13
|
+
define_method(:"status_#{status_value}?") { status == status_value }
|
14
|
+
end
|
15
|
+
|
11
16
|
def status_finalized?
|
12
17
|
[
|
13
18
|
Types::SERVICE_OUTPUT_STATUS_OK,
|
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.15
|
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-06-
|
11
|
+
date: 2023-06-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|