Skip to content

✨ Added Motor Group Append/Erase Functions#707

Open
Gracelu128 wants to merge 4 commits intodevelop-pros-4from
pros-4/motor_group_erase_append
Open

✨ Added Motor Group Append/Erase Functions#707
Gracelu128 wants to merge 4 commits intodevelop-pros-4from
pros-4/motor_group_erase_append

Conversation

@Gracelu128
Copy link
Copy Markdown
Contributor

@Gracelu128 Gracelu128 commented Oct 23, 2024

Summary:

Added append function that takes in port number and erase function that takes in reference to motor group.

Motivation:

The append function previously required a reference to the motor group, and the erase function required a port number. This update allows the append function to accept a port number, and the erase function to use a reference to the motor group.

Test Plan:

  • Try appending port via port number to motor group
  • Try erasing motors in motor group via reference to motor group

Comment on lines +2361 to +2368
/**
* Appends all the motors on the port to this motor group
*
* \param port The port to append to the motor group
*
*/
void append(std::int8_t port);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs some doc updates on rejection conditions (such as if the same absolute value port is found in the motor group)



} // namespace v5
} // namespace pros No newline at end of file
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add newline before merge (not part of changes in this PR but missing in general)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants