Line data Source code
1 : #include "AP_Torqeedo_Params.h"
2 : #include <SRV_Channel/SRV_Channel.h>
3 :
4 : // table of user settable parameters
5 : const AP_Param::GroupInfo AP_Torqeedo_Params::var_info[] = {
6 :
7 : // @Param: TYPE
8 : // @DisplayName: Torqeedo connection type
9 : // @Description: Torqeedo connection type
10 : // @Values: 0:Disabled, 1:Tiller, 2:Motor
11 : // @User: Standard
12 : // @RebootRequired: True
13 : AP_GROUPINFO_FLAGS("TYPE", 1, AP_Torqeedo_Params, type, 0, AP_PARAM_FLAG_ENABLE),
14 :
15 : // @Param: ONOFF_PIN
16 : // @DisplayName: Torqeedo ON/Off pin
17 : // @Description: Pin number connected to Torqeedo's on/off pin. -1 to use serial port's RTS pin if available
18 : // @Values: -1:Disabled,50:AUX1,51:AUX2,52:AUX3,53:AUX4,54:AUX5,55:AUX6
19 : // @Range: -1 127
20 : // @User: Standard
21 : // @RebootRequired: True
22 : AP_GROUPINFO("ONOFF_PIN", 2, AP_Torqeedo_Params, pin_onoff, -1),
23 :
24 : // @Param: DE_PIN
25 : // @DisplayName: Torqeedo DE pin
26 : // @Description: Pin number connected to RS485 to Serial converter's DE pin. -1 to use serial port's CTS pin if available
27 : // @Values: -1:Disabled,50:AUX1,51:AUX2,52:AUX3,53:AUX4,54:AUX5,55:AUX6
28 : // @Range: -1 127
29 : // @User: Standard
30 : // @RebootRequired: True
31 : AP_GROUPINFO("DE_PIN", 3, AP_Torqeedo_Params, pin_de, -1),
32 :
33 : // @Param: OPTIONS
34 : // @DisplayName: Torqeedo Options
35 : // @Description: Torqeedo Options Bitmask
36 : // @Bitmask: 0:Log,1:Send debug to GCS
37 : // @User: Advanced
38 : AP_GROUPINFO("OPTIONS", 4, AP_Torqeedo_Params, options, 1),
39 :
40 : // @Param: POWER
41 : // @DisplayName: Torqeedo Motor Power
42 : // @Description: Torqeedo motor power. Only applied when using motor connection type (e.g. TRQD_TYPE=2)
43 : // @Units: %
44 : // @Range: 0 100
45 : // @Increment: 1
46 : // @User: Advanced
47 : AP_GROUPINFO("POWER", 5, AP_Torqeedo_Params, motor_power, 100),
48 :
49 : // @Param: SLEW_TIME
50 : // @DisplayName: Torqeedo Throttle Slew Time
51 : // @Description: Torqeedo slew rate specified as the minimum number of seconds required to increase the throttle from 0 to 100%. Higher values cause a slower response, lower values cause a faster response. A value of zero disables the limit
52 : // @Units: s
53 : // @Range: 0 5
54 : // @Increment: 0.1
55 : // @User: Advanced
56 : AP_GROUPINFO("SLEW_TIME", 6, AP_Torqeedo_Params, slew_time, 2.0),
57 :
58 : // @Param: DIR_DELAY
59 : // @DisplayName: Torqeedo Direction Change Delay
60 : // @Description: Torqeedo direction change delay. Output will remain at zero for this many seconds when transitioning between forward and backwards rotation
61 : // @Units: s
62 : // @Range: 0 5
63 : // @Increment: 0.1
64 : // @User: Advanced
65 : AP_GROUPINFO("DIR_DELAY", 7, AP_Torqeedo_Params, dir_delay, 1.0),
66 :
67 : // @Param: SERVO_FN
68 : // @DisplayName: Torqeedo Servo Output Function
69 : // @Description: Torqeedo Servo Output Function
70 : // @Values: 70:Throttle,73:ThrottleLeft,74:ThrottleRight
71 : // @Increment: 0.1
72 : // @User: Advanced
73 : AP_GROUPINFO("SERVO_FN", 8, AP_Torqeedo_Params, servo_fn, (int16_t)SRV_Channel::k_throttle),
74 :
75 : AP_GROUPEND
76 : };
77 :
78 570 : AP_Torqeedo_Params::AP_Torqeedo_Params(void)
79 : {
80 570 : AP_Param::setup_object_defaults(this, var_info);
81 570 : }
|