Skip to content
This repository was archived by the owner on Dec 20, 2025. It is now read-only.

Generalized CommandBase and moved subsystems to Robot#129

Open
amikhalev wants to merge 1 commit into
masterfrom
new-commandbase
Open

Generalized CommandBase and moved subsystems to Robot#129
amikhalev wants to merge 1 commit into
masterfrom
new-commandbase

Conversation

@amikhalev
Copy link
Copy Markdown
Contributor

Moved the storage of classes to the Robot class, and generalizd the
code for CommandBase to work for any Robot class. This is a first step
in creating PotatoSkin (common code library)

Comment thread src/Robot.h
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.

Is that a forward declaration inside of the template param?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yep

Comment thread src/Commands/Claw/ClawSmartRollers.h Outdated
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.

Oh lawd. The expression &*robot->claw made me sick. Why does it need to be like this?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hmm, I can't find much about this. It appears to be equivalent to &(*(robot->claw)), which from my understanding is equivalent to robot->claw. @amikhalev? Edit: A comment would be very useful here, perhaps in all of these instances.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

it's a std::unique_ptr

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This was just reverted to robot->claw, so does that work too then? Were you trying to change it from a unique_ptr to just a pointer? Does that work?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It is no longer a std::unique_ptr

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Oh, I missed that. Thanks for the explanation.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

No problem.

Moved the storage of classes to the Robot class, and generalizd the
code for CommandBase to work for any Robot class. This is a first step
in creating PotatoSkin (common code library)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants