Merge branch 'main' of http://192.168.162.99:3000/carter/VEX-OverRide
This commit is contained in:
commit
ecebf87643
2 files changed
+10
-6
No files matched your search
@@ -108,7 +108,7 @@ void LiftMech::reset_state() {
|
|||||||
void LiftMech::lift_control() {
|
void LiftMech::lift_control() {
|
||||||
liftError = liftTarget - liftRotation.get_position();
|
liftError = liftTarget - liftRotation.get_position();
|
||||||
liftVelocity = get_lift_kp() * liftError;
|
liftVelocity = get_lift_kp() * liftError;
|
||||||
lift.move(liftVelocity);
|
lift.move(-liftVelocity);
|
||||||
}
|
}
|
||||||
|
|
||||||
void LiftMech::set_lift_kp(float _liftKp) {
|
void LiftMech::set_lift_kp(float _liftKp) {
|
||||||
|
|||||||
+9
-5
@@ -41,7 +41,11 @@ namespace ez {
|
|||||||
// Lift constructor
|
// Lift constructor
|
||||||
LiftMech liftObj(
|
LiftMech liftObj(
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
{0, 0, 0, 0}, 4);
|
{0, 0, 0, 0}, 4);
|
||||||
|
=======
|
||||||
|
{0, -19714, -13017, -27993, -17491, -48393, -37459, -69706, -58957, -89693, -79453, -106664, -99115}, 13);
|
||||||
|
>>>>>>> 4be5e2958fb4be3d35cbe58b8933bfde5ce90ed3
|
||||||
|
|
||||||
// Wrist constructor
|
// Wrist constructor
|
||||||
/*WristMech wristObj(
|
/*WristMech wristObj(
|
||||||
@@ -77,12 +81,12 @@ void initialize() {
|
|||||||
liftRotation.reset_position();
|
liftRotation.reset_position();
|
||||||
//wristRotation.reset_position();
|
//wristRotation.reset_position();
|
||||||
|
|
||||||
/*pros::Task liftControlTasck([&]{
|
pros::Task liftControlTasck([&]{
|
||||||
while (true) {
|
while (true) {
|
||||||
liftObj.lift_control();
|
liftObj.lift_control();
|
||||||
pros::delay(10);
|
pros::delay(10);
|
||||||
}
|
}
|
||||||
});*/
|
});
|
||||||
|
|
||||||
// Look at your horizontal tracking wheel and decide if it's in front of the midline of your robot or behind it
|
// Look at your horizontal tracking wheel and decide if it's in front of the midline of your robot or behind it
|
||||||
// - change `back` to `front` if the tracking wheel is in front of the midline
|
// - change `back` to `front` if the tracking wheel is in front of the midline
|
||||||
@@ -313,8 +317,8 @@ void opcontrol() {
|
|||||||
// Call custom drive functions here
|
// Call custom drive functions here
|
||||||
pistonControl.control_piston(PistonsP::PlaceHolderP, ControlPeriodP::driver,
|
pistonControl.control_piston(PistonsP::PlaceHolderP, ControlPeriodP::driver,
|
||||||
ControllerP::master, ButtonsP::arrow_buttons);
|
ControllerP::master, ButtonsP::arrow_buttons);
|
||||||
motorControl.motor_control(ControlPeriodM::driver, ControllerM::master, ButtonsM::right_shoulder_buttons,
|
/*motorControl.motor_control(ControlPeriodM::driver, ControllerM::master, ButtonsM::right_shoulder_buttons,
|
||||||
MotorGroups::lift_MG, 127, -127);
|
MotorGroups::lift_MG, 127, -127);*/
|
||||||
motorControl.motor_control(ControlPeriodM::driver, ControllerM::master, ButtonsM::left_shoulder_buttons,
|
motorControl.motor_control(ControlPeriodM::driver, ControllerM::master, ButtonsM::left_shoulder_buttons,
|
||||||
MotorGroups::claw_M, -127, 127);
|
MotorGroups::claw_M, -127, 127);
|
||||||
motorControl.motor_control(ControlPeriodM::driver, ControllerM::master, ButtonsM::Y_B_buttons,
|
motorControl.motor_control(ControlPeriodM::driver, ControllerM::master, ButtonsM::Y_B_buttons,
|
||||||
@@ -322,7 +326,7 @@ void opcontrol() {
|
|||||||
|
|
||||||
// Basic control scheme
|
// Basic control scheme
|
||||||
//armObj.arm_driver_control(ControllerR::master, ButtonsR::left_shoulder_buttons);
|
//armObj.arm_driver_control(ControllerR::master, ButtonsR::left_shoulder_buttons);
|
||||||
//liftObj.lift_driver_control(ControllerR::master, ButtonsR::right_shoulder_buttons);
|
liftObj.lift_driver_control(ControllerR::master, ButtonsR::right_shoulder_buttons);
|
||||||
|
|
||||||
//armObj.arm_driver_control(ControllerR::slave, ButtonsR::left_shoulder_buttons);
|
//armObj.arm_driver_control(ControllerR::slave, ButtonsR::left_shoulder_buttons);
|
||||||
//liftObj.lift_driver_control(ControllerR::slave, ButtonsR::right_shoulder_buttons);
|
//liftObj.lift_driver_control(ControllerR::slave, ButtonsR::right_shoulder_buttons);
|
||||||
|
|||||||
Reference in new issue
Block a user