Skip to content

Commit

Permalink
Merge pull request #1333 from IMRCLab/feature_groupmask
Browse files Browse the repository at this point in the history
HL commander: add hlCommander.groupmask param
  • Loading branch information
knmcguire authored Dec 15, 2023
2 parents 6008050 + dd931d4 commit 81a0821
Showing 1 changed file with 10 additions and 1 deletion.
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)

0 comments on commit 81a0821

Please sign in to comment.