dji_mqtt_connect 0.1.37.2 → 0.1.37.4
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/lib/dji_mqtt_connect/marshals/thing/product/osd_marshal.rb +14 -0
- data/lib/dji_mqtt_connect/messages/thing/product/events/takeoff_to_point_progress.rb +1 -1
- data/lib/dji_mqtt_connect/messages/thing/product/osd/dock.rb +2 -1
- data/lib/dji_mqtt_connect/messages/thing/product/osd/drone.rb +2 -1
- data/lib/dji_mqtt_connect/mixins/drone_mode_code.rb +11 -0
- data/lib/dji_mqtt_connect/types.rb +3 -2
- data/lib/dji_mqtt_connect/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8ea498768141f452e4988bdbe127a3f3ce98545107b1294b5e74cb3bd05ee115
|
|
4
|
+
data.tar.gz: dbe23442a7218e806ca39d6063c8dca0a049a395f2b01be6562d5a77f3fb473c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c5c2e38c3b9534f7fdd6fe515870b09898dc879e081fc9782226caa03e9c3f00d9ab8f86bed148e74c2389847c7ff24612ffa5c96cbf737687b25f1de871b2d0
|
|
7
|
+
data.tar.gz: 2c452cb706c2e9e74ea5a338d7cd8b34f61b1902642839c5985060f48df501759aead6b0771d026593420d84540608c89ce1e0c786894b6e5b21344abb28f9fd
|
|
@@ -33,9 +33,23 @@ module DjiMqttConnect
|
|
|
33
33
|
end
|
|
34
34
|
end
|
|
35
35
|
|
|
36
|
+
# Dock 3 sends tilt_angle as a bare value, with validity in tilt_valid_flag
|
|
37
|
+
# i.e. "tilt_angle":0.18,"tilt_valid_flag":1
|
|
38
|
+
guard ->(data) { data["tilt_angle"].is_a?(Numeric) } do
|
|
39
|
+
rename_keys "tilt_angle" => "value", "tilt_valid_flag" => "valid"
|
|
40
|
+
nest "tilt_angle", %w[value valid]
|
|
41
|
+
end
|
|
42
|
+
|
|
36
43
|
# FlightHub Dock messages have a host attribute
|
|
37
44
|
guard ->(data) { data.key?("host") } do
|
|
38
45
|
map_value "host" do
|
|
46
|
+
# Dock 3 sends tilt_angle as a bare value, with validity in tilt_valid_flag
|
|
47
|
+
# i.e. "tilt_angle":0.18,"tilt_valid_flag":1
|
|
48
|
+
guard ->(data) { data["tilt_angle"].is_a?(Numeric) } do
|
|
49
|
+
rename_keys "tilt_angle" => "value", "tilt_valid_flag" => "valid"
|
|
50
|
+
nest "tilt_angle", %w[value valid]
|
|
51
|
+
end
|
|
52
|
+
|
|
39
53
|
# Rename the invalid (for Ruby) wireless link attributes
|
|
40
54
|
guard ->(data) { data.key?("wireless_link") } do
|
|
41
55
|
# Translate wireless_link 4g keys (from remote payload)
|
|
@@ -25,7 +25,7 @@ module DjiMqttConnect
|
|
|
25
25
|
|
|
26
26
|
attribute :remaining_time, Types::JSON::Decimal
|
|
27
27
|
|
|
28
|
-
# {"task_finish":"One-key takeoff mission completed","task_ready":"Ready for takeoff","wayline_cancel":"Cancel flying to target point","wayline_failed":"Execution failed","wayline_ok":"Executed successfully, flown to target point","wayline_progress":"Executing"}
|
|
28
|
+
# {"task_finish":"One-key takeoff mission completed","task_ready":"Ready for takeoff","takeoff_prepare":"Preparing for takeoff","wayline_cancel":"Cancel flying to target point","wayline_failed":"Execution failed","wayline_ok":"Executed successfully, flown to target point","wayline_progress":"Executing"}
|
|
29
29
|
attribute :status, Types::TakeoffToPointProgressStatus
|
|
30
30
|
|
|
31
31
|
attribute :track_id, Types::String | Types::Nil
|
|
@@ -11,6 +11,7 @@ module DjiMqttConnect
|
|
|
11
11
|
|
|
12
12
|
attribute :data do
|
|
13
13
|
attribute? :acc_time, Types::Integer
|
|
14
|
+
attribute? :acdc_power_input, Types::JSON::Decimal
|
|
14
15
|
attribute? :activation_time, Types::Integer
|
|
15
16
|
|
|
16
17
|
attribute? :backup_battery do
|
|
@@ -105,7 +106,7 @@ module DjiMqttConnect
|
|
|
105
106
|
end
|
|
106
107
|
|
|
107
108
|
# {"0":"Idle","1":"On-site debugging","2":"Remote debugging","3":"Firmware update in progress","4":"Task in progress","5":"To be calibrated"}
|
|
108
|
-
attribute? :mode_code, Types::DockModeCode
|
|
109
|
+
attribute? :mode_code, Types::DockModeCode | Types::Integer
|
|
109
110
|
include Mixins::DockModeCode
|
|
110
111
|
|
|
111
112
|
attribute? :network_state do
|
|
@@ -75,7 +75,8 @@ module DjiMqttConnect
|
|
|
75
75
|
include Mixins::Longitude
|
|
76
76
|
|
|
77
77
|
# {"0":"Standby","1":"Takeoff preparation","2":"Takeoff preparation completed","3":"Manual flight","4":"Automatic takeoff","5":"Wayline flight","6":"Panoramic photography","7":"Intelligent tracking","8":"ADS-B avoidance","9":"Auto returning to home","10":"Automatic landing","11":"Forced landing","12":"Three-blade landing","13":"Upgrading","14":"Not connected","15":"APAS","16":"Virtual stick state","17":"Live Flight Controls","18":"Airborne RTK fixing mode","19":"Dock address selecting","20":"POI"}
|
|
78
|
-
attribute :mode_code, Types::DroneModeCode
|
|
78
|
+
attribute :mode_code, Types::DroneModeCode | Types::Integer
|
|
79
|
+
include Mixins::DroneModeCode
|
|
79
80
|
|
|
80
81
|
# {"0":"No meaning","1":"Insufficient battery power (return, landing)","2":"Insufficient battery voltage (return, landing)","3":"Severely low voltage (return, landing)","4":"Requested by remote controller buttons (takeoff, return, landing)","5":"Requested by App (takeoff, return, landing)","6":"Loss of remote controller signal (return, landing, hover)","7":"Triggered by external devices such as navigation, SDK, etc. (takeoff, return, landing)","8":"Entered the dock GEO Zone (landing)","9":"Although a return was triggered, it was too close to the Home point (landing)","10":"Although a return was triggered, it was too far from the Home point (landing)","11":"Requested when executing waypoint missions (takeoff)","12":"Requested after reaching above the Home point in the return phase (landing)","13":"Continued descent after the aircraft's height dropped to 0.7m from the ground (second-stage descent limit) leading to (landing)","14":"Forced breakthrough of low altitude protection by devices like App, SDK (landing)","15":"Requested due to passing flights in the vicinity (returning, landing)","16":"Requested due to height control failure (return, landing)","17":"Entered after intelligent low battery return (landing)","18":"AP controls the flight mode (manual flight)","19":"Hardware abnormally (return, landing)","20":"End of anti-collision protection (landing)","21":"Return canceled (hover)","22":"Encountered obstacles during the return (landing)","23":"Triggered by strong winds in the dock scene (return)"}
|
|
81
82
|
attribute? :mode_code_reason, Types::DroneModeCodeReason
|
|
@@ -328,13 +328,14 @@ module DjiMqttConnect
|
|
|
328
328
|
)
|
|
329
329
|
|
|
330
330
|
# How far a one-key takeoff has got. The statuses a flight to a target point reports, plus the
|
|
331
|
-
#
|
|
332
|
-
# {"task_finish":"One-key takeoff mission completed","task_ready":"Ready for takeoff","wayline_cancel":"Cancel flying to target point","wayline_failed":"Execution failed","wayline_ok":"Executed successfully, flown to target point","wayline_progress":"Executing"}
|
|
331
|
+
# ones the takeoff itself reports. DJI does not document takeoff_prepare, but docks send it
|
|
332
|
+
# {"task_finish":"One-key takeoff mission completed","task_ready":"Ready for takeoff","takeoff_prepare":"Preparing for takeoff","wayline_cancel":"Cancel flying to target point","wayline_failed":"Execution failed","wayline_ok":"Executed successfully, flown to target point","wayline_progress":"Executing"}
|
|
333
333
|
TakeoffToPointProgressStatus = Types::String.enum(
|
|
334
334
|
FLY_TO_POINT_PROGRESS_STATUS_IN_PROGRESS,
|
|
335
335
|
FLY_TO_POINT_PROGRESS_STATUS_OK,
|
|
336
336
|
FLY_TO_POINT_PROGRESS_STATUS_FAILED,
|
|
337
337
|
FLY_TO_POINT_PROGRESS_STATUS_CANCELED,
|
|
338
|
+
TAKEOFF_TO_POINT_PROGRESS_STATUS_PREPARE = "takeoff_prepare",
|
|
338
339
|
TAKEOFF_TO_POINT_PROGRESS_STATUS_READY = "task_ready",
|
|
339
340
|
TAKEOFF_TO_POINT_PROGRESS_STATUS_FINISHED = "task_finish"
|
|
340
341
|
)
|
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.4
|
|
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-
|
|
11
|
+
date: 2026-10-22 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|
|
@@ -455,6 +455,7 @@ files:
|
|
|
455
455
|
- lib/dji_mqtt_connect/mixins/dock_mode_code.rb
|
|
456
456
|
- lib/dji_mqtt_connect/mixins/drone_charge_state.rb
|
|
457
457
|
- lib/dji_mqtt_connect/mixins/drone_in_dock.rb
|
|
458
|
+
- lib/dji_mqtt_connect/mixins/drone_mode_code.rb
|
|
458
459
|
- lib/dji_mqtt_connect/mixins/drone_mode_code_reason.rb
|
|
459
460
|
- lib/dji_mqtt_connect/mixins/emergency_stop_state.rb
|
|
460
461
|
- lib/dji_mqtt_connect/mixins/environment_temperature.rb
|