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

added the supervised interfaces #67

Closed
wants to merge 1 commit into from
Closed

Conversation

dandeduck
Copy link
Member

Not sure about this one... close #66

Copy link
Member

@tomtzook tomtzook left a comment

Choose a reason for hiding this comment

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

You might want to consider providing some implementations for those interfaces.

Add documentation to your new classes and methods.


import com.flash3388.flashlib.control.Stoppable;

public interface Supervisable extends Stoppable {
Copy link
Member

Choose a reason for hiding this comment

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

Supervisable isn't the best name for it. I understand where it comes from, but saying supervision implies something completely different.

Maybe something around Limit?

import com.flash3388.flashlib.control.Stoppable;
import com.flash3388.flashlib.scheduling.Requirement;

public interface SupervisedMovable extends Stoppable, Supervisable, Requirement {
Copy link
Member

Choose a reason for hiding this comment

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

You could just extend Movable... You wouldn't need to provide the defaults in that case.

Do the same with the rest.


public interface SupervisedMovable extends Stoppable, Supervisable, Requirement {

default void supervisedMove(double speed) {
Copy link
Member

Choose a reason for hiding this comment

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

It kinda sounds like it should almost be implicit (the idea that the motion is supervised), such that a call to move is automatically supervised.

Remember that it's an interface, you don't actually need to provide all the capabilities in it with default, simply require someone to implement it to your specifications.

Same for rest.

Copy link
Member Author

Choose a reason for hiding this comment

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

I forgot to do it... I just copied them and didnt finish it lol

*
* @since FlashLib 2.0.0
*/
public interface SupervisedMovable2D extends SupervisedMovable, Requirement {
Copy link
Member

Choose a reason for hiding this comment

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

You copied the documentation.... Fix it to something correct.

void move(Vector2 motionVector);

@Override
default void supervisedMove(double speed) {
Copy link
Member

Choose a reason for hiding this comment

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

Why do you re-do the default here?

@tomtzook tomtzook closed this Mar 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Suggestion suggestion: Motor subsystem implementations with supervised mode
2 participants