dashboard + limit id
This commit is contained in:
		| @@ -16,9 +16,10 @@ public class Elevateur extends SubsystemBase { | ||||
|   /** Creates a new Elevateur. */ | ||||
|   public Elevateur() { | ||||
|     teb.addDouble("encodeur elevateur",this::position); | ||||
|     teb.addBoolean("limit elevateur", this::limit2); | ||||
|   } | ||||
|   final SparkMax  monte = new SparkMax(22, MotorType.kBrushless); | ||||
|   final DigitalInput limit2 = new DigitalInput(1); | ||||
|   final DigitalInput limit2 = new DigitalInput(0); | ||||
|    | ||||
|   public double position(){ | ||||
|     return monte.getEncoder().getPosition(); | ||||
|   | ||||
| @@ -10,19 +10,23 @@ import com.revrobotics.spark.SparkMax; | ||||
| import edu.wpi.first.networktables.GenericEntry; | ||||
| import edu.wpi.first.wpilibj.DigitalInput; | ||||
| import edu.wpi.first.wpilibj.shuffleboard.Shuffleboard; | ||||
| import edu.wpi.first.wpilibj.shuffleboard.ShuffleboardTab; | ||||
| import edu.wpi.first.wpilibj2.command.SubsystemBase; | ||||
|  | ||||
| public class Pince extends SubsystemBase { | ||||
|   /** Creates a new Pince. */ | ||||
|   public Pince() {} | ||||
|   ShuffleboardTab teb = Shuffleboard.getTab("teb"); | ||||
|   public Pince() { | ||||
|     teb.addBoolean("limit pince",this::position); | ||||
|     teb.addDouble("encodeur pince", this::encodeurpivot); | ||||
|   } | ||||
|   final SparkMax coral = new SparkMax(20, MotorType.kBrushless); | ||||
|   final SparkMax pivoti = new SparkMax(14, MotorType.kBrushless); | ||||
|   final SparkMax algue1 = new SparkMax(16, MotorType.kBrushless); | ||||
|   final SparkMax algue2 = new SparkMax(19, MotorType.kBrushless); | ||||
|   final DigitalInput limit6 = new DigitalInput(0); | ||||
|    GenericEntry teb = Shuffleboard.getTab("teb") | ||||
|   .add("pince encodeur",encodeurpivot()) | ||||
|   .getEntry(); | ||||
|   final DigitalInput limit6 = new DigitalInput(9); | ||||
|    | ||||
|   | ||||
|   public void aspirecoral(double vitesse){ | ||||
|     coral.set(vitesse); | ||||
|   } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user