-
Notifications
You must be signed in to change notification settings - Fork 1
Added the FX motor code for the hooks , not all of the code is set #1
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
base: main
Are you sure you want to change the base?
Conversation
|
@Alijah2424 - if you want to simulate the source ... ./gradlew build
./gradlew InstallAllTools
./gradlew simulateJava |
| FRONT_HOOKS_REVERSE_SPEED = 0.25, | ||
| FRONT_HOOKS_SPEED = 0.25, | ||
| REAR_HOOKS_REVERSE_SPEED = 0.25, | ||
| REAR_HOOKS_SPEED = 0.25; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made up some speeds for the hooks we would have test and adjust these.
|
|
||
| public static final int HOOK_LEFT_REAR_MOTOR = 15, | ||
| HOOK_RIGHT_REAR_MOTOR = 16, | ||
| HOOK_FRONT_MOTOR = 17; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made up some motor addresses for this , we would need to use the tuner to assign these. If it has nto been assigned already we would beable to see that when we connect the tuner.
| private final JoystickButton m_intakeButton = new JoystickButton(m_manipulatorStick, F310Controller.Button.kBumperRight.getValue()); | ||
|
|
||
| /** The container for the robot. Contains subsystems, OI devices, and commands. */ | ||
| public RobotContainer() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is where we add the controls for the hooks. @Alijah2424
|
|
||
| import com.ctre.phoenix.motorcontrol.can.WPI_TalonFX; | ||
|
|
||
| public class HookArm extends WPI_TalonFX { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I extended this to the new talo class in case we need to add extra which I doubt
| import edu.wpi.first.wpilibj.motorcontrol.MotorControllerGroup; | ||
| import edu.wpi.first.wpilibj2.command.SubsystemBase; | ||
|
|
||
| public class HookClimbingSubSystem extends SubsystemBase { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made the subsystem for the hooks here @Alijah2424
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We would have to add the stop , and run and any other functions , I made build and interface for the most common
| public void robotInit() { | ||
| // Instantiate our RobotContainer. This will perform all our button bindings, and put our | ||
| // autonomous chooser on the dashboard. | ||
| m_robotContainer = new RobotContainer(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is where the rooto container is started.
|
As a note, this isn't the right robot for the hooks. You're looking for FRC322Java2022, our 2022 robot code. |

Please keep this open until all the code is done . We still have to make the command class and integrate it with the joysticks.
@Alijah2424 You can set the addresses with the phoenix tuner and identify the address of the other devices
https://store.ctr-electronics.com/software/
You would need to connect through the roborio