mirror of
https://github.com/BroncBotz3481/YAGSL
synced 2026-06-19 06:21:40 +00:00
Added configurable heading correction deadband
This commit is contained in:
@@ -74,7 +74,7 @@ public class SwerveDrive
|
||||
/**
|
||||
* Deadband for speeds in heading correction.
|
||||
*/
|
||||
private final double HEADING_CORRECTION_DEADBAND = 0.01;
|
||||
private double HEADING_CORRECTION_DEADBAND = 0.01;
|
||||
/**
|
||||
* Field object.
|
||||
*/
|
||||
@@ -314,8 +314,20 @@ public class SwerveDrive
|
||||
* @param state {@link SwerveDrive#headingCorrection} state.
|
||||
*/
|
||||
public void setHeadingCorrection(boolean state)
|
||||
{
|
||||
setHeadingCorrection(state, HEADING_CORRECTION_DEADBAND);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the heading correction capabilities of YAGSL.
|
||||
*
|
||||
* @param state {@link SwerveDrive#headingCorrection} state.
|
||||
* @param deadband {@link SwerveDrive#HEADING_CORRECTION_DEADBAND} deadband.
|
||||
*/
|
||||
public void setHeadingCorrection(boolean state, double deadband)
|
||||
{
|
||||
headingCorrection = state;
|
||||
HEADING_CORRECTION_DEADBAND = deadband;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user