Skip to content

Commit

Permalink
FINAL TOURNEY CHANGESgit add -A!
Browse files Browse the repository at this point in the history
  • Loading branch information
AntarcticaByToto authored and mray190 committed Aug 16, 2021
1 parent cbe822d commit c19eedb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 15 deletions.
15 changes: 2 additions & 13 deletions Competition/src/main/cpp/subsystems/Lift.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ void Lift::assessInputs() {
}

state.liftState = operatorController->GetBumper(frc::GenericHID::kLeftHand) ? LiftState::MANUAL : LiftState::DISABLED;
state.manual_input = std::abs(operatorController->GetY(frc::GenericHID::kRightHand)) < 0.1 ? 0 : -operatorController->GetY(frc::GenericHID::kRightHand);
state.manual_input = std::abs(operatorController->GetY(frc::GenericHID::kRightHand)) < 0.05 ? 0 : operatorController->GetY(frc::GenericHID::kRightHand);
}

void Lift::analyzeDashboard() {
Expand All @@ -64,18 +64,7 @@ void Lift::assignOutputs() {
leadMotor.Set(0);
brake_solenoid.Set(false);
} else {
if (state.manual_input > 0) {
if (state.liftState == LiftState::SAFE)
leadMotor.Set(LiftConstants::SAFE_SPEED);
else
leadMotor.Set(state.powerUp);
} else if (state.manual_input < 0) {
if (state.liftState == LiftState::SAFE)
leadMotor.Set(-LiftConstants::SAFE_SPEED);
else
leadMotor.Set(state.powerDown);
}else
leadMotor.Set(0);
leadMotor.Set(state.manual_input);
brake_solenoid.Set(true);
}
}
4 changes: 2 additions & 2 deletions Competition/src/main/include/Constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ namespace ShooterConstants {
// Deadband for the left joystick x axis
constexpr static double kDeadband = 0.05;

constexpr static double TURRET_SPEED_MULTIPLIER = 0.25;
constexpr static double TURRET_SPEED_MULTIPLIER = 0.5;

constexpr static int dpadUp = 0;
constexpr static int dpadRight = 90;
Expand Down Expand Up @@ -174,7 +174,7 @@ namespace LiftConstants {
constexpr static int BRAKE_PCM_CAN_ID = 2;

constexpr static double DEFAULT_UP_SPD = -0.33;
constexpr static double DEFAULT_DOWN_SPD = 0.9;
constexpr static double DEFAULT_DOWN_SPD = 1;

constexpr static double SAFE_SPEED = -0.1;
}
Expand Down

0 comments on commit c19eedb

Please sign in to comment.