Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
ShriyanReyya27 committed Feb 1, 2024
1 parent d48876e commit 95bb6c6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 31 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package frc.team449.robot2024.subsystems.xhooter
package frc.team449.robot2024.subsystems.shooter

import edu.wpi.first.math.Nat
import edu.wpi.first.math.VecBuilder
Expand All @@ -21,8 +21,6 @@ import frc.team449.system.encoder.NEOEncoder
import frc.team449.system.motor.WrappedMotor
import frc.team449.system.motor.createSparkMax
import java.util.function.Supplier


open class Shooter(
private val rightMotor: WrappedMotor,
private val leftMotor: WrappedMotor,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,32 +1,26 @@
package frc.team449.robot2023.subsystems.elevator
package frc.team449.robot2024.subsystems.shooter

import edu.wpi.first.math.MathUtil
import edu.wpi.first.math.numbers.N1
import edu.wpi.first.math.system.LinearSystemLoop
import edu.wpi.first.math.system.plant.DCMotor
import edu.wpi.first.math.util.Units
import edu.wpi.first.util.sendable.SendableBuilder
import edu.wpi.first.wpilibj.simulation.FlywheelSim
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard
import frc.team449.robot2024.Robot
import frc.team449.robot2024.constants.MotorConstants
import frc.team449.robot2024.constants.RobotConstants
import frc.team449.robot2024.constants.subsystem.ShooterConstants
import frc.team449.robot2024.subsystems.xhooter.Shooter
import frc.team449.system.motor.WrappedMotor
import java.util.function.Supplier
import kotlin.math.cos
import kotlin.math.sin

class ElevatorSim(
class ShooterSim(
private val rightMotor: WrappedMotor,
private val leftMotor: WrappedMotor,
private val rightLoop: LinearSystemLoop<N1, N1, N1>,
private val leftLoop: LinearSystemLoop<N1, N1, N1>,
private val robot: Robot
rightLoop: LinearSystemLoop<N1, N1, N1>,
leftLoop: LinearSystemLoop<N1, N1, N1>,
robot: Robot
) : Shooter(rightMotor, leftMotor, rightLoop, leftLoop, robot) {


// State is (left velocity, right velocity)
private var currentState = Pair(
leftMotor.velocity * ShooterConstants.UPR * ShooterConstants.GEARING,
Expand Down Expand Up @@ -85,7 +79,7 @@ class ElevatorSim(
builder.addDoubleProperty("4.1 Simulated current Draw", { currentDraw }, {})

builder.publishConstString("5.0", "Velocity")
builder.addDoubleProperty("5.1 Left Motor Vel", {currentState.first}, {})
builder.addDoubleProperty("5.2 Right Motor Vel", {currentState.second}, {})
builder.addDoubleProperty("5.1 Left Motor Vel", { currentState.first }, {})
builder.addDoubleProperty("5.2 Right Motor Vel", { currentState.second }, {})
}
}
}

0 comments on commit 95bb6c6

Please sign in to comment.