rain
2024-08-05 94174d2cc22afed6f41c270d970903484bfc5708
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
package com.dji.sample.patches.xml.mode.share.action.param;
 
import com.dji.sample.patches.xml.mode.CameraActionEnum;
import lombok.Data;
 
/**
 * @PROJECT_NAME: drone
 * @DESCRIPTION:
 * @USER: aix
 * @DATE: 2024/3/27 13:47
 */
@Data
public class ActionActuatorFuncParam {
 
    /**
     * 负载挂载位置
     * 0:飞行器1号挂载位置。M300 RTK,M350 RTK机型,对应机身左前方。其它机型,对应主云台。
     * 1:飞行器2号挂载位置。M300 RTK,M350 RTK机型,对应机身右前方。
     * 2:飞行器3号挂载位置。M300 RTK,M350 RTK机型,对应机身上方。
     */
    private Integer payloadPositionIndex;
 
    public static ActionActuatorFuncParam createActionActuatorFuncParam(CameraActionEnum type) {
 
        switch (type) {
            case TAKE_PHOTO:
                return new TakePhotoParam();
            case START_RECORD:
                return new StartRecordParam();
            case STOP_RECORD:
                return new StopRecordParam();
            case FOCUS:
                return new FocusParam();
            case ZOOM:
                return new ZoomParam();
            case CUSTOM_DIR_NAME:
                return new CustomDirNameParam();
            case GIMBAL_ROTATE:
                return new GimbalRotateParam();
            case GIMBAL_EVENLY_ROTATE:
                return new GimbalEvenlyRotateParam();
            case ROTATE_YAW:
                return new RotateYawParam();
            case HOVER:
                return new HoverParam();
            case ORIENTED_SHOOT:
                return new OrientedShootParam();
            case PANO_SHOT:
                return new PanoShotParam();
            case START_TIME_LAPSE:
                return new StartTimeLapseParam();
            default:
                throw new IllegalStateException("Unexpected value: " + type);
        }
    }
 
}