001/************************* PROJECT RON *************************/ 002/* Copyright (c) 2026 StuyPulse Robotics. All rights reserved. */ 003/* Use of this source code is governed by an MIT-style license */ 004/* that can be found in the repository LICENSE file. */ 005/***************************************************************/ 006package com.stuypulse.robot.constants; 007 008import static edu.wpi.first.units.Units.Amps; 009 010import com.pathplanner.lib.config.PIDConstants; 011 012import dev.doglog.DogLog; 013import edu.wpi.first.networktables.DoubleSubscriber; 014import edu.wpi.first.units.measure.Current; 015 016public class Gains { 017 018 public interface Shooter { 019 020 DoubleSubscriber kP = DogLog.tunable("Shooter/kP", 15.0); 021 022 DoubleSubscriber kI = DogLog.tunable("Shooter/kI", 0.0); 023 024 DoubleSubscriber kD = DogLog.tunable("Shooter/kD", 0.0); 025 026 DoubleSubscriber kS = DogLog.tunable("Shooter/kS", 2.5); 027 028 DoubleSubscriber kV = DogLog.tunable("Shooter/kV", 0.05); 029 030 DoubleSubscriber kA = DogLog.tunable("Shooter/kA", 0.0); 031 032 public interface FirstShot { 033 double kP = 20; 034 double kI = 0; 035 double kD = 0; 036 } 037 } 038 039 public interface Intake { 040 041 // pivot gains 042 double kP = 300;//300 043 044 double kI = 0; 045 046 double kD = 75; 047 048 Current kS = Amps.of(0); 049 050 Current kV = Amps.of(0); 051 052 Current kA = Amps.of(0); 053 054 Current kG = Amps.of(-12); 055 056 public interface Digestion { 057 058 double kP = 325; 059 060 double kI = 0; 061 062 // TODO: tune 063 double kD = 75; 064 } 065 } 066 067 public interface Swerve { 068 069 public interface Drive { 070 071 double kS = 0.0; 072 073 double kV = 0.124; 074 075 double kA = 0.0; 076 077 double kP = 0.1; 078 079 double kI = 0.0; 080 081 double kD = 0.0; 082 } 083 084 public interface Turn { 085 086 double kS = 0.1; 087 088 double kV = 2.66; 089 090 double kA = 0.0; 091 092 double kP = 100.0; 093 094 double kI = 0.0; 095 096 double kD = 0.5; 097 } 098 099 public interface Alignment { 100 double akP = 8.8624; 101 102 double akI = 0.0; 103 104 double akD = 0.0; 105 106 PIDConstants XY = new PIDConstants(10, 0.0, 0.0); 107 108 PIDConstants THETA = new PIDConstants(10, 0.0, 0.0); 109 } 110 } 111}