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

Yash.claw #4

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

Yash.claw #4

wants to merge 3 commits into from

Conversation

YashwantCherukuri
Copy link

Pull request template

Please fill out the fields below by replacing their explaination text.


Subsystem: Affected Subsystem name
Everybot
Description:

Describe your changes in a few sentences.
coded the tank drive and arm of the Everybot. Tank drive uses a simple motor and if statement commands. Arm is a tad longer using a boolean for the dpad options but it has 2 motors as well as a good amount of if statements.
Tested: Yes/No was your code tested on a robot or simulator?
Checked on VS Code Build function, both folders were successful
Checking that the code has built locally is important, but that is not testing.
If yes, please elaborate.

Collaborators: List anyone else who worked on this PR, preferably with @s
@fruzyna walked me through the process of coding the everybot.

Before submitting:

  • Review that your code meets our coding standards
  • Confirm there is a green ✔️ (not a red ❌) next to your last commit's date
  • Replace all text above with appropriate descriptions
  • Remove header and footer from this template
  • Add @smccrorie and @fruzyna as reviewers

Completed Tank Drive + Arm code so should be functional.
Comment on lines +45 to +50
mSpeed2 = 0.8;
}
if (sourceInput == dPadButton2){
if (dPadButton2.getValue()){
mSpeed2 = 0.8;
}
Copy link
Member

Choose a reason for hiding this comment

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

How do you stop mSpeed2

Post Liam critiques
public void inputUpdate(Input sourceInput) {
// TODO Auto-generated method stub
if (sourceInput == forwardTrigger || sourceInput == backTrigger){
if (sourceInput == forwardTrigger){
Copy link
Member

Choose a reason for hiding this comment

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

Get rid of this second level of if statements and merge the 2 3rd levels

@Override
public void inputUpdate(Input sourceInput) {
if (sourceInput == lefttrigger || sourceInput == righttrigger){
if (sourceInput == lefttrigger) {
Copy link
Member

Choose a reason for hiding this comment

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

Get rid of this second level of if statements and merge the 2 3rd levels

else {
motor.setCoast();
}
if (motorSpeed == 0){
Copy link
Member

Choose a reason for hiding this comment

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

You probably want 2 different speeds for left and right

public void update() {
// TODO Auto-generated method stub
motor.setValue(motorSpeed);
if (motorSpeed == motor.getValue() || motorSpeed == motor2.getValue()){
Copy link
Member

Choose a reason for hiding this comment

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

What is this trying to accomplish?

@@ -41,6 +41,8 @@ public enum WSOutputs implements Outputs {
ANGLE3("Module 3 Angle Motor", new WsSparkMaxConfig(CANConstants.ANGLE3, true)),
DRIVE4("Module 4 Drive Motor", new WsSparkMaxConfig(CANConstants.DRIVE4, true)),
ANGLE4("Module 4 Angle Motor", new WsSparkMaxConfig(CANConstants.ANGLE4, true)),
EVERYBOT1("Module 4 Angle Motor", new WsSparkMaxConfig(CANConstants.EVERYBOT1, true)),
EBOT2("Module 4 Angle Motor", new WsSparkMaxConfig(CANConstants.EBOT2, true)),
Copy link
Member

Choose a reason for hiding this comment

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

Assuming you missed adding this file

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