-
Notifications
You must be signed in to change notification settings - Fork 1
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
base: master
Are you sure you want to change the base?
Conversation
src/main/java/frc/robot/Robot.java
Outdated
System.out.println("Initializing manipulation..."); | ||
manipulation = new Manipulation(0, 1, 7, 8); | ||
} else { | ||
System.out.println("Manipulation initialization disabled."); |
There was a problem hiding this comment.
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.
src/main/java/frc/robot/Robot.java
Outdated
@@ -38,6 +41,13 @@ public void robotInit() { | |||
driver = new LoggableController("Driver", 0); | |||
operator = new LoggableController("Operator", 1); | |||
|
|||
if (manipulationEnabled) { | |||
System.out.println("Initializing manipulation..."); |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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; | ||
|
||
/** |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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); | ||
} | ||
|
||
/** |
There was a problem hiding this comment.
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; | ||
} | ||
|
||
/** |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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); | ||
} | ||
/** |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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 Report
@@ 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
|
@@ -38,6 +41,13 @@ | |||
driver = new LoggableController("Driver", 0); | |||
operator = new LoggableController("Operator", 1); | |||
|
|||
if (manipulationEnabled) { | |||
System.out.println("Initializing manipulation..."); |
There was a problem hiding this comment.
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."); |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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.
Code Climate has analyzed commit 9a5c730 and detected 10 issues on this pull request. Here's the issue category breakdown:
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. |
Add code for manipulating game pieces