generated from StuyPulse/Phil
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
21a9858
commit 77944c2
Showing
2 changed files
with
62 additions
and
7 deletions.
There are no files selected for viewing
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
46 changes: 46 additions & 0 deletions
46
src/main/java/com/stuypulse/robot/subsystems/AbstractSysID.java
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 |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/************************ PROJECT SYSID ************************/ | ||
/* Copyright (c) 2024 StuyPulse Robotics. All rights reserved. */ | ||
/* Use of this source code is governed by an MIT-style license */ | ||
/* that can be found in the repository LICENSE file. */ | ||
/***************************************************************/ | ||
|
||
package com.stuypulse.robot.subsystems; | ||
|
||
import static com.stuypulse.robot.constants.Settings.Routine.*; | ||
|
||
import com.stuypulse.robot.subsystems.swerve.SwerveDriveSysID; | ||
import com.stuypulse.robot.subsystems.swerve.SwerveTurnSysID; | ||
|
||
import edu.wpi.first.wpilibj2.command.Command; | ||
import edu.wpi.first.wpilibj2.command.SubsystemBase; | ||
|
||
public abstract class AbstractSysID extends SubsystemBase { | ||
|
||
public static final AbstractSysID instance; | ||
|
||
static { | ||
switch (ROUTINE) { | ||
case SWERVE_DRIVE: | ||
instance = new SwerveDriveSysID(); | ||
break; | ||
case SWERVE_TURN: | ||
instance = new SwerveTurnSysID(); | ||
break; | ||
default: | ||
instance = null; | ||
break; | ||
} | ||
} | ||
|
||
public static AbstractSysID getInstance() { | ||
return instance; | ||
} | ||
|
||
public abstract Command quasistaticForward(); | ||
|
||
public abstract Command quasistaticReverse(); | ||
|
||
public abstract Command dynamicForward(); | ||
|
||
public abstract Command dynamicReverse(); | ||
} |