mirror of https://github.com/ArduPilot/ardupilot
RC_Channel: add another 8 scripting aux functions
This commit is contained in:
parent
322b7520de
commit
634e106af4
|
@ -252,7 +252,7 @@ const AP_Param::GroupInfo RC_Channel::var_info[] = {
|
||||||
// @Values{Rover}: 211:Walking Height
|
// @Values{Rover}: 211:Walking Height
|
||||||
// @Values{Copter, Rover, Plane}: 212:Mount1 Roll, 213:Mount1 Pitch, 214:Mount1 Yaw, 215:Mount2 Roll, 216:Mount2 Pitch, 217:Mount2 Yaw
|
// @Values{Copter, Rover, Plane}: 212:Mount1 Roll, 213:Mount1 Pitch, 214:Mount1 Yaw, 215:Mount2 Roll, 216:Mount2 Pitch, 217:Mount2 Yaw
|
||||||
// @Values{Copter}: 219:Transmitter Tuning
|
// @Values{Copter}: 219:Transmitter Tuning
|
||||||
// @Values{Copter, Rover, Plane}: 300:Scripting1, 301:Scripting2, 302:Scripting3, 303:Scripting4, 304:Scripting5, 305:Scripting6, 306:Scripting7, 307:Scripting8
|
// @Values{Copter, Rover, Plane}: 300:Scripting1, 301:Scripting2, 302:Scripting3, 303:Scripting4, 304:Scripting5, 305:Scripting6, 306:Scripting7, 307:Scripting8, 308:Scripting9, 309:Scripting10, 310:Scripting11, 311:Scripting12, 312:Scripting13, 313:Scripting14, 314:Scripting15, 315:Scripting16
|
||||||
// @User: Standard
|
// @User: Standard
|
||||||
AP_GROUPINFO_FRAME("OPTION", 6, RC_Channel, option, 0, AP_PARAM_FRAME_COPTER|AP_PARAM_FRAME_ROVER|AP_PARAM_FRAME_PLANE|AP_PARAM_FRAME_BLIMP),
|
AP_GROUPINFO_FRAME("OPTION", 6, RC_Channel, option, 0, AP_PARAM_FRAME_COPTER|AP_PARAM_FRAME_ROVER|AP_PARAM_FRAME_PLANE|AP_PARAM_FRAME_BLIMP),
|
||||||
|
|
||||||
|
@ -685,6 +685,14 @@ void RC_Channel::init_aux_function(const AUX_FUNC ch_option, const AuxSwitchPos
|
||||||
case AUX_FUNC::SCRIPTING_6:
|
case AUX_FUNC::SCRIPTING_6:
|
||||||
case AUX_FUNC::SCRIPTING_7:
|
case AUX_FUNC::SCRIPTING_7:
|
||||||
case AUX_FUNC::SCRIPTING_8:
|
case AUX_FUNC::SCRIPTING_8:
|
||||||
|
case AUX_FUNC::SCRIPTING_9:
|
||||||
|
case AUX_FUNC::SCRIPTING_10:
|
||||||
|
case AUX_FUNC::SCRIPTING_11:
|
||||||
|
case AUX_FUNC::SCRIPTING_12:
|
||||||
|
case AUX_FUNC::SCRIPTING_13:
|
||||||
|
case AUX_FUNC::SCRIPTING_14:
|
||||||
|
case AUX_FUNC::SCRIPTING_15:
|
||||||
|
case AUX_FUNC::SCRIPTING_16:
|
||||||
#endif
|
#endif
|
||||||
#if AP_VIDEOTX_ENABLED
|
#if AP_VIDEOTX_ENABLED
|
||||||
case AUX_FUNC::VTX_POWER:
|
case AUX_FUNC::VTX_POWER:
|
||||||
|
@ -1864,6 +1872,14 @@ bool RC_Channel::do_aux_function(const AUX_FUNC ch_option, const AuxSwitchPos ch
|
||||||
case AUX_FUNC::SCRIPTING_6:
|
case AUX_FUNC::SCRIPTING_6:
|
||||||
case AUX_FUNC::SCRIPTING_7:
|
case AUX_FUNC::SCRIPTING_7:
|
||||||
case AUX_FUNC::SCRIPTING_8:
|
case AUX_FUNC::SCRIPTING_8:
|
||||||
|
case AUX_FUNC::SCRIPTING_9:
|
||||||
|
case AUX_FUNC::SCRIPTING_10:
|
||||||
|
case AUX_FUNC::SCRIPTING_11:
|
||||||
|
case AUX_FUNC::SCRIPTING_12:
|
||||||
|
case AUX_FUNC::SCRIPTING_13:
|
||||||
|
case AUX_FUNC::SCRIPTING_14:
|
||||||
|
case AUX_FUNC::SCRIPTING_15:
|
||||||
|
case AUX_FUNC::SCRIPTING_16:
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -294,9 +294,17 @@ public:
|
||||||
SCRIPTING_6 = 305,
|
SCRIPTING_6 = 305,
|
||||||
SCRIPTING_7 = 306,
|
SCRIPTING_7 = 306,
|
||||||
SCRIPTING_8 = 307,
|
SCRIPTING_8 = 307,
|
||||||
|
SCRIPTING_9 = 308,
|
||||||
|
SCRIPTING_10 = 309,
|
||||||
|
SCRIPTING_11 = 310,
|
||||||
|
SCRIPTING_12 = 311,
|
||||||
|
SCRIPTING_13 = 312,
|
||||||
|
SCRIPTING_14 = 313,
|
||||||
|
SCRIPTING_15 = 314,
|
||||||
|
SCRIPTING_16 = 315,
|
||||||
|
|
||||||
// this must be higher than any aux function above
|
// this must be higher than any aux function above
|
||||||
AUX_FUNCTION_MAX = 308,
|
AUX_FUNCTION_MAX = 316,
|
||||||
};
|
};
|
||||||
|
|
||||||
// auxiliary switch handling (n.b.: we store this as 2-bits!):
|
// auxiliary switch handling (n.b.: we store this as 2-bits!):
|
||||||
|
|
Loading…
Reference in New Issue