Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
added button usage to armclaw
Browse files Browse the repository at this point in the history
  • Loading branch information
michaell4438 committed Jan 18, 2024
1 parent deda837 commit 74f95ee
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
package org.firstinspires.ftc.teamcode.features

import org.firstinspires.ftc.teamcode.internals.documentation.ButtonName
import org.firstinspires.ftc.teamcode.internals.documentation.ButtonUsage
import org.firstinspires.ftc.teamcode.internals.documentation.ControllerName
import org.firstinspires.ftc.teamcode.internals.documentation.ReferableButtonUsage
import org.firstinspires.ftc.teamcode.internals.features.Buildable
import org.firstinspires.ftc.teamcode.internals.features.Feature
import org.firstinspires.ftc.teamcode.internals.hardware.Devices
Expand All @@ -24,6 +28,22 @@ import kotlin.math.min
*
* The OPTIONS/START button disables auto claw rotation and the auto lift
*/
@ButtonUsage(button = ButtonName.Y, description = "Rotate claw to pickup position", controller = ControllerName.CONTROLLER_2)
@ButtonUsage(button = ButtonName.LEFT_STICK_BUTTON, description = "Rotate claw to flat position", controller = ControllerName.CONTROLLER_2)
@ButtonUsage(button = ButtonName.RIGHT_STICK_BUTTON, description = "Rotate claw to scoring position", controller = ControllerName.CONTROLLER_2)
@ButtonUsage(button = ButtonName.DPAD_LEFT, description = "Toggle left grabber", controller = ControllerName.CONTROLLER_2)
@ButtonUsage(button = ButtonName.DPAD_RIGHT, description = "Toggle right grabber", controller = ControllerName.CONTROLLER_2)
@ButtonUsage(button = ButtonName.DPAD_UP, description = "Reverse intake (hold)", controller = ControllerName.CONTROLLER_2)
@ButtonUsage(button = ButtonName.DPAD_DOWN, description = "Toggle intake", controller = ControllerName.CONTROLLER_2)
@ButtonUsage(button = ButtonName.LEFT_BUMPER, description = "Pixel selector to left", controller = ControllerName.CONTROLLER_2)
@ButtonUsage(button = ButtonName.RIGHT_BUMPER, description = "Pixel selector to right", controller = ControllerName.CONTROLLER_2)
@ButtonUsage(button = ButtonName.X, description = "Pixel holder up", controller = ControllerName.CONTROLLER_2)
@ButtonUsage(button = ButtonName.B, description = "Pixel holder down", controller = ControllerName.CONTROLLER_2)
@ButtonUsage(button = ButtonName.LEFT_TRIGGER, description = "Lower arm", controller = ControllerName.CONTROLLER_2)
@ButtonUsage(button = ButtonName.RIGHT_TRIGGER, description = "Raise arm", controller = ControllerName.CONTROLLER_2)
@ButtonUsage(button = ButtonName.BACK, description = "Emergency stop autonomous features", controller = ControllerName.CONTROLLER_2)
@ButtonUsage(button = ButtonName.RIGHT_STICK_BUTTON, description = "Windshield wiper :)", controller = ControllerName.CONTROLLER_1)
@ReferableButtonUsage(referableAs = "ArmClaw")
class ArmClaw : Feature(), Buildable {
private var counter = 0.0
private var dpadPressed = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@
import org.firstinspires.ftc.teamcode.features.*;
import org.firstinspires.ftc.teamcode.features.ArmClaw;
import org.firstinspires.ftc.teamcode.internals.documentation.ReferToButtonUsage;
import org.firstinspires.ftc.teamcode.internals.documentation.ReferableButtonUsage;
import org.firstinspires.ftc.teamcode.internals.misc.DrivetrainMapMode;
import org.firstinspires.ftc.teamcode.internals.registration.OperationMode;
import org.firstinspires.ftc.teamcode.internals.registration.TeleOperation;

@ReferToButtonUsage(referTo = "AirplaneLauncher")
@ReferToButtonUsage(referTo = "ArmClaw")
public class LasagnaBot extends OperationMode implements TeleOperation {
@Override
public void construct() {
Expand Down

0 comments on commit 74f95ee

Please sign in to comment.