Skip to content

Commit

Permalink
Added inversion to indexer.
Browse files Browse the repository at this point in the history
  • Loading branch information
NottheIRS committed Feb 19, 2024
1 parent d2b7dda commit e4fa02d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
9 changes: 8 additions & 1 deletion src/main/cpp/subsystems/LauncherHAL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,14 @@ void LauncherHAL::SetFlywheelSpeed(double speed)

void LauncherHAL::SetIndexerSpeed(double speed)
{
m_indexerSpeed = speed;
if (INVERT_INDEXER)
{
m_indexerSpeed = -speed;
}
else
{
m_indexerSpeed = speed;
}

m_IndMotor.Set(m_indexerSpeed);
}
Expand Down
6 changes: 4 additions & 2 deletions src/main/include/subsystems/SubSystemConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const double LFT_PVT_ABS_ENC_CONVERSION_FACTOR = 360.0;
const bool LFT_PVT_MTR_INVERTED = true;

// ###########################################################
// # Flywheel #
// # LAUNCHER #
// ###########################################################
const int FLYWHEEL_TOP_ID = 22;
const int FLYWHEEL_BOTTOM_ID = 23;
Expand All @@ -67,4 +67,6 @@ const double LAUNCHER_PVT_ABS_ENC_CONVERSION_FACTOR = 80.0;
const double ZERO_OFFSET = 36.221;

const double MAX_PIVOT_ANGLE = 75.0;
const double MIN_PIVOT_ANGLE = 5.0;
const double MIN_PIVOT_ANGLE = 5.0;

const bool INVERT_INDEXER = false;

0 comments on commit e4fa02d

Please sign in to comment.