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

Add Manipulation #7

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
Open

Add Manipulation #7

wants to merge 16 commits into from

Conversation

NotMePipe
Copy link
Contributor

Add code for manipulating game pieces

@NotMePipe NotMePipe requested a review from sreeves750 January 22, 2022 01:33
System.out.println("Initializing manipulation...");
manipulation = new Manipulation(0, 1, 7, 8);
} else {
System.out.println("Manipulation initialization disabled.");
Copy link

Choose a reason for hiding this comment

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

Replace this use of System.out or System.err by a logger.

@@ -38,6 +41,13 @@ public void robotInit() {
driver = new LoggableController("Driver", 0);
operator = new LoggableController("Operator", 1);

if (manipulationEnabled) {
System.out.println("Initializing manipulation...");
Copy link

Choose a reason for hiding this comment

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

Replace this use of System.out or System.err by a logger.

Manipulation(int pneumaticsForwardChannel, int pneumaticsReverseChannel, int intakeWheelID, int indexLoadID) {
this.intakeWheel = new CANSparkMax(intakeWheelID, MotorType.kBrushless);
this.indexLoad = new CANSparkMax(indexLoadID, MotorType.kBrushless);
this.intakePneumatics = new DoubleSolenoid(PneumaticsModuleType.REVPH, pneumaticsForwardChannel, pneumaticsReverseChannel);
Copy link

Choose a reason for hiding this comment

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

Line is longer than 100 characters (found 131).

import edu.wpi.first.wpilibj.DoubleSolenoid.Value;

import com.revrobotics.CANSparkMax;
import com.revrobotics.CANSparkMaxLowLevel.MotorType;
Copy link

Choose a reason for hiding this comment

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

Wrong lexicographical order for 'com.revrobotics.CANSparkMaxLowLevel.MotorType' import. Should be before 'edu.wpi.first.wpilibj.PneumaticsModuleType'.

import com.revrobotics.CANSparkMax;
import com.revrobotics.CANSparkMaxLowLevel.MotorType;

import frc.robot.logging.Loggable;
Copy link

Choose a reason for hiding this comment

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

Extra separation in import group before 'frc.robot.logging.Loggable'

private double speed;
private boolean spinning;

/**
Copy link

Choose a reason for hiding this comment

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

First sentence of Javadoc is missing an ending period.

* @param indexLoadID The CAN id of the spark for the index loader
*
*/
Manipulation(int pneumaticsForwardChannel, int pneumaticsReverseChannel, int intakeWheelID, int indexLoadID) {
Copy link

Choose a reason for hiding this comment

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

Line is longer than 100 characters (found 114).

import edu.wpi.first.wpilibj.PneumaticsModuleType;
import edu.wpi.first.wpilibj.DoubleSolenoid.Value;

import com.revrobotics.CANSparkMax;
Copy link

Choose a reason for hiding this comment

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

Wrong lexicographical order for 'com.revrobotics.CANSparkMax' import. Should be before 'edu.wpi.first.wpilibj.PneumaticsModuleType'.

.setInverted(true);
}

/**
Copy link

Choose a reason for hiding this comment

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

First sentence of Javadoc is missing an ending period.

this.spinning = spin;
}

/**
Copy link

Choose a reason for hiding this comment

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

First sentence of Javadoc is missing an ending period.


import edu.wpi.first.wpilibj.DoubleSolenoid;
import edu.wpi.first.wpilibj.PneumaticsModuleType;
import edu.wpi.first.wpilibj.DoubleSolenoid.Value;
Copy link

Choose a reason for hiding this comment

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

Wrong lexicographical order for 'edu.wpi.first.wpilibj.DoubleSolenoid.Value' import. Should be before 'edu.wpi.first.wpilibj.PneumaticsModuleType'.

import edu.wpi.first.wpilibj.PneumaticsModuleType;
import edu.wpi.first.wpilibj.DoubleSolenoid.Value;

import com.revrobotics.CANSparkMax;
Copy link

Choose a reason for hiding this comment

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

Extra separation in import group before 'com.revrobotics.CANSparkMax'

public void setIntakeExtend(boolean extend) {
intakePneumatics.set(extend ? Value.kForward : Value.kReverse);
}
/**
Copy link

Choose a reason for hiding this comment

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

First sentence of Javadoc is missing an ending period.

* @param load True if it should load; false if not
*
*/
public void setIndexLoad(boolean load) {
Copy link

Choose a reason for hiding this comment

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

'METHOD_DEF' should be separated from previous statement.

* @param load True if it should load; false if not
*
*/
public void setIndexLoad(boolean load) {
Copy link

Choose a reason for hiding this comment

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

'METHOD_DEF' should be separated from previous line.

@codecov-commenter
Copy link

codecov-commenter commented Jan 29, 2022

Codecov Report

Merging #7 (9a5c730) into master (cee37a9) will decrease coverage by 1.41%.
The diff coverage is 0.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master       #7      +/-   ##
============================================
- Coverage     17.78%   16.37%   -1.42%     
  Complexity       17       17              
============================================
  Files            13       14       +1     
  Lines           371      403      +32     
  Branches         25       29       +4     
============================================
  Hits             66       66              
- Misses          305      337      +32     
Impacted Files Coverage Δ
src/main/java/frc/robot/Manipulation.java 0.00% <0.00%> (ø)
src/main/java/frc/robot/Robot.java 0.00% <0.00%> (ø)

Impacted file tree graph

@@ -38,6 +41,13 @@
driver = new LoggableController("Driver", 0);
operator = new LoggableController("Operator", 1);

if (manipulationEnabled) {
System.out.println("Initializing manipulation...");
Copy link

Choose a reason for hiding this comment

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

Replace this use of System.out or System.err by a logger.

System.out.println("Initializing manipulation...");
manipulation = new Manipulation(0, 1, 7, 8);
} else {
System.out.println("Manipulation initialization disabled.");
Copy link

Choose a reason for hiding this comment

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

Replace this use of System.out or System.err by a logger.

import com.revrobotics.CANSparkMax;
import com.revrobotics.CANSparkMaxLowLevel.MotorType;

import frc.robot.logging.Loggable;
Copy link

Choose a reason for hiding this comment

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

Import statement for 'frc.robot.logging.Loggable' is in the wrong order. Should be in the 'THIRD_PARTY_PACKAGE' group, expecting not assigned imports on this line.

import com.revrobotics.CANSparkMaxLowLevel.MotorType;

import frc.robot.logging.Loggable;
import frc.robot.logging.Logger;
Copy link

Choose a reason for hiding this comment

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

Import statement for 'frc.robot.logging.Logger' is in the wrong order. Should be in the 'THIRD_PARTY_PACKAGE' group, expecting not assigned imports on this line.

@codeclimate
Copy link

codeclimate bot commented Feb 18, 2022

Code Climate has analyzed commit 9a5c730 and detected 10 issues on this pull request.

Here's the issue category breakdown:

Category Count
Complexity 2
Style 8

The test coverage on the diff in this pull request is 0.0% (50% is the threshold).

This pull request will bring the total coverage in the repository to 16.3% (-1.3% change).

View more on Code Climate.

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.

5 participants