Skip to content

Commit

Permalink
Added state machine code
Browse files Browse the repository at this point in the history
  • Loading branch information
lakelandspark committed Jan 12, 2024
1 parent b3ac83d commit e8d6008
Show file tree
Hide file tree
Showing 4 changed files with 404 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
package com.team4099.robot2023.config.constants

import com.fasterxml.jackson.annotation.JsonAutoDetect.Value
import edu.wpi.first.wpilibj.DoubleSolenoid
import org.team4099.lib.units.Fraction
import org.team4099.lib.units.Velocity
import org.team4099.lib.units.base.amps
import org.team4099.lib.units.derived.degrees
import org.team4099.lib.units.derived.volts
import org.team4099.lib.units.derived.*
import org.team4099.lib.units.perSecond

object IntakeConstants {
val VOLTAGE_COMPENSATION = 12.0.volts
Expand All @@ -22,8 +26,34 @@ object IntakeConstants {
// TODO: Enter values
const val ENABLE_ARM = 0.0
const val ENABLE_ROTATION = 0.0
val INTAKE_ANGLE = 0.0.degrees
val OUTTAKE_ANGLE = 0.0.degrees
val STOWED_UP_ANGLE = 0.0.degrees
val STOWED_DOWN_ANGLE = 0.0.degrees
val INTAKE_VOLTAGE = 0.0.volts
val OUTTAKE_VOLTAGE = 0.0.volts
val NEUTRAL_VOLTAGE = 0.0.volts

val ARM_MAX_ROTATION = 0.0.degrees
val ARM_MIN_ROTATION = 0.0.degrees

val MAX_ARM_VELOCITY = 0.0.radians.perSecond
val MAX_ARM_ACCELERATION = 0.0.radians.perSecond.perSecond

val ARM_TOLERANCE = 0.0.radians

object PID {
val NEO_KP = 1.0.volts.perRadian
val NEO_KI = 1.0.volts.perRadianSeconds
val NEO_KD = 1.0.volts.perRadianPerSecond

val SIM_KP = 1.0.volts.perRadian
val SIM_KI = 1.0.volts.perRadianSeconds
val SIM_KD = 1.0.volts.perRadianPerSecond

val ARM_KS = 1.0.volts
val ARM_KG = 1.0.volts
val ARM_KV = 1.0.volts / 1.0.radians.perSecond
val ARM_KA = 1.0.volts / 1.0.radians.perSecond.perSecond
}
}
Loading

0 comments on commit e8d6008

Please sign in to comment.