Skip to content

Commit 12c1c92

Browse files
SRV_Channel: create auxfunction for lights and video switcher
1 parent e6c48e8 commit 12c1c92

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

libraries/SRV_Channel/SRV_Channel.cpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ const AP_Param::GroupInfo SRV_Channel::var_info[] = {
111111
// @Values{Plane}: 41:TiltMotorsFront,45:TiltMotorsRear,46:TiltMotorRearLeft,47:TiltMotorRearRight
112112
// @Values: 51:RCIN1,52:RCIN2,53:RCIN3,54:RCIN4,55:RCIN5,56:RCIN6,57:RCIN7,58:RCIN8,59:RCIN9,60:RCIN10,61:RCIN11,62:RCIN12,63:RCIN13,64:RCIN14,65:RCIN15,66:RCIN16
113113
// @Values{Plane, Copter, Rover}: 51:RCIN1,52:RCIN2,53:RCIN3,54:RCIN4,55:RCIN5,56:RCIN6,57:RCIN7,58:RCIN8,59:RCIN9,60:RCIN10,61:RCIN11,62:RCIN12,63:RCIN13,64:RCIN14,65:RCIN15,66:RCIN16
114-
// @Values{Sub}: 51:RCIN1/Pitch,52:RCIN2/Roll,53:RCIN3/HeaveVertical,54:RCIN4/YawTurn,55:RCIN5/SurgeForward,56:RCIN6/SwayLateral,57:RCIN7/CameraPan,58:RCIN8/CameraTilt,59:RCIN9/Lights1Level,60:RCIN10/Lights2Level,61:RCIN11/VideoSwitch,62:RCIN12,63:RCIN13,64:RCIN14,65:RCIN15,66:RCIN16
114+
// @Values{Sub}: 51:RCIN1/Pitch,52:RCIN2/Roll,53:RCIN3/HeaveVertical,54:RCIN4/YawTurn,55:RCIN5/SurgeForward,56:RCIN6/SwayLateral,57:RCIN7/CameraPan,58:RCIN8/CameraTilt,59:RCIN9,60:RCIN10,61:RCIN11,62:RCIN12,63:RCIN13,64:RCIN14,65:RCIN15,66:RCIN16
115115
// @Values: 67:Ignition,69:Starter
116116
// @Values{Plane}: 67:Ignition,69:Starter
117117
// @Values: 70:Throttle
@@ -163,6 +163,9 @@ const AP_Param::GroupInfo SRV_Channel::var_info[] = {
163163
// @Values{Plane, Copter}: 168:Motor21,169:Motor22,170:Motor23,171:Motor24
164164
// @Values{Plane, Copter}: 172:Motor25,173:Motor26,174:Motor27,175:Motor28
165165
// @Values{Plane, Copter}: 176:Motor29,177:Motor30,178:Motor31,179:Motor32
166+
// @Values: 180:CameraZoom
167+
// @Values{Sub}: 181:Lights1,182:Lights2
168+
// @Values{Sub}: 183:VideoSwitch
166169
// @User: Standard
167170
// @RebootRequired: True
168171
AP_GROUPINFO("FUNCTION", 5, SRV_Channel, function, 0),

libraries/SRV_Channel/SRV_Channel.h

+3
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,9 @@ class SRV_Channel {
210210
k_motor31 = 178,
211211
k_motor32 = 179,
212212
k_cam_zoom = 180,
213+
k_lights1 = 181,
214+
k_lights2 = 182,
215+
k_video_switch = 183,
213216
k_nr_aux_servo_functions ///< This must be the last enum value (only add new values _before_ this one)
214217
} Function;
215218

libraries/SRV_Channel/SRV_Channel_aux.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,9 @@ void SRV_Channel::aux_servo_function_setup(void)
202202
break;
203203
case k_cam_zoom:
204204
case k_cam_focus:
205+
case k_lights1:
206+
case k_lights2:
207+
case k_video_switch:
205208
set_range(1000);
206209
break;
207210
default:

0 commit comments

Comments
 (0)