Skip to content

Commit

Permalink
New gpd branch
Browse files Browse the repository at this point in the history
  • Loading branch information
rh3as committed Jan 25, 2025
1 parent d5b7f8e commit 3087cec
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/y2025/cpp/commands/teleop/drive_command.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ void DriveCommand::Periodic() {

frc846::robot::swerve::DrivetrainOLControlTarget target{};

bool targeting_algae = container_.control_input_.GetReadings().targeting_algae;

if (targeting_algae) // add and a note is detected
{

}
container_.drivetrain_.SetTarget({target});

double translate_x = frc846::math::HorizontalDeadband(
Expand Down
5 changes: 5 additions & 0 deletions src/y2025/cpp/subsystems/hardware/DrivetrainConstructor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ DrivetrainConstructor::DrivetrainConstructor()

RegisterPreference("drive_motor_voltage_compensation", 16_V);
RegisterPreference("steer_motor_voltage_compensation", 12_V);

RegisterPreference("gpd/kF", 12_V);
RegisterPreference("gpd/kP", 12_V);
RegisterPreference("gpd/kD", 12_V);

}

frc846::robot::swerve::DrivetrainConfigs
Expand Down
1 change: 1 addition & 0 deletions src/y2025/include/subsystems/abstract/control_input.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ struct ControlInputReadings {
double rotation;

bool zero_bearing;
bool targeting_algae;
};

struct ControlInputTarget {
Expand Down

0 comments on commit 3087cec

Please sign in to comment.