-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removed flywheel and added PID constants
- Loading branch information
lakelandspark
committed
Jan 19, 2024
1 parent
d5e1c2a
commit 355f9bd
Showing
4 changed files
with
85 additions
and
67 deletions.
There are no files selected for viewing
27 changes: 19 additions & 8 deletions
27
src/main/kotlin/com/team4099/robot2023/config/constants/FeederConstants.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,28 @@ | ||
package com.team4099.robot2023.config.constants | ||
|
||
import org.team4099.lib.units.Velocity | ||
import org.team4099.lib.units.base.amps | ||
import org.team4099.lib.units.base.seconds | ||
import org.team4099.lib.units.derived.volts | ||
import org.team4099.lib.units.derived.rotations | ||
import org.team4099.lib.units.derived.perRotation | ||
import org.team4099.lib.units.derived.ProportionalGain | ||
import org.team4099.lib.units.derived.IntegralGain | ||
import org.team4099.lib.units.derived.DerivativeGain | ||
import org.team4099.lib.units.derived.Radian | ||
import org.team4099.lib.units.derived.Volt | ||
import org.team4099.lib.units.perMinute | ||
import org.team4099.lib.units.perSecond | ||
|
||
object FeederConstants { | ||
val FLYWHEEL_VOLTAGE_COMPENSATION = 0.0.volts | ||
val FLYWHEEL_STATOR_CURRENT_LIMIT = 0.0.amps | ||
|
||
val FEEDER_VOLTAGE_COMPENSATION = 0.0.volts | ||
val FEEDER_STATOR_CURRENT_LIMIT = 0.0.amps | ||
|
||
val FLYWHEEL_INIT_VOLTAGE = 0.0.volts | ||
val FEEDER_INIT_VOLTAGE = 0.0.volts | ||
|
||
val FLYWHEEL_SHOOTING_VOLTAGE = 0.0.volts | ||
// TODO: Tune PID variables | ||
val FEEDER_KS = 0.001.volts | ||
val FEEDER_KV = 0.01.volts.perRotation.perMinute | ||
val FEEDER_KA = 0.01.volts.perRotation.perMinute.perSecond | ||
|
||
val FEEDER_KP: ProportionalGain<Velocity<Radian>, Volt> = 0.001.volts / 1.0.rotations.perMinute | ||
val FEEDER_KI: IntegralGain<Velocity<Radian>, Volt> = 0.0.volts / (1.0.rotations.perMinute * 1.0.seconds) | ||
val FEEDER_KD: DerivativeGain<Velocity<Radian>, Volt> = 0.0.volts / (1.0.rotations.perMinute / 1.0.seconds) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters