Skip to content

Commit

Permalink
Merge branch 'main' into dev-intake
Browse files Browse the repository at this point in the history
  • Loading branch information
Floofyer authored Jan 24, 2024
2 parents c49bde5 + 17f7cb4 commit 0e2761a
Showing 1 changed file with 6 additions and 39 deletions.
45 changes: 6 additions & 39 deletions Intake.java
Original file line number Diff line number Diff line change
@@ -1,44 +1,11 @@
/* (C) Robolancers 2024 */
package org.robolancers321.subsystem;
package org.robolancers321.subsystems;

import com.revrobotics.CANSparkLowLevel.MotorType;
import com.revrobotics.CANSparkMax;
import com.revrobotics.SparkPIDController;
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
import edu.wpi.first.wpilibj2.command.Command;
import edu.wpi.first.wpilibj2.command.SubsystemBase;
public class Intake extends SubsystemBase{

public class Intake extends SubsystemBase {
public CANSparkMax intakeMotor;


public CANSparkMax intakemotor;
SparkPIDController IntakePIDController;
public Intake () {

public int kport = 0;
public double power = 0;
public double kFF = 0;

public void intake() {

this.intakemotor = new CANSparkMax(kport, MotorType.kBrushless);
this.intakemotor.setSmartCurrentLimit(20);
SmartDashboard.putNumber("intake-kFF", kFF);
}

@Override
public void periodic() {

intakemotor.set(power);
double kFF = SmartDashboard.getNumber("kFF", 0);
IntakePIDController.setFF(kFF);
}

public Command on(double power) {

return runOnce(() -> intakemotor.set(power));
}

public Command off(double power) {

return runOnce(() -> intakemotor.set(0));
}
this.intakeMotor = new intakeMotor(0, brushless)
}

0 comments on commit 0e2761a

Please sign in to comment.