dji_mqtt_connect 0.1.25.2 → 0.1.25.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f5ebb4aa93615a5f9bf4b1fd5e4940124097e5e39be3da6689811cdd901279e4
4
- data.tar.gz: d01e12d6cffd21964e6d1b0318a788d9bb97c096c84349847020ee04743fc2d1
3
+ metadata.gz: 891ae518b686e07f8c6f44040136490d14fffcf43d0508b19d862da4dfefa408
4
+ data.tar.gz: 1e181b30070e686e00101986bc2df0d5fcdaad891bdb1fc9744cc7503780eb10
5
5
  SHA512:
6
- metadata.gz: f57cb155efddf6819381c5d23694f8fc620efdfdc4d565eb38ab373207745f7cf18fc646005738e1ff19a14e48e68f7d064496729f10decfa20c3dcf82901e87
7
- data.tar.gz: f9acf914b4d687195233b267b22b6ef341988e19bb2f50bdfca62b8289cfae0ed3f1705ddbf16bf3d44213d611f2a34a96c553110220e9aa1402260c44dbadea
6
+ metadata.gz: 1c28e77b6c05fc04aa9fc9ced1de07811c79a7f7dea742bcdb279670b45dca049090dcd1f4c522691bd5aa115a7aa7010f799e5aabbfb7c0d69d0df1b984b33e
7
+ data.tar.gz: 9fd71b52f98c3331775e9f3e1f7afd8f6f731d0d25a0b4658f021e03bbf59cf8767106ff3964ff196593f1ca7665ce124953e4ae80384cb13c3e2317e9a6db11
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- dji_mqtt_connect (0.1.25.2)
4
+ dji_mqtt_connect (0.1.25.3)
5
5
  activesupport (>= 6.0, <= 8)
6
6
  dry-struct (~> 1.7)
7
7
  dry-transformer (~> 1.0)
@@ -74,7 +74,8 @@ module DjiMqttConnect
74
74
  attribute? :electric_supply_voltage, Types::Integer
75
75
 
76
76
  attribute? :flighttask_prepare_capacity, Types::Integer
77
- attribute? :flighttask_step_code, Types::Integer
77
+
78
+ attribute? :flighttask_step_code, Types::FlightTaskStepCode
78
79
 
79
80
  attribute? :job_number, Types::Integer
80
81
 
@@ -20,9 +20,6 @@ module DjiMqttConnect
20
20
  wind_speed
21
21
  ]
22
22
 
23
- CAMERA_MODE_PHOTO_TAKING = 0
24
- CAMREA_MODE_RECORDING = 1
25
-
26
23
  attribute :data do
27
24
  include Mixins::LatitudeConditional
28
25
  include Mixins::LongitudeConditional
@@ -69,7 +66,10 @@ module DjiMqttConnect
69
66
  attribute :horizontal_speed, Types::JSON::Decimal
70
67
  attribute :latitude, Types::Latitude
71
68
  attribute :longitude, Types::Longitude
72
- attribute :mode_code, Types::Integer
69
+
70
+ # {"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"}
71
+ attribute :mode_code, Types::DroneModeCode
72
+
73
73
  attribute :position_state do
74
74
  attribute :gps_number, Types::Integer
75
75
  attribute :is_fixed, Types::Integer
@@ -92,14 +92,10 @@ module DjiMqttConnect
92
92
  attribute? :cameras, Types::Array do
93
93
  attribute :payload_index, Types::String
94
94
 
95
- # {"0":"Photo taking","1":"Recording"}
96
- attribute? :camera_mode, Types::Integer.enum(
97
- CAMERA_MODE_PHOTO_TAKING,
98
- CAMREA_MODE_RECORDING
99
- ) | Types::ErrorInteger
95
+ attribute? :camera_mode, Types::Integer
100
96
 
101
97
  def camera_mode?
102
- camera_mode && !Types::ErrorInteger.valid?(camera_mode)
98
+ camera_mode && Types::CameraMode.valid?(camera_mode)
103
99
  end
104
100
 
105
101
  # {"min":2,"max":20}
@@ -39,6 +39,53 @@ module DjiMqttConnect
39
39
  DeviceType = Types::Integer
40
40
  DeviceSubType = Types::Integer
41
41
 
42
+ # {"0":"Capturing","1":"Recording","2":"Smart Low-Light","3":"Panorama","-1":"Unsupported mode"}
43
+ # "4":"Timed Shot"
44
+ CameraMode = Types::Integer.enum(
45
+ CAMERA_MODE_CAPTURING = 0,
46
+ CAMERA_MODE_RECORDING = 1,
47
+ CAMERA_MODE_SMART_LOW_LIGHT = 2,
48
+ CAMERA_MODE_PANORAMA = 3,
49
+ CAMERA_MODE_TIMED_SHOT = 4
50
+ )
51
+
52
+ # {"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"}
53
+ DroneModeCode = Types::Integer.enum(
54
+ DRONE_MODE_STANDBY = 0,
55
+ DRONE_MODE_TAKEOFF_PREPARATION = 1,
56
+ DRONE_MODE_TAKEOFF_PREPARATION_COMPLETED = 2,
57
+ DRONE_MODE_MANUAL_FLIGHT = 3,
58
+ DRONE_MODE_AUTOMATIC_TAKEOFF = 4,
59
+ DRONE_MODE_WAYLINE_FLIGHT = 5,
60
+ DRONE_MODE_PANORAMIC_PHOTOGRAPHY = 6,
61
+ DRONE_MODE_INTELLIGENT_TRACKING = 7,
62
+ DRONE_MODE_ADS_B_AVOIDANCE = 8,
63
+ DRONE_MODE_AUTO_RETURNING_TO_HOME = 9,
64
+ DRONE_MODE_AUTOMATIC_LANDING = 10,
65
+ DRONE_MODE_FORCED_LANDING = 11,
66
+ DRONE_MODE_THREE_BLADE_LANDING = 12,
67
+ DRONE_MODE_UPGRADING = 13,
68
+ DRONE_MODE_NOT_CONNECTED = 14,
69
+ DRONE_MODE_APAS = 15,
70
+ DRONE_MODE_VIRTUAL_STICK_STATE = 16,
71
+ DRONE_MODE_LIVE_FLIGHT_CONTROLS = 17,
72
+ DRONE_MODE_AIRBORNE_RTK_FIXING_MODE = 18,
73
+ DRONE_MODE_DOCK_ADDRESS_SELECTING = 19,
74
+ DRONE_MODE_POI = 20
75
+ )
76
+
77
+ # {"0":"Operation preparation","1":"In-flight operation","2":"Post-operation state recovery","3":"Custom flight area updating","4":"Terrain obstacle updating","5":"Mission idle","255":"Aircraft is abnormal","256":"Unknown state"}
78
+ FlightTaskStepCode = Types::Integer.enum(
79
+ FLIGHT_TASK_STEP_OPERATION_PREPARATION = 0,
80
+ FLIGHT_TASK_STEP_IN_FLIGHT_OPERATION = 1,
81
+ FLIGHT_TASK_STEP_POST_OPERATION_STATE_RECOVERY = 2,
82
+ FLIGHT_TASK_STEP_CUSTOM_FLIGHT_AREA_UPDATING = 3,
83
+ FLIGHT_TASK_STEP_TERRAIN_OBSTACLE_UPDATING = 4,
84
+ FLIGHT_TASK_STEP_MISSION_IDLE = 5,
85
+ FLIGHT_TASK_STEP_AIRCRAFT_IS_ABNORMAL = 255,
86
+ FLIGHT_TASK_STEP_UNKNOWN_STATE = 256
87
+ )
88
+
42
89
  InvalidTemperature = Types::Integer.constrained(gteq: 1300) # maximum temp of k-type thermocouple, errors are usually 30K+
43
90
  Temperature = InvalidTemperature | Types::JSON::Decimal
44
91
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DjiMqttConnect
4
- VERSION = "0.1.25.2"
4
+ VERSION = "0.1.25.3"
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.25.2
4
+ version: 0.1.25.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sphere Drones
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-02-12 00:00:00.000000000 Z
11
+ date: 2025-02-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport