@interface DJIPayloadWidget : NSObject<NSCopying> |
Header: | DJIPayloadWidget.h |
Inherits From: | NSObject |
Class to represent the properties of a payload widget. Payload SDK defines different types of widgets for the interaction between the payload device and the mobile device.
@property (nonatomic, readonly) DJIPayloadWidgetType type |
Header: | DJIPayloadWidget.h |
The type of the widget. Different types have different type of values.
@property (nonatomic, readonly) NSUInteger index |
Header: | DJIPayloadWidget.h |
The index of the widget. An index is used to differentiate widgets of the same type.
@property (nonatomic, readonly, copy) NSString *name |
Header: | DJIPayloadWidget.h |
The name of the widget. This is determined by the payload device and not configurable through the mobile device.
@property (nonatomic, readonly) DJIPayloadButtonState buttonState |
Header: | DJIPayloadWidget.h |
The button state. It is only valid when DJIPayloadWidgetType
is DJIPayloadWidgetTypeButton
.
@property (nonatomic, readonly) DJIPayloadSwitchState switchState |
Header: | DJIPayloadWidget.h |
The switch state. It is only valid when DJIPayloadWidgetType
is DJIPayloadWidgetTypeSwitch
. It is possible to configure the switch value through configureWidgetValue:type:index:withCompletion
.
@property (nonatomic, readonly) NSProgress *percentage |
Header: | DJIPayloadWidget.h |
The progress value of a range bar. It is only valid when DJIPayloadWidgetType
is DJIPayloadWidgetTypeRange
. It is possible to configure the range value through configureWidgetValue:type:index:withCompletion
.
@property (nonatomic, readonly, copy) NSArray *list |
Header: | DJIPayloadWidget.h |
All the items in the list. It is only valid when DJIPayloadWidgetType
is DJIPayloadWidgetTypeList
.
@property (nonatomic, readonly, assign) NSUInteger selectedListItem |
Header: | DJIPayloadWidget.h |
The index of the selected item in the list. It is only valid when DJIPayloadWidgetType
is DJIPayloadWidgetTypeList
. It is possible to configure the selected item index through configureWidgetValue:type:index:withCompletion
.
@property (nonatomic, readonly, copy) NSString *inputHint |
Header: | DJIPayloadWidget.h |
The hint for an input box determined by the payload device. It is only valid when DJIPayloadWidgetType
is DJIPayloadWidgetTypeInput
.
@property (nonatomic, readonly, assign) NSInteger inputValue |
Header: | DJIPayloadWidget.h |
The value of an input box. It is only valid when DJIPayloadWidgetType
is DJIPayloadWidgetTypeInput
. It is possible to configure the value through configureWidgetValue:type:index:withCompletion
.
typedef NS_ENUM(NSUInteger, DJIPayloadWidgetType) |
Header: | DJIPayloadWidget.h |
Types of widgets on the payload device.
DJIPayloadWidgetTypeNone | None. |
DJIPayloadWidgetTypeButton | The widget is a button. The value is a value of DJIPayloadButtonState . A button widget is not configurable by the mobile side and the state is controlled by the hardware. |
DJIPayloadWidgetTypeSwitch | The widget is a switch. The value is a value of DJIPayloadSwitchState . |
DJIPayloadWidgetTypeRange | The widget is a range bar with percentage as the value. The valid value is from 0 to 100. |
DJIPayloadWidgetTypeList | The widget is a list. The value represents the single selected item in the list. The valid value is from 0 to the list size - 1. The list size is returned by the hardware. |
DJIPayloadWidgetTypeInput | The widget is an input box. The value should an unsigned 32-bit integer. |
{{searchCount}} Results