Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Active brake uses PID class and doesn't reset drive sensors #220

Merged
merged 3 commits into from
Dec 12, 2024

Conversation

ssejrog
Copy link
Member

@ssejrog ssejrog commented Dec 12, 2024

Summary:

Active brake now uses pid class and doesn't reset drive sensors.

Motivation:

This will help debugging in opcontrol because drive sensors won't get reset constantly

References (optional):

Test Plan:

  • ensure active brake works like normal
  • ensure active brake works when enabling and disabling active brake

Download the template for this pull request:

Note

This is auto generated from Add Template to Pull Request

curl -o [email protected]+869d66.zip https://nightly.link/EZ-Robotics/EZ-Template/actions/artifacts/2309515890.zip;
pros c fetch [email protected]+869d66.zip;
pros c apply [email protected]+869d66;
rm [email protected]+869d66.zip;

@ssejrog ssejrog self-assigned this Dec 12, 2024
@ssejrog
Copy link
Member Author

ssejrog commented Dec 12, 2024

Confirmed code works by running this in opcontrol, and flipping between auton and driver while active brake is enabled.

    if (master.get_digital_new_press(DIGITAL_L1)) {
      if (chassis.opcontrol_drive_activebrake_get() == 0.0)
        chassis.opcontrol_drive_activebrake_set(3.0);
      else
        chassis.opcontrol_drive_activebrake_set(0.0);
    }

    if (master.get_digital_new_press(DIGITAL_R1)) {
      chassis.drive_sensor_reset();
    }

@ssejrog ssejrog merged commit c404176 into dev Dec 12, 2024
2 checks passed
@ssejrog ssejrog deleted the feature/activebrake-full-pid branch December 18, 2024 00:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant