Skip to content

Add hood conversion helpers for pulse-width to motor-rotation migration#1

Draft
LTeixeira4909 wants to merge 1 commit into
Minuteman_Eventfrom
codex/calculate-new-motor-rotations-for-hood
Draft

Add hood conversion helpers for pulse-width to motor-rotation migration#1
LTeixeira4909 wants to merge 1 commit into
Minuteman_Eventfrom
codex/calculate-new-motor-rotations-for-hood

Conversation

@LTeixeira4909

Copy link
Copy Markdown
Contributor

Motivation

  • Provide a small, reusable conversion helper to migrate legacy hood setpoints (1000–2000 µs used for a 50 mm actuator) to equivalent motor rotations for a rack-and-pinion motor-driven hood so existing shot positions remain the same.

Description

  • Add frc.robot.subsystems.hood.HoodConversions with constants for the legacy pulse range and stroke and with three helpers: pulseWidthToTravelMillimeters, travelMillimetersToMotorRotations, and pulseWidthToMotorRotations (uses pinion pitch diameter and motor:pinion ratio).

Testing

  • Ran ./gradlew test -q in this environment but the build failed during Gradle script analysis with Unsupported class file major version 69 (Java/Gradle toolchain mismatch), so no automated tests were executed.

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

1 participant