Skip to content
This repository was archived by the owner on Jan 16, 2025. It is now read-only.

Commit e00a81f

Browse files
committed
Finished Intake Subsystem and got venderdrops working
1 parent f053396 commit e00a81f

File tree

2 files changed

+36
-23
lines changed

2 files changed

+36
-23
lines changed

src/main/java/frc/robot/subsystems/IntakeSubsystem.java

+20-8
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,35 @@
66

77
import com.revrobotics.CANSparkMax;
88
import com.revrobotics.CANSparkLowLevel.MotorType;
9+
import com.revrobotics.CANSparkBase.IdleMode;
910

1011
import edu.wpi.first.wpilibj2.command.SubsystemBase;
12+
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
1113

1214
public class IntakeSubsystem extends SubsystemBase {
1315
/** Creates a new IntakeSubsystem. */
14-
private final CANSparkMax topMotor;
15-
16+
private final CANSparkMax motorOne;
17+
private final CANSparkMax motorTwo;
1618
public IntakeSubsystem() {
17-
topMotor = new CANSparkMax(0, MotorType.kBrushless);
18-
19-
20-
19+
motorOne = new CANSparkMax(0, MotorType.kBrushless);
20+
motorTwo = new CANSparkMax(0, MotorType.kBrushless);
21+
}
22+
public void coast(){
23+
motorOne.setIdleMode(IdleMode.kCoast);
24+
motorTwo.setIdleMode(IdleMode.kCoast);
25+
}
26+
public void brake(){
27+
motorOne.setIdleMode(IdleMode.kBrake);
28+
motorTwo.setIdleMode(IdleMode.kBrake);
29+
}
30+
public void setSpeed(double speed){
31+
motorOne.set(speed);
32+
motorTwo.set(speed);
2133
}
22-
2334
@Override
2435
public void periodic() {
2536
// This method will be called once per scheduler run
26-
37+
SmartDashboard.putNumber("Intake Motor One Temperature", motorOne.getMotorTemperature());
38+
SmartDashboard.putNumber("Intake Motor Two Temperature", motorTwo.getMotorTemperature());
2739
}
2840
}

vendordeps/REVLib.json

+16-15
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,73 @@
11
{
22
"fileName": "REVLib.json",
33
"name": "REVLib",
4-
"version": "2022.1.1",
4+
"version": "2024.2.4",
5+
"frcYear": "2024",
56
"uuid": "3f48eb8c-50fe-43a6-9cb7-44c86353c4cb",
67
"mavenUrls": [
78
"https://maven.revrobotics.com/"
89
],
9-
"jsonUrl": "https://software-metadata.revrobotics.com/REVLib.json",
10+
"jsonUrl": "https://software-metadata.revrobotics.com/REVLib-2024.json",
1011
"javaDependencies": [
1112
{
1213
"groupId": "com.revrobotics.frc",
1314
"artifactId": "REVLib-java",
14-
"version": "2022.1.1"
15+
"version": "2024.2.4"
1516
}
1617
],
1718
"jniDependencies": [
1819
{
1920
"groupId": "com.revrobotics.frc",
2021
"artifactId": "REVLib-driver",
21-
"version": "2022.1.1",
22+
"version": "2024.2.4",
2223
"skipInvalidPlatforms": true,
2324
"isJar": false,
2425
"validPlatforms": [
2526
"windowsx86-64",
2627
"windowsx86",
27-
"linuxaarch64bionic",
28+
"linuxarm64",
2829
"linuxx86-64",
2930
"linuxathena",
30-
"linuxraspbian",
31-
"osxx86-64"
31+
"linuxarm32",
32+
"osxuniversal"
3233
]
3334
}
3435
],
3536
"cppDependencies": [
3637
{
3738
"groupId": "com.revrobotics.frc",
3839
"artifactId": "REVLib-cpp",
39-
"version": "2022.1.1",
40+
"version": "2024.2.4",
4041
"libName": "REVLib",
4142
"headerClassifier": "headers",
4243
"sharedLibrary": false,
4344
"skipInvalidPlatforms": true,
4445
"binaryPlatforms": [
4546
"windowsx86-64",
4647
"windowsx86",
47-
"linuxaarch64bionic",
48+
"linuxarm64",
4849
"linuxx86-64",
4950
"linuxathena",
50-
"linuxraspbian",
51-
"osxx86-64"
51+
"linuxarm32",
52+
"osxuniversal"
5253
]
5354
},
5455
{
5556
"groupId": "com.revrobotics.frc",
5657
"artifactId": "REVLib-driver",
57-
"version": "2022.1.1",
58+
"version": "2024.2.4",
5859
"libName": "REVLibDriver",
5960
"headerClassifier": "headers",
6061
"sharedLibrary": false,
6162
"skipInvalidPlatforms": true,
6263
"binaryPlatforms": [
6364
"windowsx86-64",
6465
"windowsx86",
65-
"linuxaarch64bionic",
66+
"linuxarm64",
6667
"linuxx86-64",
6768
"linuxathena",
68-
"linuxraspbian",
69-
"osxx86-64"
69+
"linuxarm32",
70+
"osxuniversal"
7071
]
7172
}
7273
]

0 commit comments

Comments
 (0)