Skip to content

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.");

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.

operator = new LoggableController("Operator", 1);

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

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);

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;

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;

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;

/**

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) {

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;

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);
}

/**

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;
}

/**

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;

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;

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);
}
/**

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) {

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) {

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

operator = new LoggableController("Operator", 1);

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

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.");

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;

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;

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.

@qlty-cloud-legacy
Copy link

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.

6 participants