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

HL commander: add hlCommander.groupmask param #1333

Merged
merged 1 commit into from
Dec 15, 2023
Merged
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
11 changes: 10 additions & 1 deletion src/modules/src/crtp_commander_high_level.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ STATIC_MEM_TASK_ALLOC(crtpCommanderHighLevelTask, CMD_HIGH_LEVEL_TASK_STACKSIZE)

// trajectory command (first byte of crtp packet)
enum TrajectoryCommand_e {
COMMAND_SET_GROUP_MASK = 0,
COMMAND_SET_GROUP_MASK = 0, // Deprecated (removed after Dec 2024), use parameter hlCommander.groupmask instead
COMMAND_TAKEOFF = 1, // Deprecated (removed after August 2023), use COMMAND_TAKEOFF_2
COMMAND_LAND = 2, // Deprecated (removed after August 2023), use COMMAND_LAND_2
COMMAND_STOP = 3,
Expand Down Expand Up @@ -901,4 +901,13 @@ PARAM_ADD_CORE(PARAM_FLOAT, vtoff, &defaultTakeoffVelocity)
*/
PARAM_ADD_CORE(PARAM_FLOAT, vland, &defaultLandingVelocity)

/**
* @brief Group mask of this Crazyflie
*
* There are up to 8 groups each robot may belong to.
* Use 0 to indicate no group, i.e., this Crazyflie will react to all commands.
* Otherwise, for each group this robot should belong to set the corresponding bit to 1.
*/
PARAM_ADD_CORE(PARAM_UINT8, groupmask, &group_mask)

PARAM_GROUP_STOP(hlCommander)