File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -144,8 +144,12 @@ def __decode_flight_capabilities(capabilities):
144
144
if capabilities & (1 << bit ):
145
145
# Use the bit value to get the corresponding capability enum
146
146
capability = mavutil .mavlink .enums ["MAV_PROTOCOL_CAPABILITY" ].get (1 << bit , "Unknown capability" )
147
- # Append the abbreviated name and description of the capability dictionary
148
- capabilities_dict [capability .name .replace ("MAV_PROTOCOL_CAPABILITY_" , "" )] = capability .description
147
+
148
+ if hasattr (capability , 'description' ):
149
+ # Append the abbreviated name and description of the capability dictionary
150
+ capabilities_dict [capability .name .replace ("MAV_PROTOCOL_CAPABILITY_" , "" )] = capability .description
151
+ else :
152
+ capabilities_dict [f'BIT{ bit } ' ] = capability
149
153
150
154
return capabilities_dict
151
155
You can’t perform that action at this time.
0 commit comments