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

Elevator subsystem skeleton creation #14

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

junyu101
Copy link

Creating elevator subsystem skeleton

Asana task URL: https://app.asana.com/0/1208731987242938/1209174882393849/f

Whats changing?

Basic Elevator Commands inlcluding rise, lower, stop, along with basic power setting to elevator motors, also added abstract methods for motor device info in electrical contract, and implemented them in competition contract 2025.

Questions/notes for reviewers

Does the Elevator subsystem have to extend a BaseSetpointSubsystem rather than a BaseSubsystem
Also are the motors supposed to be XCANTalon's or is it the XCANMotorControllers
What the heck is motion magic and do i need to use that for elevator power logic in the future?

No tests, just a basic skeleton

PR feedback legend

Symbol Meaning
⭐ ⭐ ⭐ must be addressed
⭐ ⭐ should be addressed
something to consider, a good idea

@junyu101 junyu101 requested a review from aschokking January 18, 2025 21:44
@junyu101 junyu101 self-assigned this Jan 18, 2025
@junyu101 junyu101 requested a review from a team as a code owner January 18, 2025 21:44
//common TargetHeights
}
double defaultElevatorPower;
final DoubleProperty elevatorPower;
Copy link
Contributor

Choose a reason for hiding this comment

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

⭐ ⭐ Making the elevator go up vs down usually needs VERY different powers. And maybe we just have a gamepad control it with the joystick in the short-run?

Copy link
Contributor

Choose a reason for hiding this comment

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

Agree, but gamepad control should go into the HumanInput of the maintainer.

@junyu101 junyu101 requested a review from JohnGilb January 19, 2025 00:01
//common TargetHeights
}
double defaultElevatorPower;
final DoubleProperty elevatorPower;
Copy link
Contributor

Choose a reason for hiding this comment

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

Agree, but gamepad control should go into the HumanInput of the maintainer.

this.contract = contract;

//was going to make this ephemeral but cant find it
this.elevatorTargetHeight = pf.createPersistentProperty("Elevator Target", 0.0);
Copy link
Contributor

Choose a reason for hiding this comment

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

just turn these into double and then use aKitLog.record in periodic() to save them

}
}

public void rise(){
Copy link
Contributor

Choose a reason for hiding this comment

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

recommend renaming to "raise".
Raise & Lower are a semantic pair.
Rise & Fall are a semantic pair.


@Override
public void refreshDataFrame() {
//to be implemented later
Copy link
Contributor

Choose a reason for hiding this comment

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

just do motor.refreshDataFrame() for any motor(s) you have.

public void refreshDataFrame() {
//to be implemented later
}

Copy link
Contributor

Choose a reason for hiding this comment

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

also add a periodic() where you call motor.periodic()


import javax.inject.Inject;

public class ElevatorMaintainerCommand extends BaseCommand {
Copy link
Contributor

Choose a reason for hiding this comment

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

this needs to extend BaseMaintainerCommand


import javax.inject.Inject;

public class SetElevatorTargetHeightCommand extends BaseCommand {
Copy link
Contributor

Choose a reason for hiding this comment

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

this needs to extend BaseSetpointCommand

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.

3 participants