dji_mqtt_connect 0.1.37 → 0.1.37.1

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: c9d9f413e3ed17ec23e3ebd7f0922c723d02c34887e21370fc93c4f3c967e501
4
- data.tar.gz: 896905fcf6590cc681dd214b703d423f9b1387ed51b26218d6e4d4ce25b0f882
3
+ metadata.gz: b63b04b393954efa6f4d626c1caf75faf321e0535012be40119e73b7388eb87d
4
+ data.tar.gz: e5934e0efc77c1362fc1592941c3aa84dd25d8ef49efde4b612a3aeb68131284
5
5
  SHA512:
6
- metadata.gz: e94e7632a218b5da97d0529bb5303e4300995e16b91870c689c7ca70140a98d852bbdf96c2d1e95e8e59d8a0cc6d79e7a2ca7752ad1f2d4d096f9fc9d40ae00c
7
- data.tar.gz: 977f59258206042ee6f707f0a1c8f1a966b750b7f6cb0ef30f84131f44f5571acb7d15d1c640b69ce34b7adb4155c77f285f5718c28411bc77a89d4d02c038b9
6
+ metadata.gz: ba512329d2aa1dc4b92f96a177fc35afc34a548892cb37ffc01f3ffcd380b2f88c91ac71a99401308a499b7e9b24200b2009b00ff3ef9e9d8277b22bbe307584
7
+ data.tar.gz: 03e703f9148725fb109b472e8e7d8beb1274b699a2cface1f77878e56d24e90db1740d3d7d7fed14e293489d9604826fa30ffa99e703517a240d86dfe7e7b7ec
@@ -57,7 +57,7 @@ module DjiMqttConnect
57
57
  total_flight_time: 146930,
58
58
  track_id: nil,
59
59
  vertical_speed: -0.30000001192092896,
60
- wind_direction: 180,
60
+ wind_direction: Types::WIND_DIRECTION_NORTHEAST,
61
61
  wind_speed: 0.800000011920929
62
62
  },
63
63
  sn: "DRONE01"
@@ -98,7 +98,9 @@ module DjiMqttConnect
98
98
  attribute :total_flight_time, Types::JSON::Decimal
99
99
  attribute? :track_id, Types::String | Types::Nil
100
100
  attribute :vertical_speed, Types::JSON::Decimal
101
- attribute :wind_direction, Types::JSON::Decimal
101
+ attribute :wind_direction, Types::WindDirection | Types::Integer
102
+ include Mixins::WindDirection
103
+
102
104
  attribute :wind_speed, Types::JSON::Decimal
103
105
 
104
106
  # M30 Fields
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module DjiMqttConnect
4
+ module Mixins
5
+ # Provides a conditional that returns false for wind directions that are not one of the
6
+ # compass points DJI documents. A drone reports 0 when it has no reading, and one that is
7
+ # not connected has been seen reporting 256 alongside its other placeholders
8
+ module WindDirection
9
+ def wind_direction?
10
+ Types::WindDirection.valid?(wind_direction)
11
+ end
12
+ end
13
+ end
14
+ end
@@ -499,6 +499,22 @@ module DjiMqttConnect
499
499
  VIDEO_TYPE_ZOOM = "zoom"
500
500
  )
501
501
 
502
+ # The compass point the wind is blowing from. A drone reports 0 when it has no reading,
503
+ # and firmware has been seen reporting values outside the documented range entirely, so
504
+ # the OSD messages leave the value unconstrained and offer a wind_direction? predicate
505
+ # to ask whether a reported one is a compass point
506
+ # {"1":"True north","2":"Northeast","3":"East","4":"Southeast","5":"South","6":"Southwest","7":"West","8":"Northwest"}
507
+ WindDirection = Types::Integer.enum(
508
+ WIND_DIRECTION_TRUE_NORTH = 1,
509
+ WIND_DIRECTION_NORTHEAST = 2,
510
+ WIND_DIRECTION_EAST = 3,
511
+ WIND_DIRECTION_SOUTHEAST = 4,
512
+ WIND_DIRECTION_SOUTH = 5,
513
+ WIND_DIRECTION_SOUTHWEST = 6,
514
+ WIND_DIRECTION_WEST = 7,
515
+ WIND_DIRECTION_NORTHWEST = 8
516
+ )
517
+
502
518
  # Target device for dongle/eSIM operations
503
519
  # {"dock":"Set dock dongle","drone":"Set aircraft dongle"}
504
520
  TargetDeviceType = Types::String.enum(
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DjiMqttConnect
4
- VERSION = "0.1.37"
4
+ VERSION = "0.1.37.1"
5
5
  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.37
4
+ version: 0.1.37.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sphere Drones
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-09-11 00:00:00.000000000 Z
11
+ date: 2026-09-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -474,6 +474,7 @@ files:
474
474
  - lib/dji_mqtt_connect/mixins/timestamp_or_current.rb
475
475
  - lib/dji_mqtt_connect/mixins/video_quality.rb
476
476
  - lib/dji_mqtt_connect/mixins/video_type.rb
477
+ - lib/dji_mqtt_connect/mixins/wind_direction.rb
477
478
  - lib/dji_mqtt_connect/railtie.rb
478
479
  - lib/dji_mqtt_connect/railties/message_serializer.rb
479
480
  - lib/dji_mqtt_connect/topic_repository.rb