-
Notifications
You must be signed in to change notification settings - Fork 2
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
Generalized CommandBase and moved subsystems to Robot #129
base: master
Are you sure you want to change the base?
Conversation
473348a
to
348aa0f
Compare
class ToteFeed; | ||
class Otto; | ||
|
||
typedef CommandBase<class Robot> RobotCommand; |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep
348aa0f
to
7e6b3a5
Compare
waitTime = config["waitTime"].as<double>(); | ||
isWaiting = false; | ||
Requires(claw); | ||
Requires(&*robot->claw); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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)
7e6b3a5
to
227e947
Compare
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)