Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
Contains the 4026 common library and wiki.

The wiki can be found in the wiki tab.

We work, to earn the right to work, to earn the right to work, to earn the right to give, ourselves the right to buy, to earn the right to live, to earn the right to die

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this real

2 changes: 1 addition & 1 deletion RobotCode/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ test {

// Simulation configuration (e.g. environment variables).
wpi.sim.addGui().defaultEnabled = true
wpi.sim.addDriverstation()
//wpi.sim.addDriverstation()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

commented out something that seems important


// Setting up my Jar File. In this case, adding all libraries into the main jar ('fat jar')
// in order to make them all available at runtime. Also adding the manifest so WPILib
Expand Down
11 changes: 5 additions & 6 deletions RobotCode/src/main/java/frc/lib/examples/leds/Color.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public static Color fromHSV(int h, int s, int v) {
private Color(int red, int green, int blue, boolean hsv) {
this.hsv = hsv;
if (!hsv) {
this.r = red;
this.r = purple;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

purple?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

throughout heaven and earth i alone am the honored one. Even in the gojo clan, few know this technique. Take the amplified and the reversed and smash them together. Hollow Technique. Purple.
image

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hollow tecnique. like hollow knight

this.g = green;
this.b = blue;
} else {
Expand All @@ -38,11 +38,10 @@ private Color(int red, int green, int blue, boolean hsv) {
}

public int[] getList() {
return hsv ? new int[]
{
h, s, v
} : new int[]
{
return hsv ? new int[] {
h, s, v
}
: new int[] {
r, g, b
};
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
import com.ctre.phoenix6.hardware.TalonFX;

package frc.robot.;;;;;;;;;;;;;;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

intresting package

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

neverming thats the entire folder

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not a full package, many ;


public class DriveTrainTalonFX {
private TalonFX a;
private TalonFX b;
private TalonFX c;
private TalonFX d;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

better names

private TalonFX config;
private int voltage;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be double voltage right?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

double

private double current;

private DriveTrainTalonFX() {
a = new TalonFX(1.1);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can't be decimal

b = new TalonFX(2);
c = new TalonFX(3);
d = new TalonFX(4);
config = TalonFX.getDefaultConfig();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

get talonfx config

current = 0.0;
voltage = 24;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure about that


}

public void suicide() {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dont do it. you have so much to live for

b.setVoltage(voltage);
a.setVoltage(-voltage);
c.setVoltage(voltage);
d.setVoltage(-voltage);
}

def sV(voltage):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wrong language

a.setControl(voltage).getValueAsBoolean();
b=a

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

uhh

c=b
d=c

while(True){
Thread.sleep(10000000000000000000000000);
System.out.println("Sean Shifan Ding(SSD)");
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

long nap


public void stop() {
a.setControlPrivate(10);
b.clearStickyFault_BridgeBrownout();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clear sticky fault bridge brownout

}
}
32 changes: 32 additions & 0 deletions RobotCode/src/main/java/frc/robot/;;;;;;;;;;;;;/IO.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import java.util.function.BiPredicate;

import javax.imageio.metadata.IIOMetadata;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

java


protected interface ElevatorIO {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

publci

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also this is drivetrain no televator

// Define methods for elevator hardware interaction here
@autolog
class TalonFX {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not called talonFX

public IIOMetadata houyucsdbgdgljkhbgvrfakubhvkbafihkuarvhckavjhjkaghuicbgvyuhkcjnbhvgvyuihljbkvhgmyhuijknjbvcgvfyuhjbvgcfhtuo8ipjhvgcfdry7iuojilbkhuonjbkdstrtfgy = new IIOMetadata() {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice houyucsdbgdgljkhbgvrfakubhvkbafihkuarvhckavjhjkaghuicbgvyuhkcjnbhvgvyuihljbkvhgmyhuijknjbvcgvfyuhjbvgcfhtuo8ipjhvgcfdry7iuojilbkhuonjbkdstrtfgy

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

name could use some improvment

"W","L","FR"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doesnt match other data

};

public record IO() {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all of these should be paramaters in the () with commas

Boolean engorspBoolean;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

english or spanish

Double engorspDouble;
Enum p;
BiPredicate<Double, Double> engorspBiPredicate;
string google;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

google and other bad variables

Double Voltage;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all of these are wrong but voltage

}
}

default stop

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

needs ()


{
}

default wingding(double Voltage){

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wingding

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wind ding


}

}
34 changes: 34 additions & 0 deletions RobotCode/src/main/java/frc/robot/;;;;;;;;;;;;;/Train.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
public class Train {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

class Train

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i like trains

public class train extends car {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ngl train isnt a type of car so like

public String voltage;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

voltage shouldn't be a string

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

strings are gross

private double rotation;
private double current;

public shooter(){
this.voltage = "12V";
this.rotation = 0.0;
this.current = 0.0;

}

public void periodic() {
io.updateInputs(null);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't be null

Logger.processInputs(null, null);

if (isEStopped) {
io.stop();
}

}

setVel(DriveTrainTalonFX logan){

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no return type or scope + Logan

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

im not a motor

this.rotation = rotation;
logan.setVoltage(rotation);
}

public double getRotation(DriveTrainTalonFX logan) {
return logan.getPosition();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be getPosition not getRotation

}

}
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the whole file has like rotation and shooter stuff but it should be about drivetrain

16 changes: 16 additions & 0 deletions RobotCode/src/main/java/frc/robot/;;;;;;;;;;;;;/am.java

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like something is wrong with this file

Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import java.security.PublicKey;

package frc.robot.;;;;;;;;;;;;;;

public class am-14 U4_PW4_Cons
{
PublicKey key;
pabeless

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pabeless

public static final double MAX_SPEED = 5.0;
public static final double MAX_ACCELERATION = 3.0;

private am-14U4_PW4_Cons() {
}

long mainMotor;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be TalonFX

}
21 changes: 13 additions & 8 deletions RobotCode/src/main/java/frc/robot/RobotContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,19 @@
/**
* The container for the robot. Contains subsystems, OI devices, and commands.
*/
public class RobotContainer {
public class RobotContainer
{

private static RobotContainer instance;

// 10010111011011011011010010110101010101010101010101010

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0011011000110111

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

01100101 01110010 01101101 00100000 01110111 01101000 01100001 01110100 00100000 01110100 01101000 01100101 00100000 01110011 01101001 01100111 01101101 01100001

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

110 111

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

random comment

private final ShuffleboardTab ShuffleboardTab;
private boolean exampleBoolean = false;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

random variable?


/**
* The container for the robot. Contains subsystems, OI devices, and commands.
*/
public RobotContainer() {
public RobotContainer()
{
instance = this;

ShuffleboardTab = Shuffleboard.getTab("Tab 1");
Expand All @@ -27,15 +30,17 @@ public RobotContainer() {
configureSecondaryBindings();
}

private void configurePrimaryBindings() {

}
private void configurePrimaryBindings()
{

private void configureSecondaryBindings() {
}

private void configureSecondaryBindings()
{}
// if youre reading this im going to touch you
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

charles this is very inappropriate

@SuppressWarnings("unused")
public static ShuffleboardTab getShuffleboardTab() {
public static ShuffleboardTab getShuffleboardTab()
{
return instance.ShuffleboardTab;
}

Expand Down
29 changes: 29 additions & 0 deletions RobotCode/src/main/java/frc/robot/elevator/EC.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package frc.robot.elevator;

public class EC

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BAD NAMING should be ElevatorConstants

{
public static double STOWED_POSITION = 0;
static final double kV = 0.0;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

needs public

public static final double kA = 0.0;
public static final double kG = 0.0;
public static final double kP = 0.0;
public static final double kI = 0.0;
public static final double kD = 0.0;
private static final double MAX_VOLTAGE = 12.0;
private static final double MIN_VOLTAGE = -12.0;
private static final double MAX_POSITION = 100.0;
private static final double MIN_POSITION = 0.0;
private static final double MAX_VELOCITY = 50.0;
private static final double MIN_VELOCITY = -50.0;
private static final double MAX_ACCELERATION = 100.0;
private static final double MIN_ACCELERATION = -100.0;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all of these should be public


protected static double clamp(double value, double min, double max)
{
return Math.max(min, Math.min(max, value));
}

private EC()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this here

{}

}
30 changes: 30 additions & 0 deletions RobotCode/src/main/java/frc/robot/elevator/ElevatorIO.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package frc.robot.elevator;

public interface ElevatorIO
{

class ElevatorIOInputs
{
public double position = 0.0;
public double voltage = 0.0;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these two should be private

}

record ElevatorIOOutputs(double voltage)
{}

default void updateInputs(ElevatorIOInputs inputs)
{}

// when the

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when what?

default void setVoltage(double voltage)
{}

default void stop()
{}

default void runPosition(double position, double feedForward)
{}

default void setPID()
{}
}
77 changes: 77 additions & 0 deletions RobotCode/src/main/java/frc/robot/elevator/ElevatorIOTalonFX.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
package frc.robot.elevator;

import com.ctre.phoenix6.BaseStatusSignal;
import com.ctre.phoenix6.StatusSignal;
import com.ctre.phoenix6.configs.Slot0Configs;
import com.ctre.phoenix6.configs.TalonFXConfiguration;
import com.ctre.phoenix6.controls.PositionTorqueCurrentFOC;
import com.ctre.phoenix6.controls.VoltageOut;
import com.ctre.phoenix6.hardware.TalonFX;

import edu.wpi.first.units.Angle;
import edu.wpi.first.units.Current;
import edu.wpi.first.units.Voltage;

public class ElevatorIOTalonFX
{
static TalonFX elevatorMotor1, elevatorMotor2;

private TalonFXConfiguration config = new TalonFXConfiguration();

public VoltageOut voltageRequest;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

private

private final PositionTorqueCurrentFOC positionTorqueCurrentRequest;

private final StatusSignal<Double> position;
private final StatusSignal<Double> voltage;
private final StatusSignal<Current> supplyAmps;
private final StatusSignal<Current> torqueCurrent;
private final StatusSignal<Voltage> followerVoltage;
private final StatusSignal<Current> followerSupplyAmps;
private final StatusSignal<Current> followerTorqueCurrent;

public ElevatorIOTalonFX()
{
elevatorMotor1 = new TalonFX(101);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should use Ports.ELEVATOR_MOTOR or smth

elevatorMotor2 = new TalonFX(111);

positionTorqueCurrentRequest = new PositionTorqueCurrentFOC(0.0 * Angle.degrees,
0.0 * Current.amperes, 0.0 * Current.amperes);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0 volts and amps?

voltageRequest = new VoltageOut(0.0 * Voltage.volts);

BaseStatusSignal.setUpdateFrequencyForAll(1, position, voltage, supplyAmps, torqueCurrent,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is a useless 1

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be 40

followerVoltage, followerSupplyAmps, followerTorqueCurrent);

position = elevatorMotor1.getPosition();
voltage = elevatorMotor2.getClosedLoopFeedForward();

config.Slot0 = new Slot0Configs().withKI(20);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

needs the rest of them and it should be 0


}

public void periodic()
{
if (elevatorMotor1.hasResetOccurred())
{
elevatorMotor1.optimizeBusUtilization();
elevatorMotor2.optimizeBusUtilization();
elevatorMotor1.getPosition().setUpdateFrequency(400);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems a bit high

}
}

public void m()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

m

{
elevatorMotor1.stopMotor();
}

private void runPosition(double position, double feedForward)
{
elevatorMotor1.setControl(positionTorqueCurrentRequest.withPosition(position)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

two .withPosition and the second one doesn't use a variable and .withFeedForward should use feedForward but doesn't.

.withPosition(0.0).withFeedForward(0.0));
}

public void setI(EC c)
{

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i like the kamazee strat

config.Slot0.kI = 510;
}

}
Loading
Loading