Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RC_Channel: add another 8 scripting aux functions #28858

Merged
merged 1 commit into from
Dec 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion libraries/RC_Channel/RC_Channel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ const AP_Param::GroupInfo RC_Channel::var_info[] = {
// @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}: 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
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),

Expand Down Expand Up @@ -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_7:
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
#if AP_VIDEOTX_ENABLED
case AUX_FUNC::VTX_POWER:
Expand Down Expand Up @@ -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_7:
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
break;

Expand Down
10 changes: 9 additions & 1 deletion libraries/RC_Channel/RC_Channel.h
Original file line number Diff line number Diff line change
Expand Up @@ -294,9 +294,17 @@ class RC_Channel {
SCRIPTING_6 = 305,
SCRIPTING_7 = 306,
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
AUX_FUNCTION_MAX = 308,
AUX_FUNCTION_MAX = 316,
};

// auxiliary switch handling (n.b.: we store this as 2-bits!):
Expand Down
Loading