Skip to content

Commit

Permalink
Add blank climb motor
Browse files Browse the repository at this point in the history
  • Loading branch information
Ethanol5455 committed Feb 23, 2024
1 parent 0cdb54b commit f2d8702
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ pros::Motor_Group catapult_group(CATAPULT_DRIVE_PORTS);

pros::Motor catapult_block(CATAPULT_STOPPER_PORT);

pros::Motor climb_motor(CLIMB_MOTOR_PORT);

enum class CatapultDeployStatus {
NotDeploying,
RemoveBlock,
Expand Down Expand Up @@ -137,6 +139,10 @@ void initCommon()
pros::motor_encoder_units_e::E_MOTOR_ENCODER_DEGREES);
catapult_block.set_brake_mode(pros::E_MOTOR_BRAKE_HOLD);

climb_motor.set_gearing(pros::motor_gearset_e_t::E_MOTOR_GEAR_GREEN);
climb_motor.set_encoder_units(
pros::motor_encoder_units_e::E_MOTOR_ENCODER_DEGREES);

intake_extension_group.move(-50);
pros::delay(1000);
intake_extension_group.tare_position();
Expand Down Expand Up @@ -684,8 +690,7 @@ void opcontrol()
catapult_block.brake();
}

bool do_deploy_catapult =
ctrl.get_digital(DIGITAL_DOWN);
bool do_deploy_catapult = ctrl.get_digital(DIGITAL_UP);
if (do_deploy_catapult) {
if (catapult_button_timer_running == false) {
catapult_button_timer->Restart();
Expand All @@ -700,6 +705,11 @@ void opcontrol()
}
}

bool do_deploy_climb = (bool)ctrl.get_digital(DIGITAL_DOWN) &&
(bool)ctrl.get_digital(DIGITAL_B);
if (do_deploy_climb) {
}

pros::delay(5);
}
}
2 changes: 2 additions & 0 deletions src/ports.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@

#define CATAPULT_DRIVE_PORTS { -5 , 6 }
#define CATAPULT_STOPPER_PORT -13

#define CLIMB_MOTOR_PORT 14

0 comments on commit f2d8702

Please sign in to comment.